merge -- Ventas

This commit is contained in:
2022-01-26 12:17:41 -07:00
31 changed files with 692 additions and 462 deletions

View File

@@ -110,14 +110,12 @@
<asp:UpdatePanel ID="UpGral" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpGral" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="row"> <div class="row">
<div class="Widthall" style="text-align: right!important; margin-top: 2px!important; margin-bottom: 2px!important"> <div class="Widthall" style="text-align: right!important;"">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvFolioGarantia.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" /> <input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvFolioGarantia.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvFolioGarantia.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a> <a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvFolioGarantia.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div> </div>
</div> </div>
<div class="row" style="margin: 5px"> <div class="row" style="margin: 5px">
<asp:UpdatePanel ID="UPGvFolioGarantia" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPGvFolioGarantia" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
@@ -125,7 +123,7 @@
<asp:GridView ID="GvFolioGarantia" runat="server" AutoGenerateColumns="False" <asp:GridView ID="GvFolioGarantia" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveFolioGarantia,FolioGarantia,CveEstatus,Estatus,CveUsuario,Usuario,FechaIng,SubProyecto,CveSubProyecto,tipoFolio,Limite" DataKeyNames="CveFolioGarantia,FolioGarantia,CveEstatus,Estatus,CveUsuario,Usuario,FechaIng,SubProyecto,CveSubProyecto,tipoFolio,Limite"
EmptyDataText="No se encontraron registros" ToolTip="Listado de Folios de Garantía" EmptyDataText="No se encontraron registros" ToolTip="Listado de Folios de Garantía"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn"
data-sort="true" data-sort="true"
data-freezerows="1" data-freezerows="1"
GridLines="None"> GridLines="None">
@@ -162,8 +160,12 @@
&nbsp;<asp:Literal ID="lblFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal> &nbsp;<asp:Literal ID="lblFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Total">
<asp:TemplateField ItemStyle-Width="300px" HeaderText="Usuario"> <ItemTemplate>
<asp:Literal ID="lblTotal" runat="server" Text='<%# Eval("NumRegistros") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Usuario">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="lblUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal> <asp:Literal ID="lblUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
@@ -371,19 +373,11 @@
</h4> </h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<table>
<tr>
<td>Folio Garantia:</td>
<td>
<asp:Label ID="LblFolio" Text="" Font-Bold="true" runat="server" />
</td>
</tr>
</table>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">Folio Garantia:<asp:Label ID="LblFolio" Text="" Font-Bold="true" runat="server" />
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="Widthall" style="text-align: right!important; margin-top: 20px!important; margin-bottom: 2px!important"> <div class="Widthall" style="text-align: right!important; ">
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvGarantiasDetalle.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" /> <input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvGarantiasDetalle.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvFolioGarantia.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a> <a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvFolioGarantia.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div> </div>
@@ -395,21 +389,21 @@
<asp:GridView ID="GvGarantiasDetalle" runat="server" AutoGenerateColumns="false" Width="100%" EmptyDataText="No se encontraron datos" CssClass="table table-striped table-hover Widthall" <asp:GridView ID="GvGarantiasDetalle" runat="server" AutoGenerateColumns="false" Width="100%" EmptyDataText="No se encontraron datos" CssClass="table table-striped table-hover Widthall"
OnRowDataBound="GvGarantiasDetalle_RowDataBound" DataKeyNames="Consecutivo,CodigoCliente,CodigoSucursal,Codigo,CodigoProducto2,CodigoTipoUso,CodigoTipoDefecto,CodigoEnsamble,CodigoLinea,CodigoInspeccion,FechaVenta,FechaReclamacion,TipoComprobante,Comprobante,Autorizo,Comentarios,ClaveAutorizacion" BorderColor="#D3D3D3" GridLines="None"> OnRowDataBound="GvGarantiasDetalle_RowDataBound" DataKeyNames="Consecutivo,CodigoCliente,CodigoSucursal,Codigo,CodigoProducto2,CodigoTipoUso,CodigoTipoDefecto,CodigoEnsamble,CodigoLinea,CodigoInspeccion,FechaVenta,FechaReclamacion,TipoComprobante,Comprobante,Autorizo,Comentarios,ClaveAutorizacion" BorderColor="#D3D3D3" GridLines="None">
<Columns> <Columns>
<asp:BoundField DataField="Consecutivo" HeaderText="Consecutivo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" /> <asp:BoundField DataField="Consecutivo" HeaderText="Consec" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
<asp:BoundField DataField="FolioRemision" HeaderText="Remisión" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" /> <asp:BoundField DataField="FolioRemision" HeaderText="Remisión" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
<asp:BoundField DataField="FolioFactura" HeaderText="Factura" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" /> <asp:BoundField DataField="FolioFactura" HeaderText="Factura" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
<asp:BoundField DataField="Cliente" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%" /> <asp:BoundField DataField="Cliente" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%" />
<asp:BoundField DataField="Codigo" HeaderText="Código" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" /> <asp:BoundField DataField="Codigo" HeaderText="Código" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
<asp:BoundField DataField="PS" HeaderText="Producto" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" /> <asp:BoundField DataField="PS" HeaderText="Producto" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
<asp:BoundField DataField="TipoUso" HeaderText="Tipo Uso" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" /> <asp:BoundField DataField="TipoUso" HeaderText="Tipo Uso" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
<asp:BoundField DataField="CodigoEnsamble" HeaderText="Código Ensamble" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" /> <asp:BoundField DataField="CodigoEnsamble" HeaderText="C. Ensamble" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
<asp:BoundField DataField="CodigoLinea" HeaderText="Código Linea" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" /> <asp:BoundField DataField="CodigoLinea" HeaderText="C. Linea" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
<asp:BoundField DataField="CodigoInspeccion" HeaderText="Código Inspeccion" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" /> <asp:BoundField DataField="CodigoInspeccion" HeaderText="C. Inspección" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
<asp:BoundField DataField="TipoComprobanteTexto" HeaderText="Tipo Comprobante" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" /> <asp:BoundField DataField="TipoComprobanteTexto" HeaderText="Tipo Comp." ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
<asp:BoundField DataField="Comprobante" HeaderText="Comprobante" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" /> <asp:BoundField DataField="Comprobante" HeaderText="Comprobante" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
<asp:BoundField DataField="FechaAjuste" HeaderText="Fecha Ajuste" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" /> <asp:BoundField DataField="FechaAjuste" HeaderText="Fecha Ajuste" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" /> <asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
<asp:TemplateField HeaderText="Descargar PDF" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="80px"> <asp:TemplateField HeaderText="PDF" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="25px">
<ItemTemplate> <ItemTemplate>
<asp:HyperLink ID="HlDescargarPDF" runat="server" Text="<i class='fa fa-file-pdf-o' style='font-size:15px; font-weight:bold; color:dimgray;'></i>" Target="_blank" /> <asp:HyperLink ID="HlDescargarPDF" runat="server" Text="<i class='fa fa-file-pdf-o' style='font-size:15px; font-weight:bold; color:dimgray;'></i>" Target="_blank" />
</ItemTemplate> </ItemTemplate>
@@ -425,6 +419,7 @@
<ContentTemplate> <ContentTemplate>
<asp:Button ID="BtnGenerarTxt" Text="Generar Archivo" CssClass="btn btn-primary" runat="server" OnClick="BtnGenerarTxt_Click" /> <asp:Button ID="BtnGenerarTxt" Text="Generar Archivo" CssClass="btn btn-primary" runat="server" OnClick="BtnGenerarTxt_Click" />
<asp:Button ID="BtnExportarExcel" Text="Generar Excel" CssClass="btn btn-success" runat="server" OnClick="BtnExportarExcel_Click" /> <asp:Button ID="BtnExportarExcel" Text="Generar Excel" CssClass="btn btn-success" runat="server" OnClick="BtnExportarExcel_Click" />
<asp:HyperLink ID="HplGenerarSalida" Text="Generar Salida" CssClass="btn btn-warning " runat="server" />
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button> <button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
</ContentTemplate> </ContentTemplate>
<Triggers> <Triggers>

View File

@@ -124,7 +124,7 @@ Partial Class Acumuladores_CatFoliosGarantia
'TxtCompra.Text = "" 'TxtCompra.Text = ""
'TxtPuntos.Text = "" 'TxtPuntos.Text = ""
CargadatosGvFolioGarantia(-1, "-1") CargadatosGvFolioGarantia(DdlEstatus.SelectedValue.ToEntero, "-1")
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolioGarantia"), "jsHideModalFolioGarantia") RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolioGarantia"), "jsHideModalFolioGarantia")
UpGral.Update() UpGral.Update()
@@ -144,7 +144,7 @@ Partial Class Acumuladores_CatFoliosGarantia
'TxtCompra.Text = "" 'TxtCompra.Text = ""
'TxtPuntos.Text = "" 'TxtPuntos.Text = ""
CargadatosGvFolioGarantia(-1, "-1") CargadatosGvFolioGarantia(DdlEstatus.SelectedValue.ToEntero, "-1")
UpModalFolioGarantia.Update() UpModalFolioGarantia.Update()
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolioGarantia"), "jsHideModalFolioGarantia") RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolioGarantia"), "jsHideModalFolioGarantia")
@@ -176,7 +176,7 @@ Partial Class Acumuladores_CatFoliosGarantia
End If End If
objAcum.Dispose() objAcum.Dispose()
CargadatosGvFolioGarantia(-1, "-1") CargadatosGvFolioGarantia(DdlEstatus.SelectedValue.ToEntero, "-1")
CveFolioGarantia = -1 CveFolioGarantia = -1
End Sub End Sub
@@ -225,6 +225,8 @@ Partial Class Acumuladores_CatFoliosGarantia
Using ObjAcum As New ClsAcumuladores Using ObjAcum As New ClsAcumuladores
If ObjAcum.GetFoliosGarantiasDetalle(CveFolioGarantia) Then If ObjAcum.GetFoliosGarantiasDetalle(CveFolioGarantia) Then
GvGarantiasDetalle.DataSource = ObjAcum.DtResultados GvGarantiasDetalle.DataSource = ObjAcum.DtResultados
HplGenerarSalida.NavigateUrl = "/Inventarios/TraspasoAlmacen.aspx?CveFolioGarantia=" & CveFolioGarantia
End If End If
End Using End Using
GvGarantiasDetalle.DataBind() GvGarantiasDetalle.DataBind()
@@ -307,4 +309,8 @@ Partial Class Acumuladores_CatFoliosGarantia
e.Row.FCHyperLink("HlDescargarPDF").NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=AJUSTE&CveGarantiaDetalle={e.Row.DBCampo("CveGarantiaDetalle")}")}" e.Row.FCHyperLink("HlDescargarPDF").NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=AJUSTE&CveGarantiaDetalle={e.Row.DBCampo("CveGarantiaDetalle")}")}"
End If End If
End Sub End Sub
Protected Sub BtnGenerarSalida_Click(sender As Object, e As EventArgs)
End Sub
End Class End Class

View File

