merge -- Ventas
This commit is contained in:
@@ -109,15 +109,13 @@
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpGral" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<ContentTemplate>
|
||||
<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;" />
|
||||
<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 class="row" style="margin: 5px">
|
||||
<asp:UpdatePanel ID="UPGvFolioGarantia" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -125,7 +123,7 @@
|
||||
<asp:GridView ID="GvFolioGarantia" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveFolioGarantia,FolioGarantia,CveEstatus,Estatus,CveUsuario,Usuario,FechaIng,SubProyecto,CveSubProyecto,tipoFolio,Limite"
|
||||
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-freezerows="1"
|
||||
GridLines="None">
|
||||
@@ -162,8 +160,12 @@
|
||||
<asp:Literal ID="lblFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="300px" HeaderText="Usuario">
|
||||
<asp:TemplateField HeaderText="Total">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblTotal" runat="server" Text='<%# Eval("NumRegistros") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Usuario">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
@@ -370,20 +372,12 @@
|
||||
<asp:Label Text="Ver Ajustes de garantía" runat="server" />
|
||||
</h4>
|
||||
</div>
|
||||
<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="modal-body">
|
||||
<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 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;" />
|
||||
<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>
|
||||
@@ -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"
|
||||
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>
|
||||
<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="FolioFactura" HeaderText="Factura" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||
<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="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="CodigoEnsamble" HeaderText="Código Ensamble" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="CodigoLinea" HeaderText="Código Linea" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="CodigoInspeccion" HeaderText="Código Inspeccion" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="TipoComprobanteTexto" HeaderText="Tipo Comprobante" 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. Linea" 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 Comp." 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="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>
|
||||
<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>
|
||||
@@ -425,6 +419,7 @@
|
||||
<ContentTemplate>
|
||||
<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:HyperLink ID="HplGenerarSalida" Text="Generar Salida" CssClass="btn btn-warning " runat="server" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
|
||||
@@ -56,8 +56,8 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
|
||||
Dim objAcum As New ClsAcumuladores
|
||||
|
||||
If objAcum.FoliosGarantiaGet(-1, UsuarioActual.Empresa.CveEmpresa, Estatus:=EstatusValor, TipoFolio:=tipoFolioValor, Area:=-1, CveSubProyecto:=DdlSubProyectoFiltro.SelectedValue.ToEntero()) Then
|
||||
GvFolioGarantia.DataSource = objAcum.DtResultados
|
||||
If objAcum.FoliosGarantiaGet(-1, UsuarioActual.Empresa.CveEmpresa, Estatus:=EstatusValor, TipoFolio:=tipoFolioValor, Area:=-1, CveSubProyecto:=DdlSubProyectoFiltro.SelectedValue.ToEntero()) Then
|
||||
GvFolioGarantia.DataSource = objAcum.DtResultados
|
||||
Else
|
||||
GvFolioGarantia.DataSource = Nothing
|
||||
End If
|
||||
@@ -124,7 +124,7 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
'TxtCompra.Text = ""
|
||||
'TxtPuntos.Text = ""
|
||||
|
||||
CargadatosGvFolioGarantia(-1, "-1")
|
||||
CargadatosGvFolioGarantia(DdlEstatus.SelectedValue.ToEntero, "-1")
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolioGarantia"), "jsHideModalFolioGarantia")
|
||||
UpGral.Update()
|
||||
@@ -144,7 +144,7 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
'TxtCompra.Text = ""
|
||||
'TxtPuntos.Text = ""
|
||||
|
||||
CargadatosGvFolioGarantia(-1, "-1")
|
||||
CargadatosGvFolioGarantia(DdlEstatus.SelectedValue.ToEntero, "-1")
|
||||
UpModalFolioGarantia.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolioGarantia"), "jsHideModalFolioGarantia")
|
||||
@@ -176,7 +176,7 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
End If
|
||||
objAcum.Dispose()
|
||||
|
||||
CargadatosGvFolioGarantia(-1, "-1")
|
||||
CargadatosGvFolioGarantia(DdlEstatus.SelectedValue.ToEntero, "-1")
|
||||
|
||||
CveFolioGarantia = -1
|
||||
End Sub
|
||||
@@ -189,8 +189,8 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
LtlTituloModalFolioGarantia.Text = "Editar Folio Garantía"
|
||||
Actualizar = True
|
||||
|
||||
CveFolioGarantia = GvRow.DataKey("CveFolioGarantia")
|
||||
|
||||
CveFolioGarantia = GvRow.DataKey("CveFolioGarantia")
|
||||
|
||||
TxtFolioGarantia.Text = GvRow.DataKey("FolioGarantia")
|
||||
DdlEstatusEditar.SelectedValueExist(GvRow.DataKey("CveEstatus"))
|
||||
TxtLimite.Text = GvRow.DataKey("Limite")
|
||||
@@ -225,6 +225,8 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
Using ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.GetFoliosGarantiasDetalle(CveFolioGarantia) Then
|
||||
GvGarantiasDetalle.DataSource = ObjAcum.DtResultados
|
||||
HplGenerarSalida.NavigateUrl = "/Inventarios/TraspasoAlmacen.aspx?CveFolioGarantia=" & CveFolioGarantia
|
||||
|
||||
End If
|
||||
End Using
|
||||
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")}")}"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnGenerarSalida_Click(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -5514,13 +5514,23 @@ Public Class ClsInventarios
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#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
|
||||
DataAdapter("PA_Inv_CamionesGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCamion", SqlDbType.Int).Value = CveCamion
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveTipoCamion", SqlDbType.Int).Value = CveTipoCamion
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -5623,6 +5633,13 @@ Public Class ClsInventarios
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Public Function GetExistenciasMedRin(CvePS As Integer, CveEmpresa As Integer, CveRinTamaño As Integer, CveMedida As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_ExistenciaMedRinGet")
|
||||
|
||||
@@ -150,7 +150,7 @@ Public Class ClsPaginas
|
||||
|
||||
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
|
||||
fluctuacion.TCFluctuacion = dr("TCFluctuacion").ToString().ToDecimal()
|
||||
fluctuacion.FechaFluctuacion = dr("FechaFluctuacion").ToString().ToDateTime()
|
||||
@@ -7132,13 +7132,7 @@ Public Class ClsPaginas
|
||||
Dim VendedorTelefono As String = ""
|
||||
Dim VendedorCelular As String = ""
|
||||
|
||||
Dim RowVendedor As DataRow = Nothing
|
||||
|
||||
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()
|
||||
Dim RowVendedor As DataRow = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveVendedor = {0}", Vta.CveVendedor.ToString))
|
||||
|
||||
If Not IsNothing(RowVendedor) Then
|
||||
VendedorNombre = RowVendedor("Vendedor").ToString
|
||||
|
||||
@@ -5271,7 +5271,7 @@ Public Class ClsVentas
|
||||
Return Retorno
|
||||
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
|
||||
DataAdapter("PA_Vta_AutorizacionLimitesGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -5279,6 +5279,7 @@ Public Class ClsVentas
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
|
||||
.Add("@TipoDocumento", SqlDbType.VarChar).Value = TipoDocumento
|
||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||
End With
|
||||
|
||||
@@ -204,7 +204,6 @@ Partial Class Bancos_RepEgresosSinComprobante
|
||||
Try
|
||||
For Each gr As GridViewRow In GvESC.Rows
|
||||
If gr.FCCheckBox("Chk").Checked Then
|
||||
Dim CveCuenta As Integer = 0
|
||||
Dim IdCtaContable As Integer = 0
|
||||
Dim TipoMovtoOtIngresos As Boolean = True
|
||||
Dim TipoMovtoConcepto As Boolean = False
|
||||
@@ -231,24 +230,18 @@ Partial Class Bancos_RepEgresosSinComprobante
|
||||
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,
|
||||
"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,
|
||||
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"
|
||||
Exit For
|
||||
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,
|
||||
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"
|
||||
Exit For
|
||||
End If
|
||||
@@ -292,7 +285,6 @@ Partial Class Bancos_RepEgresosSinComprobante
|
||||
Try
|
||||
For Each gr As GridViewRow In GvPersonal.Rows
|
||||
If gr.FCCheckBox("Chk").Checked Then
|
||||
Dim CveCuenta As Integer = 0
|
||||
Dim IdCtaContPersonal As Integer = 0
|
||||
Dim CveConceptoContable As Integer
|
||||
Dim TipoMovtoOtIngresos As Boolean = True
|
||||
@@ -319,24 +311,18 @@ Partial Class Bancos_RepEgresosSinComprobante
|
||||
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,
|
||||
"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,
|
||||
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"
|
||||
Exit For
|
||||
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,
|
||||
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveCuenta:=CveCuenta) Then
|
||||
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveSubProyecto:=-1) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
Exit For
|
||||
End If
|
||||
|
||||
BIN
Bin/GoCfdi.dll
BIN
Bin/GoCfdi.dll
Binary file not shown.
@@ -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
|
||||
For Each Gvr As GridViewRow In GvFacturaNC.Rows
|
||||
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 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 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 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(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
|
||||
End If
|
||||
Else
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
ObjConta.PrePolizaUnificacion(CvePrePoliza, CvePrePolizaTemp)
|
||||
'ObjConta.PrePolizaUnificacion(CvePrePoliza, CvePrePolizaTemp)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
@@ -9906,6 +9906,8 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
'End If
|
||||
|
||||
|
||||
'---------------------------------------------------------------------------------------------------
|
||||
''EMPIEZA: SI USA AC
|
||||
If UsuarioActual.Empresa.UsaAC AndAlso IdPoliza > 0 Then
|
||||
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
@@ -10228,7 +10230,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
''TERMINA: SI USA AC
|
||||
|
||||
|
||||
'----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
If Not ErrorAC Then
|
||||
Dim Cont As Integer = 0
|
||||
@@ -10729,6 +10731,7 @@ Partial Class Compras_Compras
|
||||
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
ErrorPrepoliza = True
|
||||
Alert("Error en validacion de prepoliza cuadre", TipoMensaje.MsgAdvertencia)
|
||||
GuardaLogAD($"Compras/Compras-Actualizar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -264,7 +264,7 @@ Partial Class PopUpVerFactura
|
||||
Remolque1 = String.Format("{0} ", row("Rem1Especificacion"), row("Rem1Anio"))
|
||||
Mercado = If(row("AgenciaAduanalUSA").ToString() = "2", "Extranjero", "Nacional")
|
||||
|
||||
NumeroTrailer = row("NumeroTrailer").ToString()
|
||||
NumeroTrailer = String.Format("No. {0}", row("NumeroTrailer").ToString())
|
||||
|
||||
LongitudCaja = row("LongitudCaja").ToString()
|
||||
LineaTransportacion = row("LineaTransportacion").ToString()
|
||||
|
||||
@@ -11,9 +11,39 @@
|
||||
#C_Tab_Tlablero tr td:nth-child(n+2) {
|
||||
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>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
@@ -24,6 +54,10 @@
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarDocumento" OnClick="BtnAgregarDocumento_Click" Text="<i class='fa fa-plus'></i> Agregar Documento"></asp:LinkButton>
|
||||
</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: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: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><asp:HyperLink ID="hypEnviarDocto" onclick="EnviarCorreo();" CssClass="" runat="server">Enviar</asp:HyperLink></li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
@@ -83,9 +118,13 @@
|
||||
</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"
|
||||
id="C_Tab_Tlablero">
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<asp:Repeater ID="RPTTableroHeader" runat="server">
|
||||
@@ -95,9 +134,9 @@
|
||||
<th>Cliente</th>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
<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>
|
||||
@@ -115,7 +154,7 @@
|
||||
<th>XML Timbrados</th>
|
||||
<th>PDF Timbrados</th>
|
||||
<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>
|
||||
@@ -249,9 +288,9 @@
|
||||
<asp:TextBox ID="Anexoxmlpdf" CssClass="ADSdropzone hidden" data-maxfilesize="500" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
<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 class="portlet light smmallpadding bordered guardardiv">
|
||||
@@ -360,33 +399,37 @@
|
||||
<asp:Label runat="server" Text='<%# Eval("PeriodoText")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField >
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Fecha<br />inicio
|
||||
Fecha<br />
|
||||
inicio
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("FechaInicio","{0:dd/MM/yyyy}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField >
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Fecha<br />fin
|
||||
Fecha<br />
|
||||
fin
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("FechaFin","{0:dd/MM/yyyy}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField >
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Fecha<br />pago
|
||||
Fecha<br />
|
||||
pago
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("FechaPago","{0:dd/MM/yyyy}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField >
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Días<br />pago
|
||||
Días<br />
|
||||
pago
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("NumDiasPagados")%>'> </asp:Label>
|
||||
@@ -439,9 +482,9 @@
|
||||
<ajax:TabPanel ID="TabConceptos" runat="server" HeaderText="Conceptos sin registrar" Visible="false">
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
|
||||
|
||||
<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>
|
||||
@@ -621,6 +664,93 @@
|
||||
</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="TxtCveDocumentacionElectronica" CssClass="hidden TxtCveDocumentacionElectronica" runat="server"></asp:TextBox>
|
||||
<asp:Button ID="BtnDocumentacionElectronica" UseSubmitBehavior="false" CssClass="hidden BtnDocumentacionElectronica" OnClick="BtnDocumentacionElectronica_Click" runat="server" Text="Button" />
|
||||
|
||||
@@ -19,6 +19,16 @@ public partial class Documentacion_TableroMaterialidad : ClsPaginas
|
||||
{
|
||||
#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
|
||||
{
|
||||
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];
|
||||
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.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())
|
||||
{
|
||||
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)
|
||||
{
|
||||
@@ -542,6 +572,71 @@ public partial class Documentacion_TableroMaterialidad : ClsPaginas
|
||||
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
|
||||
{
|
||||
|
||||
@@ -323,49 +323,51 @@ Partial Class RH_CatDocumentos
|
||||
|
||||
Protected Sub BtnAgregarDocumentoModal_Click(sender As Object, e As EventArgs) Handles BtnAgregarDocumentoModal.Click
|
||||
|
||||
Dim objRH As New ClsEdocumentacion
|
||||
Dim intCompleto As Integer = 0
|
||||
Dim _estatus As Integer = 0
|
||||
Dim _requerido As Integer = 0
|
||||
Dim _formato As String = ""
|
||||
|
||||
|
||||
If chkEstatus.Checked Then
|
||||
_estatus = 1
|
||||
End If
|
||||
|
||||
If chkRequerido.Checked Then
|
||||
_requerido = 1
|
||||
End If
|
||||
|
||||
If ActualizarDocumentacion Then
|
||||
|
||||
_formato = GuardarArchivo(CveDocumentacion)
|
||||
If objRH.DocumentacionUpdate(CveDocumentacion, Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, ChkAplicaDiasLimite.Checked, ChkAplicaFechaVencimiento.Checked, UsuarioActual.Empresa.CveEmpresa,
|
||||
TxtPeriodicidad.Text.ToEntero) Then
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAgregarDocumentacion"))
|
||||
Alert("Documento Actualizado correctamente.", TipoMensaje.MsgInformacion)
|
||||
CargaDocumentacion()
|
||||
End If
|
||||
|
||||
Else
|
||||
If objRH.DocumentacionAdd(Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, ChkAplicaDiasLimite.Checked, ChkAplicaFechaVencimiento.Checked, UsuarioActual.Empresa.CveEmpresa, TxtPeriodicidad.Text.ToEntero) Then
|
||||
|
||||
CveDocumentacion = objRH.DtResultados(0)(0).ToString.ToEntero
|
||||
_formato = GuardarArchivo(CveDocumentacion)
|
||||
If objRH.DocumentacionUpdate(CveDocumentacion, Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, ChkAplicaDiasLimite.Checked, ChkAplicaFechaVencimiento.Checked, UsuarioActual.Empresa.CveEmpresa,
|
||||
TxtPeriodicidad.Text.ToEntero) Then
|
||||
|
||||
End If
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAgregarDocumentacion"))
|
||||
Alert("Documento agregado correctamente.", TipoMensaje.MsgInformacion)
|
||||
CargaDocumentacion()
|
||||
End If
|
||||
End If
|
||||
|
||||
ActualizarDocumentacion = False
|
||||
Using objRH As New ClsEdocumentacion
|
||||
|
||||
Dim intCompleto As Integer = 0
|
||||
Dim _estatus As Integer = 0
|
||||
Dim _requerido As Integer = 0
|
||||
Dim _formato As String = ""
|
||||
|
||||
|
||||
If chkEstatus.Checked Then
|
||||
_estatus = 1
|
||||
End If
|
||||
|
||||
If chkRequerido.Checked Then
|
||||
_requerido = 1
|
||||
End If
|
||||
|
||||
If ActualizarDocumentacion Then
|
||||
|
||||
_formato = GuardarArchivo(CveDocumentacion)
|
||||
If objRH.DocumentacionUpdate(CveDocumentacion, Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, ChkAplicaDiasLimite.Checked, ChkAplicaFechaVencimiento.Checked, UsuarioActual.Empresa.CveEmpresa,
|
||||
TxtPeriodicidad.Text.ToEntero) Then
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAgregarDocumentacion"))
|
||||
Alert("Documento Actualizado correctamente.", TipoMensaje.MsgInformacion)
|
||||
CargaDocumentacion()
|
||||
End If
|
||||
|
||||
Else
|
||||
If objRH.DocumentacionAdd(Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, ChkAplicaDiasLimite.Checked, ChkAplicaFechaVencimiento.Checked, UsuarioActual.Empresa.CveEmpresa, TxtPeriodicidad.Text.ToEntero) Then
|
||||
|
||||
CveDocumentacion = objRH.DtResultados(0)(0).ToString.ToEntero
|
||||
_formato = GuardarArchivo(CveDocumentacion)
|
||||
If objRH.DocumentacionUpdate(CveDocumentacion, Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, ChkAplicaDiasLimite.Checked, ChkAplicaFechaVencimiento.Checked, UsuarioActual.Empresa.CveEmpresa,
|
||||
TxtPeriodicidad.Text.ToEntero) Then
|
||||
|
||||
End If
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAgregarDocumentacion"))
|
||||
Alert("Documento agregado correctamente.", TipoMensaje.MsgInformacion)
|
||||
CargaDocumentacion()
|
||||
End If
|
||||
End If
|
||||
|
||||
ActualizarDocumentacion = False
|
||||
End Using
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
<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">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Compuesto" ItemStyle-Width="20%" HeaderText="Conductor" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="20%" HeaderText="Vencimiento Licencia" ItemStyle-HorizontalAlign="center" />
|
||||
<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="Fecha Ing" ItemStyle-HorizontalAlign="center" />
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblEstatus" runat="server" Text=""></asp:Label>
|
||||
|
||||
@@ -1137,8 +1137,7 @@
|
||||
<div class="modal-footer">
|
||||
<div class="row">
|
||||
<div class="col-md-2" style="text-align: left">
|
||||
|
||||
<asp:LinkButton ID="LbDescargarExcelConceptos" runat="server" CssClass="btn btn-warning" Text="Descargar Plantilla" />
|
||||
<asp:LinkButton ID="LbDescargarExcelConceptos" OnClick="LbDescargarExcelConceptos_Click" runat="server" CssClass="btn btn-warning" Text="Descargar Plantilla" />
|
||||
|
||||
</div>
|
||||
<div class="col-md-10" style="text-align: center">
|
||||
|
||||
@@ -4934,6 +4934,41 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
End If
|
||||
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
|
||||
|
||||
'Protected Sub BtnGuardarDocumento_Click(sender As Object, e As EventArgs)
|
||||
@@ -5041,4 +5076,5 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -570,11 +570,13 @@ Partial Class Inventarios_RecepcionUsados
|
||||
DdlMoneda.DataSource = GlobalDTMonedas
|
||||
DdlMoneda.DataBind()
|
||||
|
||||
'Llenar el dropdownlist de almacén
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (22)") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
Dim dtt As DataTable = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (22)") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
|
||||
DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlAlmacen.SelectedValue = "-1"
|
||||
'Llenar el dropdownlist de almacén
|
||||
DdlAlmacen.DataSource = dtt
|
||||
|
||||
'DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
'DdlAlmacen.SelectedValue = "-1"
|
||||
DdlAlmacen.DataBind()
|
||||
|
||||
If IsNothing(Request("CveMovimiento")) Then
|
||||
@@ -2919,6 +2921,11 @@ Partial Class Inventarios_RecepcionUsados
|
||||
'CvePrecioLista = CvePrecioListaPS
|
||||
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))
|
||||
If MarcaPorcentaje IsNot Nothing Then
|
||||
Dim PorcentajeProducto As Decimal = MarcaPorcentaje("PorcentajeProducto").ToString.ToDecimal / 100
|
||||
|
||||
@@ -339,13 +339,15 @@ Partial Class Inventarios_RepAnomalias
|
||||
ImgExcelProdcutosCoinciden.Visible = False
|
||||
LnkDescarExcelGrupos.Visible = True
|
||||
|
||||
GvGrupos.DataSource = dt.FiltraParametros("CvePS > 0")
|
||||
GvGrupos.DataBind()
|
||||
|
||||
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
|
||||
|
||||
If dt IsNot Nothing Then
|
||||
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
|
||||
|
||||
End If
|
||||
GvGrupos.DataBind()
|
||||
|
||||
If DdlGPO.SelectedValue.ToEntero = 1 Then
|
||||
PSIguales()
|
||||
End If
|
||||
|
||||
@@ -460,7 +460,7 @@
|
||||
</table>
|
||||
|
||||
<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>
|
||||
<asp:BoundField HeaderText="#" DataField="No" ItemStyle-Width="23px" />
|
||||
<asp:TemplateField ItemStyle-Width="93px" ItemStyle-HorizontalAlign ="Right">
|
||||
|
||||
@@ -28,7 +28,6 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property CveAlmacenTransitorio As Integer
|
||||
Get
|
||||
Return CType(ViewState("CveAlmacenTransitorio"), Integer)
|
||||
@@ -198,6 +197,10 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
CargaMovimiento(Request("CveEntrada").ToString.ToEntero)
|
||||
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
|
||||
DivCodigoSeriePS.Visible = True
|
||||
Else
|
||||
@@ -221,7 +224,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
|
||||
CantidadTotal = 0
|
||||
CvePS = 0
|
||||
CvePS = 0
|
||||
TipoSeccionAlmacen = 0
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 Then
|
||||
@@ -358,6 +361,59 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
UpMov.Update()
|
||||
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()
|
||||
ChkTransitorio.Checked = 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 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
|
||||
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
|
||||
@@ -945,7 +991,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Lote = If(gvr.DataKey("Lote") = "", "-1", gvr.DataKey("Lote"))
|
||||
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
|
||||
Existencia = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CVeAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||
End If
|
||||
@@ -1249,12 +1295,12 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
RegistraScript(String.Format("AbrirVentana('/General/PopUpPaqueteriasGuias.aspx?CveMovimiento={0}',800,620);", CveMovimientoSalida))
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
|
||||
Dim Correo As String = "jorgegonzalez@compuproveedores.com"
|
||||
If GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {DdlAlmacenDestino.SelectedValue.ToEntero}").ToEntero = 16 Then
|
||||
MandaCorreo(CveMovimientoSalida, Correo)
|
||||
End If
|
||||
End If
|
||||
'If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
|
||||
' Dim Correo As String = "jorgegonzalez@compuproveedores.com"
|
||||
' If GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {DdlAlmacenDestino.SelectedValue.ToEntero}").ToEntero = 16 Then
|
||||
' MandaCorreo(CveMovimientoSalida, Correo)
|
||||
' End If
|
||||
'End If
|
||||
|
||||
LimpiaMovimiento()
|
||||
|
||||
@@ -1769,7 +1815,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(132) = "1" Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(132) = "1" OrElse UsuarioActual.CveEmpresa = 140 Then
|
||||
DivCodigoSeriePSRecepcion.Visible = True
|
||||
Else
|
||||
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. ")
|
||||
|
||||
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)
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -622,6 +622,13 @@
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</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>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
@@ -794,6 +801,7 @@
|
||||
<asp:CheckBox ID="ChkUsuario" runat="server" Text="Usuario" Checked="true" />
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:CheckBox ID="ChkRiesgoPuesto" runat="server" Text="Riesgo de puesto" Checked="false" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -564,6 +564,11 @@ Partial Class RH_CatPersonal
|
||||
Else
|
||||
GvDatos.Columns(42).Visible = False
|
||||
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
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
Imports Extensiones
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Ventas_CatAutorizacionLimites
|
||||
Inherits ClsPaginas
|
||||
@@ -70,7 +69,7 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
If DdlClienteFiltro.SelectedValue.ToEntero() <= 0 Then
|
||||
CveCliente = -1
|
||||
Else
|
||||
CveCliente = DdlClienteFiltro.SelectedValue.ToEntero()
|
||||
CveCliente = DdlClienteFiltro.SelectedValue.ToEntero()
|
||||
End If
|
||||
|
||||
Dim FechaI, FechaF As Date
|
||||
|
||||
@@ -4359,6 +4359,11 @@ Partial Class PV
|
||||
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.CvePromocionDetalle = CvePromocionDetalle
|
||||
If SeAjustoPU Then
|
||||
|
||||
@@ -319,6 +319,16 @@
|
||||
<asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</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>
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" />
|
||||
|
||||
@@ -6,10 +6,10 @@ Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Data
|
||||
|
||||
Partial Class Ventas_RepProductosServicios
|
||||
Inherits ClsPaginas
|
||||
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
|
||||
|
||||
Private Property DtVentas As DataTable
|
||||
Get
|
||||
Return DirectCast(ViewState("DtVentas"), DataTable)
|
||||
@@ -52,27 +52,30 @@ Partial Class Ventas_RepProductosServicios
|
||||
Set(value As Integer)
|
||||
ViewState("TipoCambio") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx")
|
||||
CargarMarcas()
|
||||
SetValues()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531).ToEntero = 1 Then
|
||||
LblLitraje.Visible = True
|
||||
DvLitraje.Visible = True
|
||||
End If
|
||||
|
||||
SetValues()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531).ToEntero = 1 Then
|
||||
LblLitraje.Visible = True
|
||||
DvLitraje.Visible = True
|
||||
'garantia
|
||||
divgarantia1.Visible = True
|
||||
divgarantia2.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " CARGA DATOS INICIALES "
|
||||
|
||||
|
||||
Private Sub CargaGrupo()
|
||||
DdlGrupo.Items.Insert(0, New ListItem("Categoria", "3"))
|
||||
DdlGrupo.Items.Insert(1, New ListItem("Clasificación", "4"))
|
||||
@@ -241,18 +244,19 @@ Partial Class Ventas_RepProductosServicios
|
||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlClientes.DataBind()
|
||||
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveVendedor > 0 AndAlso Not UsuarioActual.TienePermisoProceso(263) Then
|
||||
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString())
|
||||
DdlVendedor.Attributes.Add("disabled", "disabled")
|
||||
DdlVendedor.Enabled = False
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
@@ -279,8 +283,8 @@ Partial Class Ventas_RepProductosServicios
|
||||
DdlPS.SelectedValue.ToEntero, FechaI, FechaF, FechaIEjec, FechaFEjec, CveCliente,
|
||||
DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1",
|
||||
UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante,
|
||||
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveProveedorCompra:=CveProveedorCompra,
|
||||
CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, MostrarLitraje:=ChkLitraje.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable) Then
|
||||
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveProveedorCompra:=CveProveedorCompra,
|
||||
CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, MostrarLitraje:=ChkLitraje.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, EsGarantia:=DdlGarantia.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable) Then
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
DtVentas = ObjVentas.DtResultados
|
||||
Else
|
||||
@@ -302,55 +306,55 @@ Partial Class Ventas_RepProductosServicios
|
||||
DivMarca.Visible = True
|
||||
LblMarca.Visible = True
|
||||
|
||||
Using ObjMarcas As New ClsProductosServicios
|
||||
If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
|
||||
DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados
|
||||
DdlMarcaPSDes.DataBind()
|
||||
End If
|
||||
Using ObjMarcas As New ClsProductosServicios
|
||||
If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
|
||||
DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados
|
||||
DdlMarcaPSDes.DataBind()
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
DdlMarcaPSDes.Items.Insert(0, New ListItem(" Todos ", "-1"))
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " GV DATOS - PERSONALIZAR "
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim Css As String = "Texto"
|
||||
Dim CveClasificacionDetalle As String = "-1"
|
||||
Dim cveMarca As String = DdlMarcaPSDes.SelectedValue
|
||||
If DdlGrupo.SelectedValue.ToEntero = 22 Then
|
||||
Dim tipo As Integer = If(e.Row.DBCampo("CveClasificacionDetalle").ToEntero() > 0, 4, If(e.Row.DBCampo("CveMarca").ToEntero() > 0, 3, If(e.Row.DBCampo("CveClasificacion").ToEntero() > 0, 2, 1)))
|
||||
Select Case tipo
|
||||
Case 4
|
||||
CveClasificacionDetalle = e.Row.DBCampo("CveClasificacionDetalle").ToString() ' String.Format("{0}&CveClasificacionDetalle={1}&CveMarca={2}", squery, e.Row.DBCampo("CveClasificacionDetalle").ToEntero(), e.Row.DBCampo("CveMarca").ToEntero())
|
||||
cveMarca = e.Row.DBCampo("CveMarca").ToString()
|
||||
Case 3
|
||||
'squery = String.Format("{0}&CveMarca{1}", squery, e.Row.DBCampo("CveMarca").ToEntero())
|
||||
cveMarca = e.Row.DBCampo("CveMarca").ToString()
|
||||
e.Row.CssClass = "SubTotalesB"
|
||||
Case 2
|
||||
e.Row.CssClass = "SubTotales"
|
||||
Case 1
|
||||
e.Row.CssClass = "Totales"
|
||||
End Select
|
||||
|
||||
Else
|
||||
If e.Row.DBCampo("Orden") = "" Then
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(0).Width = Unit.Pixel(200)
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(1).Width = Unit.Pixel(60)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(90)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(90)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(80)
|
||||
e.Row.Cells(8).Width = Unit.Pixel(100)
|
||||
e.Row.CssClass = "Totales"
|
||||
Css = "Totales"
|
||||
ElseIf DdlGrupo.SelectedValue.Contiene("20", "21") And Not e.Row.DBCampo("CvePS").ToEntero > 0 Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
If DdlGrupo.SelectedValue.ToEntero = 22 Then
|
||||
Dim tipo As Integer = If(e.Row.DBCampo("CveClasificacionDetalle").ToEntero() > 0, 4, If(e.Row.DBCampo("CveMarca").ToEntero() > 0, 3, If(e.Row.DBCampo("CveClasificacion").ToEntero() > 0, 2, 1)))
|
||||
Select Case tipo
|
||||
Case 4
|
||||
CveClasificacionDetalle = e.Row.DBCampo("CveClasificacionDetalle").ToString() ' String.Format("{0}&CveClasificacionDetalle={1}&CveMarca={2}", squery, e.Row.DBCampo("CveClasificacionDetalle").ToEntero(), e.Row.DBCampo("CveMarca").ToEntero())
|
||||
cveMarca = e.Row.DBCampo("CveMarca").ToString()
|
||||
Case 3
|
||||
'squery = String.Format("{0}&CveMarca{1}", squery, e.Row.DBCampo("CveMarca").ToEntero())
|
||||
cveMarca = e.Row.DBCampo("CveMarca").ToString()
|
||||
e.Row.CssClass = "SubTotalesB"
|
||||
Case 2
|
||||
e.Row.CssClass = "SubTotales"
|
||||
Case 1
|
||||
e.Row.CssClass = "Totales"
|
||||
End Select
|
||||
|
||||
Else
|
||||
If e.Row.DBCampo("Orden") = "" Then
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(0).Width = Unit.Pixel(200)
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(1).Width = Unit.Pixel(60)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(90)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(90)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(80)
|
||||
e.Row.Cells(8).Width = Unit.Pixel(100)
|
||||
e.Row.CssClass = "Totales"
|
||||
Css = "Totales"
|
||||
ElseIf DdlGrupo.SelectedValue.Contiene("20", "21") And Not e.Row.DBCampo("CvePS").ToEntero > 0 Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
End If
|
||||
|
||||
' PARA LIGA
|
||||
@@ -413,10 +417,10 @@ Partial Class Ventas_RepProductosServicios
|
||||
End If
|
||||
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " SELECTED INDEX CHANGED"
|
||||
Protected Sub DdlClienteClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaClientes()
|
||||
@@ -468,8 +472,8 @@ Partial Class Ventas_RepProductosServicios
|
||||
If DdlTipoComprobante.SelectedValue <> "-1" Then
|
||||
DdlEstatus.DataSource = GlobalDTEstatusFactura.FiltraParametros(String.Format("TipoDocto = '{0}'", DdlTipoComprobante.SelectedValue))
|
||||
Else
|
||||
DdlEstatus.DataSource = GlobalDTEstatusFactura
|
||||
|
||||
DdlEstatus.DataSource = GlobalDTEstatusFactura
|
||||
|
||||
End If
|
||||
DdlEstatus.Items.Add(New ListItem("Todos", "-1"))
|
||||
DdlEstatus.DataBind()
|
||||
@@ -487,10 +491,10 @@ Partial Class Ventas_RepProductosServicios
|
||||
LiEspecifico.Visible = False
|
||||
End If
|
||||
UpBodyTipoCambio.Update()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " IMPRIMIR "
|
||||
Protected Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
|
||||
If GvDatos.Rows.Count > 0 Then
|
||||
@@ -507,21 +511,21 @@ Partial Class Ventas_RepProductosServicios
|
||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.ToDate, MinFecha)
|
||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
|
||||
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.ToDate, MinFecha)
|
||||
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.ToDate, MaxFecha)
|
||||
|
||||
Dim Cliente = If(DdlClientes.SelectedText = "", "", $" <b>Cliente:</b> {DdlClientes.SelectedText}")
|
||||
Dim Proveedor = If(DdlProveedor.SelectedValue = "", "", $" <b>Proveedor:</b> {DdlProveedor.SelectedText}")
|
||||
Dim FechaInicio = If(txtFechaI.Text = "", "", $" <b>Fecha Inicio:</b> {txtFechaI.Text}")
|
||||
Dim FechaFin = If(txtFechaF.Text = "", "", $" <b>Fecha Fin:</b> {txtFechaF.Text}")
|
||||
Dim Grupo = If(DdlGrupo.SelectedValue = "-1", "", $" <b>Agrupado por:</b> {DdlGrupo.SelectedItem.Text}")
|
||||
Dim Categoria = If(DdlCategoria.SelectedValue = "-1", "", $" <b>Categoria:</b> {DdlCategoria.SelectedItem.Text }")
|
||||
Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificación:</b> {DdlClasificacion.SelectedItem.Text}")
|
||||
Dim PS = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S.:</b> {DdlPS.SelectedText}")
|
||||
Dim Proyecto = If(DdlSubProyecto.SelectedValue = "-1", "", $" <b>Proyecto:</b> {DdlSubProyecto.SelectedItem.Text}")
|
||||
Dim Estatus = If(DdlEstatus.SelectedValue = "-1", "", $" <b>Estatus:</b> {DdlEstatus.SelectedItem.Text}")
|
||||
Dim Usuario = If(DdlUsuario.SelectedValue = "-1", "", $" <b>Usuario:</b> {DdlUsuario.SelectedItem.Text}")
|
||||
|
||||
|
||||
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.ToDate, MaxFecha)
|
||||
|
||||
Dim Cliente = If(DdlClientes.SelectedText = "", "", $" <b>Cliente:</b> {DdlClientes.SelectedText}")
|
||||
Dim Proveedor = If(DdlProveedor.SelectedValue = "", "", $" <b>Proveedor:</b> {DdlProveedor.SelectedText}")
|
||||
Dim FechaInicio = If(txtFechaI.Text = "", "", $" <b>Fecha Inicio:</b> {txtFechaI.Text}")
|
||||
Dim FechaFin = If(txtFechaF.Text = "", "", $" <b>Fecha Fin:</b> {txtFechaF.Text}")
|
||||
Dim Grupo = If(DdlGrupo.SelectedValue = "-1", "", $" <b>Agrupado por:</b> {DdlGrupo.SelectedItem.Text}")
|
||||
Dim Categoria = If(DdlCategoria.SelectedValue = "-1", "", $" <b>Categoria:</b> {DdlCategoria.SelectedItem.Text }")
|
||||
Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificación:</b> {DdlClasificacion.SelectedItem.Text}")
|
||||
Dim PS = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S.:</b> {DdlPS.SelectedText}")
|
||||
Dim Proyecto = If(DdlSubProyecto.SelectedValue = "-1", "", $" <b>Proyecto:</b> {DdlSubProyecto.SelectedItem.Text}")
|
||||
Dim Estatus = If(DdlEstatus.SelectedValue = "-1", "", $" <b>Estatus:</b> {DdlEstatus.SelectedItem.Text}")
|
||||
Dim Usuario = If(DdlUsuario.SelectedValue = "-1", "", $" <b>Usuario:</b> {DdlUsuario.SelectedItem.Text}")
|
||||
|
||||
|
||||
If DtVentas IsNot Nothing AndAlso DtVentas.Rows.Count > 0 Then
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
@@ -531,7 +535,7 @@ Partial Class Ventas_RepProductosServicios
|
||||
params.Add(New ReportParameter("FechaFin", If(txtFechaF.Text <> "", FechaF.ToShortDateString, "")))
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("Filtros", $"{Grupo}{Cliente}{FechaInicio}{FechaFin}{Categoria}{Clasificacion}{PS}{Proyecto}{Estatus}{Usuario}{Proveedor}"))
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
@@ -543,12 +547,12 @@ Partial Class Ventas_RepProductosServicios
|
||||
Alert("No hay información para mostrar.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "GRAFICA"
|
||||
|
||||
|
||||
Protected Sub LnkVerGrafica_Click(sender As Object, e As EventArgs)
|
||||
If Not DtVentas IsNot Nothing AndAlso DtVentas.Rows.Count > 0 Then
|
||||
Alert("No hay datos disponibles", TipoMensaje.MsgAdvertencia)
|
||||
@@ -678,9 +682,9 @@ Partial Class Ventas_RepProductosServicios
|
||||
|
||||
Protected Sub DdlVer_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CambioGrafica()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -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" />
|
||||
</div>
|
||||
<div class="col-md-1 truncate" id="divgarantia1" runat="server" visible="false">
|
||||
Garantía:
|
||||
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%">
|
||||
|
||||
@@ -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>
|
||||
<ajax:ValidatorCalloutExtender ID="VCENCPS" runat="server" HighlightCssClass="vco" TargetControlID="RFVNCPS" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-3">
|
||||
<asp:Label ID="LblNCSaldoAnticipo" runat="server" Text=""></asp:Label>
|
||||
<asp:CheckBox ID="ChkAplicaNCAnticipo" runat="server" Text="Aplicar a Anticipo" Visible="false" />
|
||||
</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 class="row form-group">
|
||||
<div class="col-md-2">
|
||||
Observaciones:
|
||||
</div>
|
||||
<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 class="row form-group">
|
||||
@@ -6565,22 +6568,12 @@
|
||||
<asp:RangeValidator ID="RVNCPorcentaje" runat="server" Type="Double" MinimumValue="0.01" MaximumValue="100.00" ErrorMessage="El campo <b>''Porcentaje''</b> debe estar entre 1 y el porcentaje máximo de la factura(Saldo)." ControlToValidate="TxtNCPorcentaje" Display="None" ValidationGroup="GrpModalAplicarNC"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCENCPorcentaje" runat="server" HighlightCssClass="vco" TargetControlID="RVNCPorcentaje" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div id="DivBtnRemNC" runat="server" visible="false" class="row form-group">
|
||||
<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">
|
||||
</div>
|
||||
<div class="row" style="margin-right: 10px; margin-top: 5px;" 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;" />
|
||||
<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 class="row" id="DivGvCxC" style="max-height: 10px" runat="server" visible="false">
|
||||
<br />
|
||||
<div class="row" id="DivGvCxC" style="max-height: 5px" runat="server" visible="false">
|
||||
<div class="col-md-12" style="height: 440px; overflow: auto">
|
||||
<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">
|
||||
|
||||
@@ -2469,6 +2469,25 @@ Partial Class Ventas
|
||||
HlFacturasRelaciondas.Visible = True
|
||||
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
|
||||
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
|
||||
'verifica si tiene autorizaciones de Nota de crédito autorizadas
|
||||
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")
|
||||
If RowAutorizacion IsNot Nothing Then
|
||||
DdlTipoComprobante.SelectedValueExistInsert("Egs", "Egresos")
|
||||
@@ -7971,7 +7990,7 @@ Partial Class Ventas
|
||||
Dim CveVendedor As Integer = DdlVendedor.SelectedValue.ToEntero()
|
||||
Dim ObjVentas As New ClsVentas
|
||||
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
|
||||
'SI TIENE DIAS VENCIDOS BUSCAR POR TIPO VENCIMIENTO
|
||||
If TieneDiasVencidos Then
|
||||
@@ -26965,15 +26984,47 @@ Partial Class Ventas
|
||||
Protected Sub BtnAplicarNC_Click(sender As Object, e As EventArgs)
|
||||
'SOLO APLICA SI NO HAY DOCUMENTOS QUE SELECCIONAR
|
||||
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
|
||||
Alert("No se puede generar una nota de crédito para devolución de efectivo si el cliente es distribuidor.", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
Dim Verificacion As Boolean = False
|
||||
|
||||
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
|
||||
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:=" Si ", TextoCancelacion:=" No ")
|
||||
'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:=" Si ", TextoCancelacion:=" No ")
|
||||
End If
|
||||
Else
|
||||
Alert("No se puede Generar notas de crédito directas", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
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
|
||||
Else
|
||||
AplicarNotaCreditoDesdeVenta()
|
||||
@@ -31593,6 +31644,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
ListaRemisionesNC.Add(RemNC)
|
||||
BtnAplicarNC.Enabled = True
|
||||
|
||||
If TerminarCiclo Then
|
||||
Exit For
|
||||
@@ -31636,6 +31688,10 @@ Partial Class Ventas
|
||||
TxtImportesRemisionesNC.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()
|
||||
UpAplicarNC.Update()
|
||||
|
||||
|
||||
@@ -398,6 +398,12 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user