@@ -5514,13 +5514,23 @@ Public Class ClsInventarios
#End Region #End Region
#Region "Camiones" #Region "Camiones"
Public Function GetCamiones(CveCamion As Integer, CveEmpresa As Integer) As Boolean Public Function GetCamiones(CveCamion As Integer, CveEmpresa As Integer, Optional CveTipoCamion As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Inv_CamionesGet") DataAdapter("PA_Inv_CamionesGet")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveCamion", SqlDbType.Int).Value = CveCamion .Add("@CveCamion", SqlDbType.Int).Value = CveCamion
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveTipoCamion", SqlDbType.Int).Value = CveTipoCamion
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -5623,6 +5633,13 @@ Public Class ClsInventarios
End Function End Function
#End Region #End Region
Public Function GetExistenciasMedRin(CvePS As Integer, CveEmpresa As Integer, CveRinTamaño As Integer, CveMedida As Integer) As Boolean Public Function GetExistenciasMedRin(CvePS As Integer, CveEmpresa As Integer, CveRinTamaño As Integer, CveMedida As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Inv_ExistenciaMedRinGet") DataAdapter("PA_Inv_ExistenciaMedRinGet")

View File

@@ -150,7 +150,7 @@ Public Class ClsPaginas
If Application("GlobalTipoCambioUltimaFluctuacion") IsNot Nothing Then If Application("GlobalTipoCambioUltimaFluctuacion") IsNot Nothing Then
Dim dr = DirectCast(Application("GlobalTipoCambioUltimaFluctuacion"), DataTable).FiltroPrimero(String.Format("Fecha = '{0}'", Fecha)) Dim dr = DirectCast(Application("GlobalTipoCambioUltimaFluctuacion"), DataTable).FiltroPrimero(String.Format("Fecha <= '{0}'", Fecha), Orderby:="Fecha DESC")
If dr IsNot Nothing Then If dr IsNot Nothing Then
fluctuacion.TCFluctuacion = dr("TCFluctuacion").ToString().ToDecimal() fluctuacion.TCFluctuacion = dr("TCFluctuacion").ToString().ToDecimal()
fluctuacion.FechaFluctuacion = dr("FechaFluctuacion").ToString().ToDateTime() fluctuacion.FechaFluctuacion = dr("FechaFluctuacion").ToString().ToDateTime()
@@ -7132,13 +7132,7 @@ Public Class ClsPaginas
Dim VendedorTelefono As String = "" Dim VendedorTelefono As String = ""
Dim VendedorCelular As String = "" Dim VendedorCelular As String = ""
Dim RowVendedor As DataRow = Nothing Dim RowVendedor As DataRow = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveVendedor = {0}", Vta.CveVendedor.ToString))
Dim ObjVendedores As New ClsVtaVendedores
If ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa) Then
RowVendedor = ObjVendedores.DtResultados.FiltroPrimero(String.Format("CveVendedor = {0}", Vta.CveVendedor.ToString))
End If
ObjVendedores.Dispose()
If Not IsNothing(RowVendedor) Then If Not IsNothing(RowVendedor) Then
VendedorNombre = RowVendedor("Vendedor").ToString VendedorNombre = RowVendedor("Vendedor").ToString

View File

@@ -5271,7 +5271,7 @@ Public Class ClsVentas
Return Retorno Return Retorno
End Function End Function
Public Function GetAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, Optional CveEstatus As Integer = -1, Optional FechaI As DateTime = MinFecha, Optional FechaF As DateTime = MaxFecha) As Boolean Public Function GetAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, TipoDocumento As String, Optional CveEstatus As Integer = -1, Optional FechaI As DateTime = MinFecha, Optional FechaF As DateTime = MaxFecha) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_AutorizacionLimitesGet") DataAdapter("PA_Vta_AutorizacionLimitesGet")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
@@ -5279,6 +5279,7 @@ Public Class ClsVentas
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus .Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
.Add("@TipoDocumento", SqlDbType.VarChar).Value = TipoDocumento
.Add("@FechaI", SqlDbType.Date).Value = FechaI .Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF .Add("@FechaF", SqlDbType.Date).Value = FechaF
End With End With

View File

@@ -204,7 +204,6 @@ Partial Class Bancos_RepEgresosSinComprobante
Try Try
For Each gr As GridViewRow In GvESC.Rows For Each gr As GridViewRow In GvESC.Rows
If gr.FCCheckBox("Chk").Checked Then If gr.FCCheckBox("Chk").Checked Then
Dim CveCuenta As Integer = 0
Dim IdCtaContable As Integer = 0 Dim IdCtaContable As Integer = 0
Dim TipoMovtoOtIngresos As Boolean = True Dim TipoMovtoOtIngresos As Boolean = True
Dim TipoMovtoConcepto As Boolean = False Dim TipoMovtoConcepto As Boolean = False
@@ -231,24 +230,18 @@ Partial Class Bancos_RepEgresosSinComprobante
End If End If
End If End If
If ObjConta.GetCuentaDobleConta(IdCtaContable, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjConta.DtResultados.Rows(0)("CveCuenta").ToString.ToEntero
End If
End If
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now, CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now,
"Saldo de ExC por Sistema", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) "Saldo de ExC por Sistema", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoConcepto, gr.DataKey("Saldo").ToDecimal, "", CveConceptoContable, "Saldo de ExC por Sistema", Now, -1, -1, If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoConcepto, gr.DataKey("Saldo").ToDecimal, "", CveConceptoContable, "Saldo de ExC por Sistema", Now, -1, -1,
gr.DataKey("CveIE").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero, gr.DataKey("CveIE").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero,
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveCuenta:=CveCuenta) Then ImporteMX:=gr.DataKey("Saldo").ToDecimal) Then
MsgError = "Ocurrio un error al saldar el movimiento" MsgError = "Ocurrio un error al saldar el movimiento"
Exit For Exit For
End If End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOtIngresos, gr.DataKey("Saldo").ToDecimal, "", 78, "Saldo de ExC por Sistema", Now, -1, -1, gr.DataKey("CveIE").ToEntero, If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOtIngresos, gr.DataKey("Saldo").ToDecimal, "", 78, "Saldo de ExC por Sistema", Now, -1, -1, gr.DataKey("CveIE").ToEntero,
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveSubProyecto:=gr.DataKey("CveSubProyecto").ToEntero, CveCuenta:=CveCuenta) Then ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveSubProyecto:=gr.DataKey("CveSubProyecto").ToEntero) Then
MsgError = "Ocurrio un error al saldar el movimiento" MsgError = "Ocurrio un error al saldar el movimiento"
Exit For Exit For
End If End If
@@ -292,7 +285,6 @@ Partial Class Bancos_RepEgresosSinComprobante
Try Try
For Each gr As GridViewRow In GvPersonal.Rows For Each gr As GridViewRow In GvPersonal.Rows
If gr.FCCheckBox("Chk").Checked Then If gr.FCCheckBox("Chk").Checked Then
Dim CveCuenta As Integer = 0
Dim IdCtaContPersonal As Integer = 0 Dim IdCtaContPersonal As Integer = 0
Dim CveConceptoContable As Integer Dim CveConceptoContable As Integer
Dim TipoMovtoOtIngresos As Boolean = True Dim TipoMovtoOtIngresos As Boolean = True
@@ -319,24 +311,18 @@ Partial Class Bancos_RepEgresosSinComprobante
End If End If
End If End If
If ObjConta.GetCuentaDobleConta(IdCtaContPersonal, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjConta.DtResultados.Rows(0)("CveCuenta").ToString.ToEntero
End If
End If
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now, CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now,
"Saldo de ExC por Sistema", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) "Saldo de ExC por Sistema", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoConcepto, gr.DataKey("Saldo").ToDecimal, "", CveConceptoContable, "Saldo de ExC por Sistema", Now, -1, -1, If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoConcepto, gr.DataKey("Saldo").ToDecimal, "", CveConceptoContable, "Saldo de ExC por Sistema", Now, -1, -1,
gr.DataKey("CveIE").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero, gr.DataKey("CveIE").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero,
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveCuenta:=CveCuenta) Then ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveSubProyecto:=-1) Then
MsgError = "Ocurrio un error al saldar el movimiento" MsgError = "Ocurrio un error al saldar el movimiento"
Exit For Exit For
End If End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOtIngresos, gr.DataKey("Saldo").ToDecimal, "", 78, "Saldo de ExC por Sistema", Now, -1, -1, gr.DataKey("CveIE").ToEntero, If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOtIngresos, gr.DataKey("Saldo").ToDecimal, "", 78, "Saldo de ExC por Sistema", Now, -1, -1, gr.DataKey("CveIE").ToEntero,
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveCuenta:=CveCuenta) Then ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveSubProyecto:=-1) Then
MsgError = "Ocurrio un error al saldar el movimiento" MsgError = "Ocurrio un error al saldar el movimiento"
Exit For Exit For
End If End If

Binary file not shown.

View File

@@ -7287,17 +7287,17 @@ Partial Class Compras_Compras
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then
For Each Gvr As GridViewRow In GvFacturaNC.Rows For Each Gvr As GridViewRow In GvFacturaNC.Rows
If Gvr.FCCheckBox("ChkFacturaNC").Checked Then If Gvr.FCCheckBox("ChkFacturaNC").Checked Then
Dim CvePrePolizaTemp = ObjConta.AddPrePolizas("Compras/Registrar", If(EsContado And CvePlantillaPrePoliza = 1, 2, CvePlantillaPrePoliza), ImporteCompra, TxtTotal.Text.ToDouble, DdlMoneda.SelectedValue.ToEntero, TxtFecha.Text.ToDate, 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)) 'Dim CvePrePolizaTemp = ObjConta.AddPrePolizas("Compras/Registrar", If(EsContado And CvePlantillaPrePoliza = 1, 2, CvePlantillaPrePoliza), ImporteCompra, TxtTotal.Text.ToDouble, DdlMoneda.SelectedValue.ToEntero, TxtFecha.Text.ToDate, 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))
Dim importeMovimientoNC = Gvr.FCTextBox("TxtImporte").Text.ToDecimal Dim importeMovimientoNC = Gvr.FCTextBox("TxtImporte").Text.ToDecimal
Dim importeMNNC = importeMovimientoNC * tipoCambioActual * Multiplicador Dim importeMNNC = importeMovimientoNC * tipoCambioActual * Multiplicador
If ObjConta.AddPrePolizasDetalle(CvePrePolizaTemp, False, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoNC), CveCompraAmortizacion:=CveCompra, Contabilizable:=SeContabiliza) Then If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoNC), CveCompraAmortizacion:=CveCompra, Contabilizable:=SeContabiliza) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTemp, True, importeMovimientoNC, Referencia, 60, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoNC), Contabilizable:=SeContabiliza) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimientoNC, Referencia, 60, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoNC), Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True ErrorPrepoliza = True
End If End If
Else Else
ErrorPrepoliza = True ErrorPrepoliza = True
End If End If
ObjConta.PrePolizaUnificacion(CvePrePoliza, CvePrePolizaTemp) 'ObjConta.PrePolizaUnificacion(CvePrePoliza, CvePrePolizaTemp)
End If End If
Next Next
End If End If
@@ -9906,6 +9906,8 @@ Partial Class Compras_Compras
End If End If
'End If 'End If
'---------------------------------------------------------------------------------------------------
''EMPIEZA: SI USA AC ''EMPIEZA: SI USA AC
If UsuarioActual.Empresa.UsaAC AndAlso IdPoliza > 0 Then If UsuarioActual.Empresa.UsaAC AndAlso IdPoliza > 0 Then
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa) ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
@@ -10228,7 +10230,7 @@ Partial Class Compras_Compras
End If End If
''TERMINA: SI USA AC ''TERMINA: SI USA AC
'----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
If Not ErrorAC Then If Not ErrorAC Then
Dim Cont As Integer = 0 Dim Cont As Integer = 0
@@ -10729,6 +10731,7 @@ Partial Class Compras_Compras
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then
If ObjConta.ValorPolizaDescuadre > 0 Then If ObjConta.ValorPolizaDescuadre > 0 Then
ErrorPrepoliza = True ErrorPrepoliza = True
Alert("Error en validacion de prepoliza cuadre", TipoMensaje.MsgAdvertencia)
GuardaLogAD($"Compras/Compras-Actualizar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") GuardaLogAD($"Compras/Compras-Actualizar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
End If End If
End If End If

View File

@@ -264,7 +264,7 @@ Partial Class PopUpVerFactura
Remolque1 = String.Format("{0} ", row("Rem1Especificacion"), row("Rem1Anio")) Remolque1 = String.Format("{0} ", row("Rem1Especificacion"), row("Rem1Anio"))
Mercado = If(row("AgenciaAduanalUSA").ToString() = "2", "Extranjero", "Nacional") Mercado = If(row("AgenciaAduanalUSA").ToString() = "2", "Extranjero", "Nacional")
NumeroTrailer = row("NumeroTrailer").ToString() NumeroTrailer = String.Format("No. {0}", row("NumeroTrailer").ToString())
LongitudCaja = row("LongitudCaja").ToString() LongitudCaja = row("LongitudCaja").ToString()
LineaTransportacion = row("LineaTransportacion").ToString() LineaTransportacion = row("LineaTransportacion").ToString()

View File

@@ -11,9 +11,39 @@
#C_Tab_Tlablero tr td:nth-child(n+2) { #C_Tab_Tlablero tr td:nth-child(n+2) {
text-align: center text-align: center
} }
.spanfoliofiscal{
white-space:nowrap; .spanfoliofiscal {
white-space: nowrap;
} }
th:not(.Modulo5) + th.Modulo5,
th:not(.Modulo6) + th.Modulo6,
th:not(.Modulo7) + th.Modulo7{
border-left:1px solid black;
}
th.Modulo5 + th:not(.Modulo5),
th.Modulo6 + th:not(.Modulo6),
th.Modulo7 + th:not(.Modulo7){
border-left:1px solid black;
}
.ADScroller-header .trtitle{
display:none;
}
/*
tr:first-child th.Modulo5,
tr th.Modulo6,
tr th.Modulo7{
border-left:1px solid black;
}
tr th.Modulo5:nth-child(1),
tr th.Modulo6:nth-child(1),
tr th.Modulo7:nth-child(1){
border-left:1px solid black;
}
tr th.Modulo5:nth-last-child(1),
tr th.Modulo6:nth-last-child(1),
tr th.Modulo7:nth-last-child(1){
border-right:1px solid black;
}*/
</style> </style>
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
@@ -24,6 +54,10 @@
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel runat="server"> <asp:UpdatePanel runat="server">
<ContentTemplate> <ContentTemplate>
<li>
<asp:LinkButton runat="server" ID="BtnAgregarDocumento" OnClick="BtnAgregarDocumento_Click" Text="<i class='fa fa-plus'></i> Agregar Documento"></asp:LinkButton>
</li>
<li> <li>
<asp:LinkButton ID="LckOpModalDoctos" OnClick="LckOpModalDoctos_Click" runat="server"><i class="fa fa-upload" aria-hidden="true"></i>Cargar Doctos</asp:LinkButton> <asp:LinkButton ID="LckOpModalDoctos" OnClick="LckOpModalDoctos_Click" runat="server"><i class="fa fa-upload" aria-hidden="true"></i>Cargar Doctos</asp:LinkButton>
<%--<asp:HyperLink ID="HyperLink1" onclick="$('#ModalDoctos').modal();" NavigateUrl="#" runat="server"><i class="fa fa-upload" aria-hidden="true"></i>Cargar Doctos</asp:HyperLink>--%> <%--<asp:HyperLink ID="HyperLink1" onclick="$('#ModalDoctos').modal();" NavigateUrl="#" runat="server"><i class="fa fa-upload" aria-hidden="true"></i>Cargar Doctos</asp:HyperLink>--%>
@@ -32,6 +66,7 @@
<asp:LinkButton ID="LckOpModalDoctosPDFXML" OnClick="LckOpModalDoctosPDFXML_Click" runat="server"><i class="fa fa-upload" aria-hidden="true"></i>Cargar XML PDF</asp:LinkButton> <asp:LinkButton ID="LckOpModalDoctosPDFXML" OnClick="LckOpModalDoctosPDFXML_Click" runat="server"><i class="fa fa-upload" aria-hidden="true"></i>Cargar XML PDF</asp:LinkButton>
<%--<asp:HyperLink ID="HypopenModal" onclick="$('#ModalDoctosxmlpdf').modal();" NavigateUrl="#" runat="server"><i class="fa fa-upload" aria-hidden="true"></i>Cargar XML PDF</asp:HyperLink>--%> <%--<asp:HyperLink ID="HypopenModal" onclick="$('#ModalDoctosxmlpdf').modal();" NavigateUrl="#" runat="server"><i class="fa fa-upload" aria-hidden="true"></i>Cargar XML PDF</asp:HyperLink>--%>
</li> </li>
<li><asp:HyperLink ID="hypEnviarDocto" onclick="EnviarCorreo();" CssClass="" runat="server">Enviar</asp:HyperLink></li>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</asp:Content> </asp:Content>
@@ -83,9 +118,13 @@
</div> </div>
</div> </div>
<table class=" table table-striped table-advance table-hover Widthall ScrollAD" <table id="tableheader">
<asp:Literal ID="LtlThs" runat="server"></asp:Literal>
</table>
<table class=" table table-striped table-advance table-hover Widthall ScrollAD" data-tableheader="#tableheader"
cellspacing="0" data-heighterror="330" data-freezecols="0" data-freezerows="1" cellspacing="0" data-heighterror="330" data-freezecols="0" data-freezerows="1"
id="C_Tab_Tlablero"> id="C_Tab_Tlablero">
<tbody> <tbody>
<tr> <tr>
<asp:Repeater ID="RPTTableroHeader" runat="server"> <asp:Repeater ID="RPTTableroHeader" runat="server">
@@ -95,9 +134,9 @@
<th>Cliente</th> <th>Cliente</th>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<th><%# DataBinder.Eval(Container.DataItem, "Documentacion") %> </th> <th <%# DataBinder.Eval(Container.DataItem, "Modulo","class='Modulo{0}'") %>><%# DataBinder.Eval(Container.DataItem, "Documentacion") %> </th>
<%-- <%-- class='Modulo5'
<tr> <tr>
<td><%# String.Format("{0:dd/MM/yyyy} - {1:dd/MM/yyyy}", DataBinder.Eval(Container.DataItem, "InicioPeriodo"), DataBinder.Eval(Container.DataItem, "FinPeriodo")) %> </td> <td><%# String.Format("{0:dd/MM/yyyy} - {1:dd/MM/yyyy}", DataBinder.Eval(Container.DataItem, "InicioPeriodo"), DataBinder.Eval(Container.DataItem, "FinPeriodo")) %> </td>
<td><%# DataBinder.Eval(Container.DataItem, "Antiguedad") %> </td> <td><%# DataBinder.Eval(Container.DataItem, "Antiguedad") %> </td>
@@ -115,7 +154,7 @@
<th>XML Timbrados</th> <th>XML Timbrados</th>
<th>PDF Timbrados</th> <th>PDF Timbrados</th>
<th style="width: 85px;"> <th style="width: 85px;">
<asp:HyperLink ID="hypEnviarDocto" onclick="EnviarCorreo();" CssClass="btn btn-sm btn-primary" runat="server">Enviar</asp:HyperLink>
<asp:TextBox ID="TxtClientescorreo" CssClass="hidden TxtClientescorreo" runat="server"></asp:TextBox> <asp:TextBox ID="TxtClientescorreo" CssClass="hidden TxtClientescorreo" runat="server"></asp:TextBox>
@@ -249,7 +288,7 @@
<asp:TextBox ID="Anexoxmlpdf" CssClass="ADSdropzone hidden" data-maxfilesize="500" data-maxFile="1" Text="" runat="server"></asp:TextBox> <asp:TextBox ID="Anexoxmlpdf" CssClass="ADSdropzone hidden" data-maxfilesize="500" data-maxFile="1" Text="" runat="server"></asp:TextBox>
</div> </div>
<div class="text-center"> <div class="text-center">
<asp:LinkButton ID="LnkCargarZip" CssClass="btn btn-success" OnClick="LnkCargarZip_Click" runat="server">Procesar</asp:LinkButton> <asp:LinkButton ID="LnkCargarZip" CssClass="btn btn-success" OnClick="LnkCargarZip_Click" runat="server">Procesar</asp:LinkButton>
</div> </div>
</div> </div>
@@ -360,33 +399,37 @@
<asp:Label runat="server" Text='<%# Eval("PeriodoText")%>'> </asp:Label> <asp:Label runat="server" Text='<%# Eval("PeriodoText")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField > <asp:TemplateField>
<HeaderTemplate> <HeaderTemplate>
Fecha<br />inicio Fecha<br />
inicio
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("FechaInicio","{0:dd/MM/yyyy}")%>'> </asp:Label> <asp:Label runat="server" Text='<%# Eval("FechaInicio","{0:dd/MM/yyyy}")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField > <asp:TemplateField>
<HeaderTemplate> <HeaderTemplate>
Fecha<br />fin Fecha<br />
fin
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("FechaFin","{0:dd/MM/yyyy}")%>'> </asp:Label> <asp:Label runat="server" Text='<%# Eval("FechaFin","{0:dd/MM/yyyy}")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField > <asp:TemplateField>
<HeaderTemplate> <HeaderTemplate>
Fecha<br />pago Fecha<br />
pago
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("FechaPago","{0:dd/MM/yyyy}")%>'> </asp:Label> <asp:Label runat="server" Text='<%# Eval("FechaPago","{0:dd/MM/yyyy}")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField > <asp:TemplateField>
<HeaderTemplate> <HeaderTemplate>
Días<br />pago Días<br />
pago
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("NumDiasPagados")%>'> </asp:Label> <asp:Label runat="server" Text='<%# Eval("NumDiasPagados")%>'> </asp:Label>
@@ -441,7 +484,7 @@
</ajax:TabContainer> </ajax:TabContainer>
<div class="text-center"> <div class="text-center">
<asp:LinkButton ID="LnkProcesarDoctos" CssClass="btn btn-success" OnClick="LnkProcesarDoctos_Click" runat="server">Guardar</asp:LinkButton> <asp:LinkButton ID="LnkProcesarDoctos" CssClass="btn btn-success" OnClick="LnkProcesarDoctos_Click" runat="server">Guardar</asp:LinkButton>
</div> </div>
</div> </div>
</div> </div>
@@ -621,6 +664,93 @@
</div> </div>
</div> </div>
</div> </div>
<div id="divAgregarDocumentacion" class="modal ADS fade" role="dialog">
<div class="modal-dialog" style="width: 450px;">
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalDocumentacion" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">
<h4>
<asp:Literal ID="LtlTituloModalDocumentacion" runat="server">Agregar Documento</asp:Literal></h4>
</h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="Txtdocumentacion" CssClass="form-control" MaxLength="100" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvTxtdocumentacion" runat="server" ControlToValidate="Txtdocumentacion" ValidationGroup="GrpEscolaridad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Institución''</b> es necesario, por favor ingréselo."></asp:RequiredFieldValidator>
<asp:Label AssociatedControlID="Txtdocumentacion" runat="server" Text="Documento:"></asp:Label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlDocumentacionTipo" runat="server" Width="100%" CssClass=" select2me form-control " >
<asp:ListItem Value="51" Text="Generales" ></asp:ListItem>
<asp:ListItem Value="58" Text="Por cliente"></asp:ListItem>
<asp:ListItem Value="59" Text="Por cliente(nivel empleado)"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator InitialValue="-1" ID="rfvDdlDocumentacionTipo" ControlToValidate="DdlDocumentacionTipo" CssClass="help-block errorimput" ValidationGroup="GrpEscolaridad" runat="server" ErrorMessage="Seleccione una de las opciones"></asp:RequiredFieldValidator>
<asp:Label AssociatedControlID="DdlDocumentacionTipo" runat="server" Text="Tipo de documento:"></asp:Label>
</div>
<div class="hidden">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtOrden" CssClass="form-control" onkeypress="validate(event)" MaxLength="3" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvTxtOrden" runat="server" ControlToValidate="TxtOrden" ValidationGroup="GrpEscolaridad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Institución''</b> es necesario, por favor ingréselo."></asp:RequiredFieldValidator>
<ajax:FilteredTextBoxExtender ID="filTxtOrden" runat="server" TargetControlID="TxtOrden" FilterType="Numbers" ValidChars="" />
<asp:Label AssociatedControlID="TxtOrden" runat="server" Text="Orden:"></asp:Label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtDiasLimite" CssClass="form-control" onkeypress="validate(event)" MaxLength="2" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvTxtDiasLimite" runat="server" ControlToValidate="TxtDiasLimite" ValidationGroup="GrpEscolaridad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo."></asp:RequiredFieldValidator>
<ajax:FilteredTextBoxExtender ID="FilTxtDiasLimite" runat="server" TargetControlID="TxtDiasLimite" FilterType="Numbers" ValidChars="" />
<asp:Label AssociatedControlID="TxtDiasLimite" runat="server" Text="Dias Limite:"></asp:Label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPeriodicidad" CssClass="form-control" onkeypress="validate(event)" MaxLength="2" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtPeriodicidad" runat="server" ControlToValidate="TxtPeriodicidad" ValidationGroup="GrpEscolaridad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo."></asp:RequiredFieldValidator>
<ajax:FilteredTextBoxExtender ID="FILTxtPeriodicidad" runat="server" TargetControlID="TxtPeriodicidad" FilterType="Numbers" ValidChars="" />
<asp:Label AssociatedControlID="TxtPeriodicidad" runat="server" Text="Periodicidad:"></asp:Label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:CheckBox ID="ChkAplicaDiasLimite" runat="server" Text="Aplica Dias Limite" />
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:CheckBox ID="ChkAplicaFechaVencimiento" runat="server" Text="Aplica Fecha de Vencimiento" />
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:CheckBox ID="chkRequerido" runat="server" Text="Requerido" />
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:CheckBox ID="chkEstatus" runat="server" Text="Activo" />
</div>
<div class="">
<asp:TextBox ID="TxtFileDocumentacion" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
</div>
</div>
</div>
<div class="modal-footer">
<asp:Button ID="BtnAgregarDocumentoModal" runat="server" OnClick="BtnAgregarDocumentoModal_Click" class="btn btn-success" Text="Agregar" ValidationGroup="GrpEscolaridad" />
<button type="button" class="btn default" data-dismiss="modal">Cancelar</button>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
<asp:TextBox ID="TxtDoctoName" CssClass="hidden TxtDoctoName" runat="server"></asp:TextBox> <asp:TextBox ID="TxtDoctoName" CssClass="hidden TxtDoctoName" runat="server"></asp:TextBox>
<asp:TextBox ID="TxtCveDocumentacionElectronica" CssClass="hidden TxtCveDocumentacionElectronica" runat="server"></asp:TextBox> <asp:TextBox ID="TxtCveDocumentacionElectronica" CssClass="hidden TxtCveDocumentacionElectronica" runat="server"></asp:TextBox>
<asp:Button ID="BtnDocumentacionElectronica" UseSubmitBehavior="false" CssClass="hidden BtnDocumentacionElectronica" OnClick="BtnDocumentacionElectronica_Click" runat="server" Text="Button" /> <asp:Button ID="BtnDocumentacionElectronica" UseSubmitBehavior="false" CssClass="hidden BtnDocumentacionElectronica" OnClick="BtnDocumentacionElectronica_Click" runat="server" Text="Button" />

View File

@@ -19,6 +19,16 @@ public partial class Documentacion_TableroMaterialidad : ClsPaginas
{ {
#region "Propiedades" #region "Propiedades"
public Boolean ActualizarDocumentacion
{
get { return ViewState["ActualizarDocumentacion"] != null ? (Boolean)ViewState["ActualizarDocumentacion"] : false; }
set { ViewState["ActualizarDocumentacion"] = value; }
}
public int CveDocumentacion
{
get { return ViewState["CveDocumentacion"] != null ? ViewState["CveDocumentacion"].ToString().ToEntero() : 0; }
set { ViewState["CveDocumentacion"] = value; }
}
public int anio public int anio
{ {
get { return ViewState["anio"] != null ? ViewState["anio"].ToString().ToEntero() : 0; } get { return ViewState["anio"] != null ? ViewState["anio"].ToString().ToEntero() : 0; }
@@ -67,6 +77,26 @@ public partial class Documentacion_TableroMaterialidad : ClsPaginas
{ {
RptDatos.DataSource = edoc.DSResultados.Tables[0]; RptDatos.DataSource = edoc.DSResultados.Tables[0];
dt = edoc.DSResultados.Tables[1]; dt = edoc.DSResultados.Tables[1];
LtlThs.Text = "<tr class='trnopadding ADtr SearchADHeader trtitle'><th></th>";
LtlThs.Text = string.Format("{0}{1}", LtlThs.Text, string.Concat(Enumerable.Repeat("<th></th>", dt.Rows.Count)));
LtlThs.Text = string.Format("{0}<th></th><th></th><th></th></tr><tr><th></th>", LtlThs.Text);
int filas = dt.FiltraParametros("Modulo =5").Rows.Count;
if(filas > 0)
{
LtlThs.Text = string.Format("{0}<th class='Modulo5' colspan='{1}'>Generales</th>", LtlThs.Text, filas);
}
filas = dt.FiltraParametros("Modulo =6").Rows.Count;
if (filas > 0)
{
LtlThs.Text = string.Format("{0}<th class='Modulo6' colspan='{1}'>Por Cliente</th>", LtlThs.Text, filas);
}
filas = dt.FiltraParametros("Modulo =7").Rows.Count;
if (filas > 0)
{
LtlThs.Text = string.Format("{0}<th class='Modulo7' colspan='{1}'>Nivel empleado</th>", LtlThs.Text, filas);
}
LtlThs.Text = string.Format("{0}<th></th><th></th><th></th></tr>", LtlThs.Text);
RPTTableroHeader.DataSource = edoc.DSResultados.Tables[1]; RPTTableroHeader.DataSource = edoc.DSResultados.Tables[1];
RPTTableroHeader.DataBind(); RPTTableroHeader.DataBind();
RptDatos.DataBind(); RptDatos.DataBind();
@@ -350,12 +380,12 @@ public partial class Documentacion_TableroMaterialidad : ClsPaginas
} }
public void procesararchivo(string xmlobject,int periodo, bool guardarInformacion =false) public void procesararchivo(string xmlobject, int periodo, bool guardarInformacion = false)
{ {
using (ClsEdocumentacion edoc = new ClsEdocumentacion()) using (ClsEdocumentacion edoc = new ClsEdocumentacion())
{ {
if (edoc.materialidadDoctos(xmlobject,UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, periodo, guardarInformacion)) if (edoc.materialidadDoctos(xmlobject, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, periodo, guardarInformacion))
{ {
if (edoc.DtResultados.Rows.Count > 0) if (edoc.DtResultados.Rows.Count > 0)
{ {
@@ -542,6 +572,71 @@ public partial class Documentacion_TableroMaterialidad : ClsPaginas
Alert("El correo se ha enviado."); Alert("El correo se ha enviado.");
} }
protected void BtnAgregarDocumento_Click(object sender, EventArgs e)
{
Txtdocumentacion.Text = "";
TxtOrden.Text = "1";
TxtPeriodicidad.Text = "1";
TxtDiasLimite.Text = "1";
BtnAgregarDocumentoModal.Text = "Agregar";
LtlTituloModalDocumentacion.Text = "Agregar documentación";
DdlDocumentacionTipo.SelectedIndex = 0;
chkEstatus.Checked = true;
chkRequerido.Checked = true;
ActualizarDocumentacion = false;
UpModalDocumentacion.Update();
RegistraScript("$('#divAgregarDocumentacion').modal({ backdrop: 'static', keyboard: false});");
}
protected void BtnAgregarDocumentoModal_Click(object sender, EventArgs e)
{
using (ClsEdocumentacion objRH = new ClsEdocumentacion())
{
int intCompleto = 0;
int _estatus = 0;
int _requerido = 0;
string _formato = "";
if (chkEstatus.Checked)
_estatus = 1;
if (chkRequerido.Checked)
_requerido = 1;
if (ActualizarDocumentacion)
{
//_formato = GuardarArchivo(CveDocumentacion);
if (objRH.DocumentacionUpdate(CveDocumentacion, Txtdocumentacion.Text.Trim(), _formato, DdlDocumentacionTipo.SelectedValue.ToEntero(), _estatus, TxtOrden.Text.ToEntero(), _requerido, TxtDiasLimite.Text.ToEntero(), ChkAplicaDiasLimite.Checked, ChkAplicaFechaVencimiento.Checked, UsuarioActual.Empresa.CveEmpresa, TxtPeriodicidad.Text.ToEntero()))
{
RegistraScript(string.Format("$('#{0}').modal('hide');", "divAgregarDocumentacion"));
Alert("Documento Actualizado correctamente.", ModExtensiones.TipoMensaje.MsgInformacion);
cargadatos();
}
}
else if (objRH.DocumentacionAdd(Txtdocumentacion.Text.Trim(), _formato, DdlDocumentacionTipo.SelectedValue.ToEntero(), _estatus, TxtOrden.Text.ToEntero(), _requerido, TxtDiasLimite.Text.ToEntero(), ChkAplicaDiasLimite.Checked, ChkAplicaFechaVencimiento.Checked, UsuarioActual.Empresa.CveEmpresa, TxtPeriodicidad.Text.ToEntero()))
{
//CveDocumentacion = objRH.DtResultados(0)(0).ToString.ToEntero;
//_formato = GuardarArchivo(CveDocumentacion);
if (objRH.DocumentacionUpdate(CveDocumentacion, Txtdocumentacion.Text.Trim(), _formato, DdlDocumentacionTipo.SelectedValue.ToEntero(), _estatus, TxtOrden.Text.ToEntero(), _requerido, TxtDiasLimite.Text.ToEntero(), ChkAplicaDiasLimite.Checked, ChkAplicaFechaVencimiento.Checked, UsuarioActual.Empresa.CveEmpresa, TxtPeriodicidad.Text.ToEntero()))
{
}
RegistraScript(string.Format("$('#{0}').modal('hide');", "divAgregarDocumentacion"));
Alert("Documento agregado correctamente.", ModExtensiones.TipoMensaje.MsgInformacion);
cargadatos();
}
ActualizarDocumentacion = false;
}
}
} }
public class archivoxmlpdf public class archivoxmlpdf
{ {

View File

@@ -323,49 +323,51 @@ Partial Class RH_CatDocumentos
Protected Sub BtnAgregarDocumentoModal_Click(sender As Object, e As EventArgs) Handles BtnAgregarDocumentoModal.Click Protected Sub BtnAgregarDocumentoModal_Click(sender As Object, e As EventArgs) Handles BtnAgregarDocumentoModal.Click
Dim objRH As New ClsEdocumentacion Using objRH As New ClsEdocumentacion
Dim intCompleto As Integer = 0
Dim _estatus As Integer = 0 Dim intCompleto As Integer = 0
Dim _requerido As Integer = 0 Dim _estatus As Integer = 0
Dim _formato As String = "" Dim _requerido As Integer = 0
Dim _formato As String = ""
If chkEstatus.Checked Then If chkEstatus.Checked Then
_estatus = 1 _estatus = 1
End If
If chkRequerido.Checked Then
_requerido = 1
End If
If ActualizarDocumentacion Then
_formato = GuardarArchivo(CveDocumentacion)
If objRH.DocumentacionUpdate(CveDocumentacion, Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, ChkAplicaDiasLimite.Checked, ChkAplicaFechaVencimiento.Checked, UsuarioActual.Empresa.CveEmpresa,
TxtPeriodicidad.Text.ToEntero) Then
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAgregarDocumentacion"))
Alert("Documento Actualizado correctamente.", TipoMensaje.MsgInformacion)
CargaDocumentacion()
End If End If
Else If chkRequerido.Checked Then
If objRH.DocumentacionAdd(Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, ChkAplicaDiasLimite.Checked, ChkAplicaFechaVencimiento.Checked, UsuarioActual.Empresa.CveEmpresa, TxtPeriodicidad.Text.ToEntero) Then _requerido = 1
End If
If ActualizarDocumentacion Then
CveDocumentacion = objRH.DtResultados(0)(0).ToString.ToEntero
_formato = GuardarArchivo(CveDocumentacion) _formato = GuardarArchivo(CveDocumentacion)
If objRH.DocumentacionUpdate(CveDocumentacion, Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, ChkAplicaDiasLimite.Checked, ChkAplicaFechaVencimiento.Checked, UsuarioActual.Empresa.CveEmpresa, If objRH.DocumentacionUpdate(CveDocumentacion, Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, ChkAplicaDiasLimite.Checked, ChkAplicaFechaVencimiento.Checked, UsuarioActual.Empresa.CveEmpresa,
TxtPeriodicidad.Text.ToEntero) Then TxtPeriodicidad.Text.ToEntero) Then
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAgregarDocumentacion"))
Alert("Documento Actualizado correctamente.", TipoMensaje.MsgInformacion)
CargaDocumentacion()
End If End If
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAgregarDocumentacion")) Else
Alert("Documento agregado correctamente.", TipoMensaje.MsgInformacion) If objRH.DocumentacionAdd(Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, ChkAplicaDiasLimite.Checked, ChkAplicaFechaVencimiento.Checked, UsuarioActual.Empresa.CveEmpresa, TxtPeriodicidad.Text.ToEntero) Then
CargaDocumentacion()
End If
End If
ActualizarDocumentacion = False CveDocumentacion = objRH.DtResultados(0)(0).ToString.ToEntero
_formato = GuardarArchivo(CveDocumentacion)
If objRH.DocumentacionUpdate(CveDocumentacion, Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, ChkAplicaDiasLimite.Checked, ChkAplicaFechaVencimiento.Checked, UsuarioActual.Empresa.CveEmpresa,
TxtPeriodicidad.Text.ToEntero) Then
End If
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAgregarDocumentacion"))
Alert("Documento agregado correctamente.", TipoMensaje.MsgInformacion)
CargaDocumentacion()
End If
End If
ActualizarDocumentacion = False
End Using
End Sub End Sub

View File

@@ -29,8 +29,8 @@
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" GridLines="None" DataKeyNames="CveCompuesto,Compuesto,Estatus" CssClass="table table-striped table-advance table-hover Widthall" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Compuestos Activos"> <asp:GridView ID="GvDatos" runat="server" GridLines="None" DataKeyNames="CveCompuesto,Compuesto,Estatus" CssClass="table table-striped table-advance table-hover Widthall" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Compuestos Activos">
<Columns> <Columns>
<asp:BoundField DataField="Compuesto" ItemStyle-Width="20%" HeaderText="Conductor" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField DataField="Compuesto" ItemStyle-Width="20%" HeaderText="Compuesto" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="20%" HeaderText="Vencimiento Licencia" ItemStyle-HorizontalAlign="center" /> <asp:BoundField DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="20%" HeaderText="Fecha Ing" ItemStyle-HorizontalAlign="center" />
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField HeaderText="Estatus" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="LblEstatus" runat="server" Text=""></asp:Label> <asp:Label ID="LblEstatus" runat="server" Text=""></asp:Label>

View File

@@ -1137,8 +1137,7 @@
<div class="modal-footer"> <div class="modal-footer">
<div class="row"> <div class="row">
<div class="col-md-2" style="text-align: left"> <div class="col-md-2" style="text-align: left">
<asp:LinkButton ID="LbDescargarExcelConceptos" OnClick="LbDescargarExcelConceptos_Click" runat="server" CssClass="btn btn-warning" Text="Descargar Plantilla" />
<asp:LinkButton ID="LbDescargarExcelConceptos" runat="server" CssClass="btn btn-warning" Text="Descargar Plantilla" />
</div> </div>
<div class="col-md-10" style="text-align: center"> <div class="col-md-10" style="text-align: center">

View File

@@ -4934,6 +4934,41 @@ Partial Class Inventarios_RecepcionAlmacen
End If End If
End Sub End Sub
Protected Sub LbDescargarExcelConceptos_Click(sender As Object, e As EventArgs)
DescargarFormato()
End Sub
Public Sub DescargarFormato()
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\Formatos\FormatoRecepcionAlmacen.xlsx"
Dim dtt As New DataTable
dtt = DtInv.Copy()
dtt.Columns.Remove("Cantidad")
dtt.Columns("CantidadF").ColumnName = "Cantidad"
dtt.Columns("PS").ColumnName = "Producto"
dtt.Columns("Codigo").ColumnName = "Código"
Dim existingcol As New List(Of String) '= {"Cantidad", "Producto", "Código"}
For Each col As DataColumn In dtt.Columns
If Not col.ColumnName.Contiene("Cantidad", "Producto", "Código") Then
existingcol.Add(col.ColumnName)
End If
Next
For Each colName As String In existingcol
dtt.Columns.Remove(colName)
Next
dtt.Columns("Cantidad").SetOrdinal(0)
dtt.Columns("Código").SetOrdinal(1)
dtt.Columns("Producto").SetOrdinal(2)
dtt.Columns.Add("Serie", GetType(String))
dtt.ExportToExcel("FormatoRecepcionAlmacen.xlsx")
End Sub
#End Region #End Region
'Protected Sub BtnGuardarDocumento_Click(sender As Object, e As EventArgs) 'Protected Sub BtnGuardarDocumento_Click(sender As Object, e As EventArgs)
@@ -5041,4 +5076,5 @@ Partial Class Inventarios_RecepcionAlmacen
End Class End Class
End Class End Class

View File

@@ -570,11 +570,13 @@ Partial Class Inventarios_RecepcionUsados
DdlMoneda.DataSource = GlobalDTMonedas DdlMoneda.DataSource = GlobalDTMonedas
DdlMoneda.DataBind() DdlMoneda.DataBind()
'Llenar el dropdownlist de almacén Dim dtt As DataTable = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (22)") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (22)") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1")) 'Llenar el dropdownlist de almacén
DdlAlmacen.SelectedValue = "-1" DdlAlmacen.DataSource = dtt
'DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
'DdlAlmacen.SelectedValue = "-1"
DdlAlmacen.DataBind() DdlAlmacen.DataBind()
If IsNothing(Request("CveMovimiento")) Then If IsNothing(Request("CveMovimiento")) Then
@@ -2919,6 +2921,11 @@ Partial Class Inventarios_RecepcionUsados
'CvePrecioLista = CvePrecioListaPS 'CvePrecioLista = CvePrecioListaPS
End If End If
DdlTipoUso.Items.Clear()
DdlTipoUso.DataSource = GlobalDTAcumGarantiasMesesTipoUso(UsuarioActual.CveEmpresa, CveMarca)
DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlTipoUso.DataBind()
Dim MarcaPorcentaje As DataRow = DtPorcentajeMarcas.FiltroPrimero(String.Format("CveMarca = {0}", drPS("CveMarca").ToString)) Dim MarcaPorcentaje As DataRow = DtPorcentajeMarcas.FiltroPrimero(String.Format("CveMarca = {0}", drPS("CveMarca").ToString))
If MarcaPorcentaje IsNot Nothing Then If MarcaPorcentaje IsNot Nothing Then
Dim PorcentajeProducto As Decimal = MarcaPorcentaje("PorcentajeProducto").ToString.ToDecimal / 100 Dim PorcentajeProducto As Decimal = MarcaPorcentaje("PorcentajeProducto").ToString.ToDecimal / 100

View File

@@ -339,12 +339,14 @@ Partial Class Inventarios_RepAnomalias
ImgExcelProdcutosCoinciden.Visible = False ImgExcelProdcutosCoinciden.Visible = False
LnkDescarExcelGrupos.Visible = True LnkDescarExcelGrupos.Visible = True
GvGrupos.DataSource = dt.FiltraParametros("CvePS > 0") If dt IsNot Nothing Then
GvGrupos.DataBind() GvGrupos.DataSource = dt.FiltraParametros("CvePS > 0")
LtlGrupos1.Text = dt.FiltraParametros("Orden = 1 and CvePS > 0").Rows.Count.ToString
LtlGrupos2.Text = dt.FiltraParametros("Orden = 2 and CvePS > 0").Rows.Count.ToString
LtlGrupos3.Text = dt.FiltraParametros("Orden = 3 and CvePS > 0").Rows.Count.ToString
LtlGrupos1.Text = dt.FiltraParametros("Orden = 1 and CvePS > 0").Rows.Count.ToString End If
LtlGrupos2.Text = dt.FiltraParametros("Orden = 2 and CvePS > 0").Rows.Count.ToString GvGrupos.DataBind()
LtlGrupos3.Text = dt.FiltraParametros("Orden = 3 and CvePS > 0").Rows.Count.ToString
If DdlGPO.SelectedValue.ToEntero = 1 Then If DdlGPO.SelectedValue.ToEntero = 1 Then
PSIguales() PSIguales()

View File

@@ -460,7 +460,7 @@
</table> </table>
<div style="max-height: 300px; overflow-y: auto;"> <div style="max-height: 300px; overflow-y: auto;">
<asp:GridView ID="GvDatos" DataKeyNames="No,PS,CvePS,CveUM,Serie,CveSeccionAlmacen,Cantidad" runat="server" ShowHeader="false" AutoGenerateColumns="False" EmptyDataText="" ToolTip="Listado de Movimientos" CssClass="Widthall table table-striped table-hover" GridLines="None"> <asp:GridView ID="GvDatos" DataKeyNames="No,PS,CvePS,CveUM,Serie,CveSeccionAlmacen,Lote,FechaCaducidad,Cantidad" runat="server" ShowHeader="false" AutoGenerateColumns="False" EmptyDataText="" ToolTip="Listado de Movimientos" CssClass="Widthall table table-striped table-hover" GridLines="None">
<Columns> <Columns>
<asp:BoundField HeaderText="#" DataField="No" ItemStyle-Width="23px" /> <asp:BoundField HeaderText="#" DataField="No" ItemStyle-Width="23px" />
<asp:TemplateField ItemStyle-Width="93px" ItemStyle-HorizontalAlign ="Right"> <asp:TemplateField ItemStyle-Width="93px" ItemStyle-HorizontalAlign ="Right">

View File

@@ -28,7 +28,6 @@ Partial Class Inventarios_TraspasoAlmacen
End Set End Set
End Property End Property
Private Property CveAlmacenTransitorio As Integer Private Property CveAlmacenTransitorio As Integer
Get Get
Return CType(ViewState("CveAlmacenTransitorio"), Integer) Return CType(ViewState("CveAlmacenTransitorio"), Integer)
@@ -198,6 +197,10 @@ Partial Class Inventarios_TraspasoAlmacen
CargaMovimiento(Request("CveEntrada").ToString.ToEntero) CargaMovimiento(Request("CveEntrada").ToString.ToEntero)
End If End If
If Request("CveFolioGarantia") IsNot Nothing AndAlso Request("CveFolioGarantia").ToString.ToEntero > 0 Then
CargaMovimientoGarantia(Request("CveFolioGarantia").ToString.ToEntero)
End If
If UsuarioActual.Empresa.Funcionalidad(132) = "1" Then If UsuarioActual.Empresa.Funcionalidad(132) = "1" Then
DivCodigoSeriePS.Visible = True DivCodigoSeriePS.Visible = True
Else Else
@@ -221,7 +224,7 @@ Partial Class Inventarios_TraspasoAlmacen
End If End If
CantidadTotal = 0 CantidadTotal = 0
CvePS = 0 CvePS = 0
TipoSeccionAlmacen = 0 TipoSeccionAlmacen = 0
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 Then If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 Then
@@ -358,6 +361,59 @@ Partial Class Inventarios_TraspasoAlmacen
UpMov.Update() UpMov.Update()
End Sub End Sub
Private Sub CargaMovimientoGarantia(CveFolioGarantia As Integer)
Using ObjAcum As New ClsAcumuladores
If ObjAcum.GetFoliosGarantiasDetalle(CveFolioGarantia) Then
''carga
Dim dra As DataRow = ObjAcum.DtResultados(0)
DivMov.Visible = True
ltlFolio.Text = dra("FolioGarantia").ToString
Dim CveSub As Integer = dra("CveSubProyecto").ToString.ToEntero
lblCompraRef.Visible = False
hplRef.Visible = False
TxtObservaciones.Text = "Folio Garantia: " & dra("FolioGarantia").ToString
'If Mov.CveCompra > 0 Then
' hplRef.NavigateUrl = $"/Compras/Compras.aspx?CveCompra={Mov.CveCompra}"
' lblCompraRef.Visible = True
' hplRef.Visible = True
'Else
' hplRef.Visible = False
' lblCompraRef.Visible = False
'End If
ChkTransitorio.Enabled = False
DdlAlmacenOrigen.Enabled = True
DdlAlmacenOrigen.Items.Clear()
DdlAlmacenOrigen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 6).FiltraParametros(String.Format("CveSubProyecto={0}", CveSub))
DdlAlmacenOrigen.DataBind()
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa, 21).FiltraParametros(String.Format("CveSubProyecto={0}", CveSub))
DdlAlmacenDestino.DataBind()
CargadoDeMov = True
Dim dtt As DataTable = ObjAcum.DtResultados.FiltraParametros("", DistinctColumns:={"CvePS", "PS", "CveUM", "UnidadMedida", "Codigo"})
For Each drr As DataRow In dtt.Rows
Dim dr As DataRow = DtMovimientos.NewRow
dr("CvePS") = drr("CvePS")
dr("PS") = String.Format("{0} - {1}", drr("Codigo"), drr("PS"))
dr("CveUM") = drr("CveUM")
dr("UnidadMedida") = drr("UnidadMedida")
dr("Cantidad") = ObjAcum.DtResultados.COUNT("CvePS", "CvePS = " & drr("CvePS").ToString)
DtMovimientos.Rows.Add(dr)
Next
CargaGvDatos()
End If
End Using
UpMov.Update()
End Sub
Private Sub AlmacenTransitorioDefaults() Private Sub AlmacenTransitorioDefaults()
ChkTransitorio.Checked = UsuarioActual.Empresa.Funcionalidad(154).ToString.ToEntero > 0 ChkTransitorio.Checked = UsuarioActual.Empresa.Funcionalidad(154).ToString.ToEntero > 0
ChkTransitorio.Enabled = Not UsuarioActual.Empresa.Funcionalidad(154).ToString.ToEntero > 0 ChkTransitorio.Enabled = Not UsuarioActual.Empresa.Funcionalidad(154).ToString.ToEntero > 0
@@ -898,16 +954,6 @@ Partial Class Inventarios_TraspasoAlmacen
Dim tLote As String = If(Lote <> "-1", String.Format("AND Lote = '{0}' ", Lote), "") Dim tLote As String = If(Lote <> "-1", String.Format("AND Lote = '{0}' ", Lote), "")
Dim tFechaCaducidad As String = If(FechaCaducidad > MinFecha, String.Format("AND FechaCaducidad = '{0}' ", FechaCaducidad), "") Dim tFechaCaducidad As String = If(FechaCaducidad > MinFecha, String.Format("AND FechaCaducidad = '{0}' ", FechaCaducidad), "")
'If UsuarioActual.CveEmpresa = 140 Then
' Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen = {DdlAlmacenOrigen.SelectedValue}").ToEntero
' If Not CveSubProyecto.Contiene(11791, 11793, 11993, 11994, 11794, 11797, 11795, 12010, 12011) Then
' Serie = "-1"
' End If
'End If
Dim ExistenciaEspecificada As Decimal = 0 Dim ExistenciaEspecificada As Decimal = 0
CantidadenGrid = DtMovimientos.SUMD("Cantidad", String.Format("CvePS = {0} AND CveUM = {1} {2} {3} {4} ", dr("CvePS"), dr("CveUM"), If(Not dr("Serie").ToString.Contiene("-1", ""), $" AND Serie = '{dr("Serie")}'", ""), tLote, tFechaCaducidad)) CantidadenGrid = DtMovimientos.SUMD("Cantidad", String.Format("CvePS = {0} AND CveUM = {1} {2} {3} {4} ", dr("CvePS"), dr("CveUM"), If(Not dr("Serie").ToString.Contiene("-1", ""), $" AND Serie = '{dr("Serie")}'", ""), tLote, tFechaCaducidad))
If ObjInventario.GetExistenciasProducto(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then If ObjInventario.GetExistenciasProducto(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
@@ -945,7 +991,7 @@ Partial Class Inventarios_TraspasoAlmacen
Lote = If(gvr.DataKey("Lote") = "", "-1", gvr.DataKey("Lote")) Lote = If(gvr.DataKey("Lote") = "", "-1", gvr.DataKey("Lote"))
FechaCaducidad = If(gvr.DataKey("FechaCaducidad") = "", MinFecha, gvr.DataKey("FechaCaducidad").ToDate) FechaCaducidad = If(gvr.DataKey("FechaCaducidad") = "", MinFecha, gvr.DataKey("FechaCaducidad").ToDate)
If ObjInventario.GetExistenciasProducto(gvr.DataKey("CvePS").ToString.ToEntero, gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then If ObjInventario.GetExistenciasProducto(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
'si hay existencia en almacen costeado, lo tengo que sacar 'si hay existencia en almacen costeado, lo tengo que sacar
Existencia = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CVeAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal Existencia = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CVeAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
End If End If
@@ -1249,12 +1295,12 @@ Partial Class Inventarios_TraspasoAlmacen
RegistraScript(String.Format("AbrirVentana('/General/PopUpPaqueteriasGuias.aspx?CveMovimiento={0}',800,620);", CveMovimientoSalida)) RegistraScript(String.Format("AbrirVentana('/General/PopUpPaqueteriasGuias.aspx?CveMovimiento={0}',800,620);", CveMovimientoSalida))
End If End If
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then 'If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
Dim Correo As String = "jorgegonzalez@compuproveedores.com" ' Dim Correo As String = "jorgegonzalez@compuproveedores.com"
If GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {DdlAlmacenDestino.SelectedValue.ToEntero}").ToEntero = 16 Then ' If GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {DdlAlmacenDestino.SelectedValue.ToEntero}").ToEntero = 16 Then
MandaCorreo(CveMovimientoSalida, Correo) ' MandaCorreo(CveMovimientoSalida, Correo)
End If ' End If
End If 'End If
LimpiaMovimiento() LimpiaMovimiento()
@@ -1769,7 +1815,7 @@ Partial Class Inventarios_TraspasoAlmacen
End If End If
If UsuarioActual.Empresa.Funcionalidad(132) = "1" Then If UsuarioActual.Empresa.Funcionalidad(132) = "1" OrElse UsuarioActual.CveEmpresa = 140 Then
DivCodigoSeriePSRecepcion.Visible = True DivCodigoSeriePSRecepcion.Visible = True
Else Else
DivCodigoSeriePSRecepcion.Visible = False DivCodigoSeriePSRecepcion.Visible = False
@@ -3330,7 +3376,7 @@ Partial Class Inventarios_TraspasoAlmacen
If SATClaveUnidadMedida.Length = 0 Then SBMensaje.AppendLine("-Producto sin unidad de medida SAT asignada. ") If SATClaveUnidadMedida.Length = 0 Then SBMensaje.AppendLine("-Producto sin unidad de medida SAT asignada. ")
SBMensaje.AppendLine($"<br><br> <strong><a class='texto' target='_blank' href='../Ventas/ProductosServicios.aspx?CvePS={DrPS("CvePS").ToString}' > Corregir Producto </a></strong>") SBMensaje.AppendLine($"<br><strong><a class='texto' target='_blank' href='/Ventas/ProductosServicios.aspx?CvePS={DrPS("CvePS").ToString}' > Editar Producto </a></strong>")
Alert(SBMensaje.ToString, TipoMensaje.MsgAdvertencia) Alert(SBMensaje.ToString, TipoMensaje.MsgAdvertencia)

View File

@@ -1,128 +0,0 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ISRCalculoAnual.aspx.cs" Inherits="Nomina_ISCalculoAnual" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
Calculo anual de ISR
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="titlefiltros caption">
<div class="row">
<label class="col-md-1">Ejercicio: </label>
<div class="col-md-1">
<asp:DropDownList ID="DdlEjercicios" runat="server" Style="width: 100% !important;" CssClass="select2me" DataValueField="Ejercicio" DataTextField="Ejercicio"></asp:DropDownList>
</div>
<div class="col-md-1">
<asp:LinkButton ID="LnkConsultar" OnClick="LnkConsultar_Click" runat="server" Text="Calcular" class="btn btn-primary" />
</div>
</div>
</div>
<div class="tools">
<%--<a href="javascript:;" class="expand" data-original-title="" title=""></a>--%>
</div>
</div>
<div class="portlet-body" style="display: none">
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="upDatosPers" runat ="server" UpdateMode="Conditional" >
<ContentTemplate>
<asp:GridView ID="GVPersonalISRAnual" runat="server" GridLines="None" CssClass ="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False"
datakeynames="Codigo,NombreCompleto,CodigoNombreCompleto,CveEmpresa,Estatus,FechaFin,FechaInicio,Ingresos,IngresosG,Art152,Subsidio,Impuestoanual,ImpuestoRetenido,ACargo,ACompensar,Saldo">
<Columns>
<asp:TemplateField HeaderText="Nombre ">
<ItemTemplate>
<asp:Label ID="lblcodigoNombreCompleto" runat="server" Text='<%# Eval("CodigoNombreCompleto")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Estatus">
<ItemTemplate>
<asp:Label ID="lblestatus" runat="server" Text='<%# Eval("Estatus")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Centro de costos">
<ItemTemplate>
<asp:Label ID="lblestatus" runat="server" Text='<%# Eval("Subproyecto")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha ingreso">
<ItemTemplate>
<asp:Label ID="lblfechaInicio" runat="server" Text='<%# Eval("FechaInicio","{0:dd/MM/yyyy}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha fin">
<ItemTemplate>
<asp:Label ID="lblfechaFin" runat="server" Text='<%# Eval("FechaFin","{0:dd/MM/yyyy}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Ingresos totales" ItemStyle-HorizontalAlign ="Right">
<ItemTemplate>
<asp:Label ID="lblingresos" runat="server" Text='<%# Eval("Ingresos","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Base gravada" ItemStyle-HorizontalAlign ="Right">
<ItemTemplate>
<asp:Label ID="lblingresosG" runat="server" Text='<%# Eval("IngresosG","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Art. 152" ItemStyle-HorizontalAlign ="Right">
<ItemTemplate>
<asp:Label ID="lblart152" runat="server" Text='<%# Eval("Art152","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Subsidio" ItemStyle-HorizontalAlign ="Right">
<ItemTemplate>
<asp:Label ID="lblsubsidio" runat="server" Text='<%# Eval("Subsidio","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Impuesto anual" ItemStyle-HorizontalAlign ="Right">
<ItemTemplate>
<asp:Label ID="lblimpuestoanual" runat="server" Text='<%# Eval("Impuestoanual","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Impuesto retenido" ItemStyle-HorizontalAlign ="Right">
<ItemTemplate>
<asp:Label ID="lblimpuestoRetenido" runat="server" Text='<%# Eval("ImpuestoRetenido","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="A cargo" ItemStyle-HorizontalAlign ="Right">
<ItemTemplate>
<asp:Label ID="lblaCargo" runat="server" Text='<%# Eval("ACargo","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="A compensar" ItemStyle-HorizontalAlign ="Right">
<ItemTemplate>
<asp:Label ID="lblaCompensar" runat="server" Text='<%# Eval("ACompensar","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Saldo" ItemStyle-HorizontalAlign ="Right">
<ItemTemplate>
<asp:Label ID="lblsaldo" runat="server" Text='<%# Eval("Saldo","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
</asp:Content>

View File

@@ -1,47 +0,0 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Extensiones;
public partial class Nomina_ISCalculoAnual : ClsPaginas
{
protected void Page_Load(object sender, EventArgs e)
{
DataTable dtejercicio = new DataTable();
using (ClsNominas objnom = new ClsNominas())
{
if (objnom.GetEjercicios(UsuarioActual.CveEmpresa))
{
dtejercicio = objnom.DtResultados;
}
}
DdlEjercicios.DataSource = dtejercicio;
DdlEjercicios.DataBind();
}
protected void LnkConsultar_Click(object sender, EventArgs e)
{
CargaPersonalISRAnual();
}
protected void CargaPersonalISRAnual()
{
DataTable dtdatos = new DataTable();
int ejercicio = DdlEjercicios.SelectedValue.ToEntero();
using (ClsNominas objnom = new ClsNominas())
{
if (objnom.PersonalISRAnual(-1, UsuarioActual.CveEmpresa, ejercicio))
{
dtdatos = objnom.DTSetResultados.Tables[0];
}
}
GVPersonalISRAnual.DataSource = dtdatos;
GVPersonalISRAnual.DataBind();
upDatosPers.Update();
}
}

View File

@@ -622,6 +622,13 @@
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal> <asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" Visible="false">
<HeaderTemplate>Riesgo de puesto</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlRiesgoPuesto" runat="server" Text='<%# Eval("RiesgoPuesto") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</Columns> </Columns>
<RowStyle CssClass="Texto" /> <RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" /> <AlternatingRowStyle CssClass="TextoAlterno" />
@@ -794,6 +801,7 @@
<asp:CheckBox ID="ChkUsuario" runat="server" Text="Usuario" Checked="true" /> <asp:CheckBox ID="ChkUsuario" runat="server" Text="Usuario" Checked="true" />
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<asp:CheckBox ID="ChkRiesgoPuesto" runat="server" Text="Riesgo de puesto" Checked="false" />
</div> </div>
</div> </div>
</div> </div>

View File

@@ -564,6 +564,11 @@ Partial Class RH_CatPersonal
Else Else
GvDatos.Columns(42).Visible = False GvDatos.Columns(42).Visible = False
End If End If
If ChkRiesgoPuesto.Checked Then
GvDatos.Columns(43).Visible = True
Else
GvDatos.Columns(42).Visible = False
End If
If (GvDatos.Rows.Count > 0) Then If (GvDatos.Rows.Count > 0) Then

View File

@@ -1,5 +1,4 @@
 Imports Extensiones
Imports Extensiones
Partial Class Ventas_CatAutorizacionLimites Partial Class Ventas_CatAutorizacionLimites
Inherits ClsPaginas Inherits ClsPaginas
@@ -70,7 +69,7 @@ Partial Class Ventas_CatAutorizacionLimites
If DdlClienteFiltro.SelectedValue.ToEntero() <= 0 Then If DdlClienteFiltro.SelectedValue.ToEntero() <= 0 Then
CveCliente = -1 CveCliente = -1
Else Else
CveCliente = DdlClienteFiltro.SelectedValue.ToEntero() CveCliente = DdlClienteFiltro.SelectedValue.ToEntero()
End If End If
Dim FechaI, FechaF As Date Dim FechaI, FechaF As Date

View File

@@ -4359,6 +4359,11 @@ Partial Class PV
End If End If
End If End If
''condicion final, si es cambio de Vigencia, no aplica descuento
If DrPS("CveClasificacion").ToString.ToEntero.Contiene(20637) Then
Descuento = 0
End If
ObjDescuento.ImporteDescuento = Descuento ObjDescuento.ImporteDescuento = Descuento
ObjDescuento.CvePromocionDetalle = CvePromocionDetalle ObjDescuento.CvePromocionDetalle = CvePromocionDetalle
If SeAjustoPU Then If SeAjustoPU Then

View File

@@ -319,6 +319,16 @@
<asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem> <asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<div class="col-md-1 truncate" id="divgarantia1" runat="server" visible="false">
Garantía?:
</div>
<div class="col-md-2" id="divgarantia2" runat="server" visible="false">
<asp:Dropdownlist runat="server" ID="DdlGarantia" CssStyle="width: 100%;" CssClass="form-control input-small input-sm select2me" Width="100%">
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
<asp:ListItem Text="Si" Value="1"></asp:ListItem>
<asp:ListItem Text="No" Value="0"></asp:ListItem>
</asp:Dropdownlist>
</div>
<label class="col-md-1 truncate">Lectura administrativa:</label> <label class="col-md-1 truncate">Lectura administrativa:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" /> <asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" />

View File

@@ -65,6 +65,9 @@ Partial Class Ventas_RepProductosServicios
If UsuarioActual.Empresa.Funcionalidad(531).ToEntero = 1 Then If UsuarioActual.Empresa.Funcionalidad(531).ToEntero = 1 Then
LblLitraje.Visible = True LblLitraje.Visible = True
DvLitraje.Visible = True DvLitraje.Visible = True
'garantia
divgarantia1.Visible = True
divgarantia2.Visible = True
End If End If
End If End If
@@ -249,6 +252,7 @@ Partial Class Ventas_RepProductosServicios
DdlVendedor.Enabled = False DdlVendedor.Enabled = False
End If End If
End Sub End Sub
#End Region #End Region
@@ -280,7 +284,7 @@ Partial Class Ventas_RepProductosServicios
DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1", DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1",
UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante,
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveProveedorCompra:=CveProveedorCompra, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveProveedorCompra:=CveProveedorCompra,
CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, MostrarLitraje:=ChkLitraje.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable) Then CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, MostrarLitraje:=ChkLitraje.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, EsGarantia:=DdlGarantia.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable) Then
GvDatos.DataSource = ObjVentas.DtResultados GvDatos.DataSource = ObjVentas.DtResultados
DtVentas = ObjVentas.DtResultados DtVentas = ObjVentas.DtResultados
Else Else
@@ -337,7 +341,7 @@ Partial Class Ventas_RepProductosServicios
End Select End Select
Else Else
If e.Row.DBCampo("Orden") = "" Then If e.Row.DBCampo("Orden") = "" Then
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
e.Row.Cells(0).Width = Unit.Pixel(200) e.Row.Cells(0).Width = Unit.Pixel(200)
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center

View File

@@ -179,7 +179,7 @@
<asp:Dropdownlist runat="server" ID="DdlMarcas" CssStyle="width: 100%;" CssClass="form-control input-small input-sm select2me" Width="100%" DataTextField="Marca" DataValueField="CveMarca" /> <asp:Dropdownlist runat="server" ID="DdlMarcas" CssStyle="width: 100%;" CssClass="form-control input-small input-sm select2me" Width="100%" DataTextField="Marca" DataValueField="CveMarca" />
</div> </div>
<div class="col-md-1 truncate" id="divgarantia1" runat="server" visible="false"> <div class="col-md-1 truncate" id="divgarantia1" runat="server" visible="false">
Garantía: Garantía?:
</div> </div>
<div class="col-md-2" id="divgarantia2" runat="server" visible="false"> <div class="col-md-2" id="divgarantia2" runat="server" visible="false">
<asp:Dropdownlist runat="server" ID="DdlGarantia" CssStyle="width: 100%;" CssClass="form-control input-small input-sm select2me" Width="100%"> <asp:Dropdownlist runat="server" ID="DdlGarantia" CssStyle="width: 100%;" CssClass="form-control input-small input-sm select2me" Width="100%">

View File

@@ -6504,17 +6504,20 @@
<asp:RequiredFieldValidator ID="RFVNCPS" runat="server" InitialValue="-1" ControlToValidate="DdlNCPS" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalAplicarNC"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVNCPS" runat="server" InitialValue="-1" ControlToValidate="DdlNCPS" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalAplicarNC"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCENCPS" runat="server" HighlightCssClass="vco" TargetControlID="RFVNCPS" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCENCPS" runat="server" HighlightCssClass="vco" TargetControlID="RFVNCPS" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
<div class="col-md-4"> <div class="col-md-3">
<asp:Label ID="LblNCSaldoAnticipo" runat="server" Text=""></asp:Label> <asp:Label ID="LblNCSaldoAnticipo" runat="server" Text=""></asp:Label>
<asp:CheckBox ID="ChkAplicaNCAnticipo" runat="server" Text="Aplicar a Anticipo" Visible="false" /> <asp:CheckBox ID="ChkAplicaNCAnticipo" runat="server" Text="Aplicar a Anticipo" Visible="false" />
</div> </div>
<div class="col-md-3" id="DivBtnRemNC" runat="server" visible="false" >
<asp:Button ID="BtnModalAplicarRemisionesNC" Text="Aplicar Remisiones" runat="server" OnClick="BtnModalAplicarRemisionesNC_Click" class="btn btn-primary" />
</div>
</div> </div>
<div class="row form-group"> <div class="row form-group">
<div class="col-md-2"> <div class="col-md-2">
Observaciones: Observaciones:
</div> </div>
<div class="col-md-10"> <div class="col-md-10">
<asp:TextBox ID="TxtNCObservaciones" Text="" Rows="3" TextMode="MultiLine" CssClass="Widthall form-control input-sm" runat="server" /> <asp:TextBox ID="TxtNCObservaciones" Text="" Rows="2" TextMode="MultiLine" CssClass="Widthall form-control input-sm" runat="server" />
</div> </div>
</div> </div>
<div class="row form-group"> <div class="row form-group">
@@ -6566,21 +6569,11 @@
<ajax:ValidatorCalloutExtender ID="VCENCPorcentaje" runat="server" HighlightCssClass="vco" TargetControlID="RVNCPorcentaje" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCENCPorcentaje" runat="server" HighlightCssClass="vco" TargetControlID="RVNCPorcentaje" Width="300px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<div id="DivBtnRemNC" runat="server" visible="false" class="row form-group"> <div class="row" style="margin-right: 10px; margin-top: 5px;" align="right">
<div class="col-md-2">
</div>
<div class="col-md-4">
<asp:Button ID="BtnModalAplicarRemisionesNC" Text="Aplicar Remisiones" runat="server" OnClick="BtnModalAplicarRemisionesNC_Click" class="btn btn-primary" />
</div>
<div class="col-md-6">
</div>
</div>
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
<input type="text" id="TxtBusqueda10" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda10','{0}')", GvCxC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" /> <input type="text" id="TxtBusqueda10" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda10','{0}')", GvCxC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda10','{0}')", GvCxC.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a> <a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda10','{0}')", GvCxC.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div> </div>
<div class="row" id="DivGvCxC" style="max-height: 10px" runat="server" visible="false"> <div class="row" id="DivGvCxC" style="max-height: 5px" runat="server" visible="false">
<br />
<div class="col-md-12" style="height: 440px; overflow: auto"> <div class="col-md-12" style="height: 440px; overflow: auto">
<asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" OnRowDataBound="GvCxC_RowDataBound" <asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" OnRowDataBound="GvCxC_RowDataBound"
DataKeyNames="CveVenta,CveMetodoPago33,CveFormaPago33" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None"> DataKeyNames="CveVenta,CveMetodoPago33,CveFormaPago33" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">

View File

@@ -2469,6 +2469,25 @@ Partial Class Ventas
HlFacturasRelaciondas.Visible = True HlFacturasRelaciondas.Visible = True
End If End If
If Request("CveEmbarqueManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveEmbarqueManifiesto")) AndAlso Request("CveEmbarqueManifiesto").ToEntero() > 0 Then
DdlMoneda.SelectedValueExist(2)
Using ObjVentas As New ClsNominas
If ObjVentas.ManifiestoForVtaGet(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, "", Request("CveEmbarqueManifiesto").ToEntero()) Then
TmpDT = ObjVentas.DtResultados
TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
TmpDT.Columns.Add("CveVentaDetalleRNC", GetType(Integer))
TmpDT.Columns.Add("TieneProntoPago", GetType(String))
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
GvPS.DataSource = ObjVentas.DtResultados
GvPS.DataBind()
'IEPS A NIVEL DETALLE
'TxtIEPS.Text = If(TmpDT.SUM("IEPS") > 0, TmpDT.SUM("IEPS").FormatoNumero, TxtIEPS.Text)
End If
End Using
End If
'Carga Venta 'Carga Venta
If Request("CveVenta") IsNot Nothing AndAlso IsNumeric(Request("CveVenta")) AndAlso Request("CveVenta").ToEntero() > 0 Then If Request("CveVenta") IsNot Nothing AndAlso IsNumeric(Request("CveVenta")) AndAlso Request("CveVenta").ToEntero() > 0 Then
@@ -6628,7 +6647,7 @@ Partial Class Ventas
'RMF. validacion temporal 'RMF. validacion temporal
'verifica si tiene autorizaciones de Nota de crédito autorizadas 'verifica si tiene autorizaciones de Nota de crédito autorizadas
Dim ObjVentas As New ClsVentas Dim ObjVentas As New ClsVentas
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, -1, CveEstatus:=1) Then If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, -1, "Ing", CveEstatus:=1) Then
Dim RowAutorizacion As DataRow = ObjVentas.DtResultados.FiltroPrimero($"CveVenta IS NULL AND CveTipoDocumento='Egs'", Orderby:="TipoAutorizacion") Dim RowAutorizacion As DataRow = ObjVentas.DtResultados.FiltroPrimero($"CveVenta IS NULL AND CveTipoDocumento='Egs'", Orderby:="TipoAutorizacion")
If RowAutorizacion IsNot Nothing Then If RowAutorizacion IsNot Nothing Then
DdlTipoComprobante.SelectedValueExistInsert("Egs", "Egresos") DdlTipoComprobante.SelectedValueExistInsert("Egs", "Egresos")
@@ -7971,7 +7990,7 @@ Partial Class Ventas
Dim CveVendedor As Integer = DdlVendedor.SelectedValue.ToEntero() Dim CveVendedor As Integer = DdlVendedor.SelectedValue.ToEntero()
Dim ObjVentas As New ClsVentas Dim ObjVentas As New ClsVentas
Try Try
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, CveVendedor, CveEstatus:=1) Then If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, CveVendedor, DdlTipoDocto.SelectedValue, CveEstatus:=1) Then
Dim RowAutorizacion As DataRow = Nothing Dim RowAutorizacion As DataRow = Nothing
'SI TIENE DIAS VENCIDOS BUSCAR POR TIPO VENCIMIENTO 'SI TIENE DIAS VENCIDOS BUSCAR POR TIPO VENCIMIENTO
If TieneDiasVencidos Then If TieneDiasVencidos Then
@@ -26965,15 +26984,47 @@ Partial Class Ventas
Protected Sub BtnAplicarNC_Click(sender As Object, e As EventArgs) Protected Sub BtnAplicarNC_Click(sender As Object, e As EventArgs)
'SOLO APLICA SI NO HAY DOCUMENTOS QUE SELECCIONAR 'SOLO APLICA SI NO HAY DOCUMENTOS QUE SELECCIONAR
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
If GvCxC.Rows.Count = 0 OrElse GvCxC.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("ChkCxC").Checked) = 0 Then
If ClienteEsDistribuidor AndAlso TxtImportesRemisionesNC.Text.ToDecimal() > 0 Then Dim Verificacion As Boolean = False
Alert("No se puede generar una nota de crédito para devolución de efectivo si el cliente es distribuidor.", TipoMensaje.MsgAdvertencia)
If ListaRemisionesNC IsNot Nothing AndAlso ListaRemisionesNC.Count > 0 Then ' si hay opciones seleccionadas, se activa el generar las NCs
Verificacion = True
Else
If UsuarioActual.TienePermisoProceso(175) Then ' si es una nc, que se va a generar directa, el permiso de generar NC directas
Verificacion = True
Else Else
Alert("No se ha seleccionado ninguna factura, en caso de no seleccionar ninguna se creará una nueva nota de crédito. ¿Está seguro de realizar esta acción?", TipoMensaje.MsgConfirmacion, JSBtnAceptar:="BtnAplicaNuevaNC();", TextoConfirmacion:="&nbsp;&nbsp;&nbsp;&nbsp;Si&nbsp;&nbsp;&nbsp;&nbsp;", TextoCancelacion:="&nbsp;&nbsp;&nbsp;&nbsp;No&nbsp;&nbsp;&nbsp;&nbsp;") 'verificar autorizaciones
Dim ObjVentas As New ClsVentas
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, -1, "Egs", CveEstatus:=1) Then
Dim RowAutorizacion As DataRow = ObjVentas.DtResultados.FiltroPrimero($"CveVenta IS NULL ", Orderby:="TipoAutorizacion")
If RowAutorizacion IsNot Nothing Then
Verificacion = True
End If
End If
ObjVentas.Dispose()
' si es una nc, que se va a generar directa, debe de revisar que tenga una autorización, o el permiso de generar NC directas
End If
End If
If GvCxC.Rows.Count = 0 OrElse GvCxC.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("ChkCxC").Checked) = 0 Then
If Verificacion Then
If ClienteEsDistribuidor AndAlso TxtImportesRemisionesNC.Text.ToDecimal() > 0 Then
Alert("No se puede generar una nota de crédito para devolución de efectivo si el cliente es distribuidor.", TipoMensaje.MsgAdvertencia)
Else
Alert("No se ha seleccionado ninguna factura, en caso de no seleccionar ninguna se creará una nueva nota de crédito. ¿Está seguro de realizar esta acción?", TipoMensaje.MsgConfirmacion, JSBtnAceptar:="BtnAplicaNuevaNC();", TextoConfirmacion:="&nbsp;&nbsp;&nbsp;&nbsp;Si&nbsp;&nbsp;&nbsp;&nbsp;", TextoCancelacion:="&nbsp;&nbsp;&nbsp;&nbsp;No&nbsp;&nbsp;&nbsp;&nbsp;")
End If
Else
Alert("No se puede Generar notas de crédito directas", TipoMensaje.MsgAdvertencia)
End If End If
Else Else
AplicarNotaCreditoDesdeVenta() ' si viene de remisiones, puede seguir adelante
If Verificacion Then
AplicarNotaCreditoDesdeVenta()
Else
Alert("No se puede Generar notas de crédito directas", TipoMensaje.MsgAdvertencia)
End If
End If End If
Else Else
AplicarNotaCreditoDesdeVenta() AplicarNotaCreditoDesdeVenta()
@@ -31593,6 +31644,7 @@ Partial Class Ventas
End If End If
ListaRemisionesNC.Add(RemNC) ListaRemisionesNC.Add(RemNC)
BtnAplicarNC.Enabled = True
If TerminarCiclo Then If TerminarCiclo Then
Exit For Exit For
@@ -31636,6 +31688,10 @@ Partial Class Ventas
TxtImportesRemisionesNC.Text = TotalRemNCAplicado.FormatoNumero TxtImportesRemisionesNC.Text = TotalRemNCAplicado.FormatoNumero
'TxtNCImporte.Text = TotalRemNCAplicado.FormatoNumero 'TxtNCImporte.Text = TotalRemNCAplicado.FormatoNumero
If ListaRemisionesNC.Count > 0 Then ' si hay opciones seleccionadas, se activa el generar las NCs
BtnAplicarNC.Enabled = True
End If
UpModalRemisionesNC.Update() UpModalRemisionesNC.Update()
UpAplicarNC.Update() UpAplicarNC.Update()

View File

@@ -398,6 +398,12 @@