This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2020-09-25 12:19:08 -07:00
26 changed files with 4344 additions and 3257 deletions

View File

@@ -926,7 +926,7 @@ Public Class ClsAcumuladores
Return Retorno
End Function
Public Function DistribuidorMovtosGet(CveCliente As Integer, CveEmpresa As Integer, Optional FechaI As Date = MinFecha, Optional FechaF As Date = MaxFecha) As Boolean
Public Function DistribuidorMovtosGet(CveCliente As Integer, CveEmpresa As Integer, Optional FechaI As Date = MinFecha, Optional FechaF As Date = MaxFecha, Optional CveVentaRNCCargo As Integer = -1) As Boolean
Dim Retorno As Boolean = False
'Data = New DataTable
@@ -937,6 +937,7 @@ Public Class ClsAcumuladores
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@CveVentaRNCCargo", SqlDbType.Int).Value = CveVentaRNCCargo
End With
Try

View File

@@ -253,7 +253,7 @@ Public Class ClsContabilidad
Public Function UpdatePrepolizasDetalle(CvePrePolizaDetalle As Integer, Concepto As String, CveSubProyecto As Integer, IdCtaContable As Integer, TipoMovto As Boolean, ImporteMN As Decimal, Optional CveTipoGasto As Integer = -1,
Optional CveConceptoContable As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCompra As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveCliente As Integer = -1, Optional CveVenta As Integer = -1,
Optional Referencia As String = "-1") As Boolean
Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -274,6 +274,7 @@ Public Class ClsContabilidad
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
End With
Try
@@ -1360,7 +1361,7 @@ Public Class ClsContabilidad
End If
If Not OcurrioError Then
If Not UpdatePrePoliza(Fecha, ObjConta.Folio, CveTipoPoliza, tIdPoliza, CvePrePoliza, Empresa.CveEmpresa) Then
If Not UpdatePrePoliza(Fecha, ObjConta.Folio, CveTipoPoliza, tIdPoliza, CvePrePoliza, Empresa.CveEmpresa, CveUsuarioModifico:=CveUsuario) Then
OcurrioError = True
End If
End If
@@ -1506,7 +1507,8 @@ Public Class ClsContabilidad
End Function
Public Function UpdatePrePoliza(FechaConta As Date, FolioPoliza As Integer, CveTipoPoliza As Integer, IdPoliza As Integer, CvePrePoliza As Integer, CveEmpresa As Integer, Optional Concepto As String = "-1", Optional FechaPoliza As Date = MinFecha, Optional xxx As Integer = -1) As Boolean
Public Function UpdatePrePoliza(FechaConta As Date, FolioPoliza As Integer, CveTipoPoliza As Integer, IdPoliza As Integer, CvePrePoliza As Integer, CveEmpresa As Integer,
Optional Concepto As String = "-1", Optional FechaPoliza As Date = MinFecha, Optional xxx As Integer = -1, Optional CveUsuarioModifico As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -1521,6 +1523,7 @@ Public Class ClsContabilidad
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
.Add("@Concepto", SqlDbType.VarChar).Value = Concepto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
End With
Try

View File

@@ -2410,7 +2410,7 @@ Public Class ClsGenerales
Public Function GetHistorialBitacora(CveAcarreo As Integer, CveOrdenCompra As Integer, CveActivoFijo As Integer,
CveOS As Integer, CvePS As Integer, CveCompra As Integer, CveIE As Integer,
CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional CvePersonal As Integer = -1,
Optional IdPoliza As Integer = -1) As Boolean
Optional IdPoliza As Integer = -1, Optional CvePrePoliza As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_HistorialBitacoraGet")
@@ -2422,6 +2422,7 @@ Public Class ClsGenerales
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
.Add("@CveIE", SqlDbType.Int).Value = CveIE
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal

View File

@@ -319,7 +319,7 @@ Public Class ClsMovimientos
End Function
Public Function GetCxCDetalle(FechaI As String, FechaF As String, CveCliente As Integer, CveSubProyecto As Integer, CveVendedor As Integer, CveUsuario As Integer, Anio As Integer, Mes As Integer,
AnioMes As String, Fecha As String, CveClienteSucursal As Integer, Opcion As String, CveEstatus As Integer, IVA As String, Agrupador As Integer, CveEmpresa As Integer,
AnioMes As String, Fecha As String, CveClienteSucursal As Integer, Opcion As String, CveEstatus As Integer, IVA As String, Agrupador As Integer, CveEmpresa As Integer,
CveResponsable As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1",
Optional FechaVI As String = "-1", Optional FechaVF As String = "1", Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1,
Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional LimiteCredito As Decimal = -1,
@@ -361,10 +361,10 @@ Public Class ClsMovimientos
.Add("@CveCobranzaEstatus", SqlDbType.Int).Value = CveCobranzaEstatus
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
.Add("@LimiteCredito", SqlDbType.Float).Value = LimiteCredito
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@EstatusCliente", SqlDbType.Int).Value = EstatusCliente
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@EstatusCliente", SqlDbType.Int).Value = EstatusCliente
End With
Try
@@ -545,7 +545,7 @@ Public Class ClsMovimientos
Try
Try
SqlAdapter.SelectCommand.CommandTimeout = 0
SqlAdapter.Fill(Data)
@@ -863,8 +863,8 @@ Public Class ClsMovimientos
DataAdapter("PA_Banc_ReporteChequesFYEGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@FechaI", SqlDbType.DateTime).Value = FechaI
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@FechaI", SqlDbType.DateTime).Value = FechaI
.Add("@FechaF", SqlDbType.DateTime).Value = FechaF
End With
@@ -1190,9 +1190,9 @@ Public Class ClsMovimientos
Public Function GetCxPDetalle(FechaI As String, FechaF As String, CveProveedor As Integer, CveProveedorClasificacion As Integer, CveProveedorSucursal As Integer, CveUsuario As Integer,
CveUsuarioResponsable As Integer, Anio As Integer, Mes As Integer, AnioMes As String, CveMoneda As Integer, CveSubProyecto As Integer,
CveEstatusFactura As Integer, Fecha As String, Agrupador As Integer, Opcion As String, CveEmpresa As Integer, CveSucursal As Integer,
TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional FechaVI As String = "-1", Optional FechaVF As String = "1",
Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1, Optional CveTipoProveedor As Integer = -1,
CveEstatusFactura As Integer, Fecha As String, Agrupador As Integer, Opcion As String, CveEmpresa As Integer, CveSucursal As Integer,
TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional FechaVI As String = "-1", Optional FechaVF As String = "1",
Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1, Optional CveTipoProveedor As Integer = -1,
Optional Comprobaciones As Integer = -1, Optional AplicaNC As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -1292,8 +1292,8 @@ Public Class ClsMovimientos
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
.Add("@CveCajaChica", SqlDbType.Int).Value = CveCajaChica
.Add("@NumeroReembolso", SqlDbType.VarChar).Value = NumeroReembolso
.Add("@FechaI", SqlDbType.DateTime).Value = FechaI
.Add("@NumeroReembolso", SqlDbType.VarChar).Value = NumeroReembolso
.Add("@FechaI", SqlDbType.DateTime).Value = FechaI
.Add("@FechaF", SqlDbType.DateTime).Value = FechaF
End With

View File

@@ -5612,6 +5612,7 @@ Namespace Modelos
Public Property RefacturacionGeneroNC As Boolean = False
Public Property Pagado As Decimal
Public Property DescuentoProntoPago As Decimal
Public Property CveVentaRNCCargo As Integer
'Public Property Sucursal As SucursalModel
Public Property SubProyecto As Modelos.SubProyectoModel

View File

@@ -43,6 +43,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
ActualizaPrePoliza(context)
Case "getpersonal"
getpersonal(context)
Case "getcontratos"
GetContratos(context)
Case "GettingCURP"
context.Response.Write(GettingCURP(context.Request("Curp").ToString(), context.Request("year").ToString().ToEntero()))
Case "ValidaCURP"
@@ -1116,4 +1118,38 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Return retorno
End Function
#End Region
#Region "Get Contratos"
Private Function GetContratos(ByVal context As HttpContext) As String
Dim retorno As String = ""
Dim DtRetorno As DataTable = Nothing
Dim usuario As Usuario = UsuarioActual(context)
Dim CveEmpresa As String
If IsNothing(usuario) Then
context.Response.Write("")
Else
CveEmpresa = usuario.CveEmpresa
Dim Name = IfNull(context.Request("Name"), "-1").ToString
Dim dt As DataTable = DirectCast(context.Application("GlobalDTContratos"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
DtRetorno = dt.FiltraParametros(String.Format("NumeroContrato like '%{0}%'", Name))
End If
dt.Dispose()
End If
If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then
DtRetorno.Columns("CveContrato").ColumnName = "id"
DtRetorno.Columns("NumeroContrato").ColumnName = "text"
retorno = JsonConvert.SerializeObject(DtRetorno).ToString
context.Response.Write(retorno)
Else
context.Response.Write("[]")
End If
DtRetorno.Dispose()
Return retorno
End Function
#End Region
End Class

View File

@@ -37,9 +37,6 @@
<li>
<asp:LinkButton ID="LnkAddOtrosGastos" OnClick="LnkAddOtrosGastos_Click" Visible="false" runat="server"><i class="fa fa-plus-circle"></i> Agregar Otros Gastos</asp:LinkButton>
</li>
<li runat="server" visible="false" id="liServicios">
<asp:LinkButton ID="LbServicios" OnClick="LbServicios_Click" runat="server"><i class='fa fa-truck'></i> Gastos y Servicios</asp:LinkButton>
</li>
<li runat="server" visible="false" id="liFletesImportaciones">
<asp:LinkButton ID="LnkFletesImportaciones" runat="server"><i class='fa fa-truck'></i> Costo Indirecto/Importaciones</asp:LinkButton>
</li>
@@ -147,6 +144,17 @@
border: 1px solid black;
width: 85%;
}
.GastoIndirectoOpciones {
margin-left:auto;
margin-right:auto;
width:400px;
}
.GastoIndirectoOpciones td
{
text-align:right /* Or any other value */
}
/*IPP*/
</style>
</asp:Content>
@@ -477,6 +485,7 @@
<asp:ListItem Text="Importación" Value="5"></asp:ListItem>
<asp:ListItem Text="NC Con Productos" Value="6"></asp:ListItem>
<asp:ListItem Text="Apoyo Logístico" Value="9"></asp:ListItem>
<asp:ListItem Text="NC Por Devolución" Value="11"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
@@ -3296,195 +3305,6 @@
</ContentTemplate>
</asp:UpdatePanel>
<%--MODAL VINCULAR FLETES Y SERVICIOS--%>
<asp:UpdatePanel runat="server" class="modal-content rowpadding" UpdateMode="Conditional" ID="UPFS">
<ContentTemplate>
<div id="DivFletesYServicios" class="modal fade">
<div class="modal-dialog">
<div class="modal-content" style="width: 600px;">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
<h3 class="modal-title" runat="server" id="headeralias">Vincular Costo indirectos </h3>
</div>
<div class="modal-body" style="min-height: 300px">
<div class="row" style="align-items: center">
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" style="width: 98%; margin-left: auto; margin-right: auto">
<div class="portlet-title portlet-filterT portletfiltrostitlee">
<div class="tools">
<asp:Button ID="BtnFiltrar" OnClick="BtnFiltrar_Click" runat="server" CausesValidation="true" CssClass=" btn btn-primary " Visible="True" Text="Consultar" ValidationGroup="GrpFiltrar2"></asp:Button>
<%--<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />--%>
</div>
<div class="titlefiltros caption ">
<div class="row">
<div class="col-md-1" style="font-size: medium">Tipo:</div>
<div class="col-md-1" style="width: 200px;">
<asp:DropDownList ID="DdlTipo" AutoPostBack="true" runat="server" Style="width: 200px;" CssClass="form-control input-sm select2me" CausesValidation="true" MaxLength="50" ValidationGroup="GrpFiltrar2" Width="100%">
<%--<asp:ListItem Text="Seleccione" Value="-1" Selected="True" />--%>
<asp:ListItem Text="Una Sola Factura" Value="1" Selected="True" />
<%-- <asp:ListItem Text="Varias Facturas" Value="2" />--%>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTipo" runat="server" ControlToValidate="DdlTipo" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''tipo''</b> es necesario para cargar la Refacturación, por favor seleccione uno." ValidationGroup="GrpFiltrar2"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETipo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipo" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<br />
<asp:UpdatePanel ID="UpGVServicios" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GVServicios" runat="server" AutoGenerateColumns="false"
EmptyDataText="No se encontraron fletes o servicios en la factura" ShowHeaderWhenEmpty="true"
ToolTip="Listado de Unidades de Medida" CssClass="table table-striped table-advance table-hover Widthall
ScrollAD "
data-height="320" Style="text-align: left;" GridLines="None" DataKeyNames="CvePS">
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:CheckBox ID="chkServicios" runat="server"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Consec" ItemStyle-HorizontalAlign="Center" Visible="true">
<ItemTemplate>
<asp:Label ID="LblConsec" Text='<%# Eval("Consec") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Concepto" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlPSmodal" Text='<%# Eval("PS") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlTotalmodal" Text='<%# Eval("Total") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<div style="align-items: center">
<asp:UpdatePanel ID="UpFacturas" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="col-md-5" runat="server" id="dvFacturas" style="width: 60%; margin-left: 20%; margin-right: auto;">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Agregar Facturas</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="expand"></a>
</div>
<div class="portlet-body form">
<table class="Widthall">
<tr>
<td style="width: 50px;">Proveedor:</td>
<td>
<asp:DropDownList runat="server" CssClass="form-control input-sm select2me" ID="DdlProveedores" Style="width: 200px" AutoPostBack="true" DataTextField="RazonSocial" DataValueField="CveProveedor" OnSelectedIndexChanged="DdlProveedores_SelectedIndexChanged"></asp:DropDownList>
</td>
</tr>
<tr>
<td style="width: 50px;">Folio:</td>
<td>
<asp:DropDownList runat="server" CssClass="form-control input-sm select2me" ID="DdlFacturas" Style="width: 200px" AutoPostBack="false" DataTextField="Folio" DataValueField="CveCompra"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVFacturas" runat="server" ControlToValidate="DdlFacturas" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario para cargar la Refacturación, por favor seleccione uno." ValidationGroup="GrpCargaFactura"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEFacturas" runat="server" HighlightCssClass="vco" TargetControlID="RFVFacturas" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<asp:Button Text="Agregar Factura" CssClass="btn btn-primary" ID="BtnAgregaFactura" OnClick="BtnAgregaFactura_Click" ValidationGroup="GrpCargaFactura" runat="server" />
</td>
</tr>
</table>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<asp:UpdatePanel ID="UPGVFacturas" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="false" EmptyDataText="Aun No Registra Facturas" DataKeyNames="CveCompra" ToolTip="Listado de Unidades de Medida" CssClass="table table-striped table-advance table-hover Widthall ScrollAD " data-height="320" Style="text-align: left;" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Folio" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlFolio" Text='<%# Eval("Folio") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlFecha" Text='<%# Eval("Fecha") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Eliminar">
<ItemTemplate>
<asp:LinkButton ID="lbEliminar" runat="server" AlternateText="Eliminar" CausesValidation="False" Style="text-align: left" CommandName="Delete" OnClientClick="return confirm('¿Está seguro de eliminar la factura?')" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="modal-footer">
<asp:Button Text="Continuar" ID="BtnAgregarFlete" runat="server" OnClick="btnAgregarFlete_Click" class="btn default"></asp:Button>
<asp:Button Text="Cancelar" CssClass="btn btn-primary" ID="BtnCancelarFlete" OnClick="BtnCancelar_Click" runat="server" />
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<%-- MODAL SERIE-LOTE ALMACEN --%>
<div id="DivSerie" class="modal fade" role="dialog">
@@ -5016,7 +4836,175 @@
<asp:Label ID="LblTitulo" Text="" runat="server">Costo Indirecto/Importación</asp:Label></h4>
</div>
<div class="modal-body">
<div class="row">
<div class="row" style="border-bottom:1px solid #e5e5e5">
<div class="col-md-1" style="width:100%">
<asp:RadioButtonList ID="RblGastosVincularCrear" runat="server" OnSelectedIndexChanged="RblGastosVincularCrear_Click" AutoPostBack="true" CssClass="GastoIndirectoOpciones" RepeatDirection="Horizontal">
<asp:ListItem Text="Gasto y Servicios" Value="1" />
<asp:ListItem Text="Costo Indirecto/Importaciones" Value="0" selected="True" />
</asp:RadioButtonList>
</div>
</div>
<div runat="server" id="DivGastosyServicios" visible="false">
<%--<div class="row" style="align-items: center">
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" style="width: 98%; margin-left: auto; margin-right: auto">
<div class="portlet-title portlet-filterT portletfiltrostitlee">
<div class="tools">
<asp:Button ID="BtnFiltrar" OnClick="BtnFiltrar_Click" runat="server" CausesValidation="true" CssClass=" btn btn-primary " Visible="True" Text="Consultar" ValidationGroup="GrpFiltrar2"></asp:Button>
<%--<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
</div>
<div class="titlefiltros caption ">
<div class="row">
<div class="col-md-1" style="font-size: medium">Tipo:</div>
<div class="col-md-1" style="width: 200px;">
<asp:DropDownList ID="DdlTipo" AutoPostBack="true" runat="server" Style="width: 200px;" CssClass="form-control input-sm select2me" CausesValidation="true" MaxLength="50" ValidationGroup="GrpFiltrar2" Width="100%">
<%--<asp:ListItem Text="Seleccione" Value="-1" Selected="True" />
<asp:ListItem Text="Una Sola Factura" Value="1" Selected="True" />
<%-- <asp:ListItem Text="Varias Facturas" Value="2" />
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTipo" runat="server" ControlToValidate="DdlTipo" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''tipo''</b> es necesario para cargar la Refacturación, por favor seleccione uno." ValidationGroup="GrpFiltrar2"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETipo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipo" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>--%>
<br />
<asp:UpdatePanel ID="UpGVServicios" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GVServicios" runat="server" AutoGenerateColumns="false"
EmptyDataText="No se encontraron fletes o servicios en la factura" ShowHeaderWhenEmpty="true"
ToolTip="Listado de Unidades de Medida" CssClass="table table-striped table-advance table-hover Widthall
ScrollAD "
data-height="320" Style="text-align: left;" GridLines="None" DataKeyNames="CvePS">
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:CheckBox ID="chkServicios" runat="server"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Consec" ItemStyle-HorizontalAlign="Center" Visible="false">
<ItemTemplate>
<asp:Label ID="LblConsec" Text='<%# Eval("Consec") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Concepto" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Literal ID="LtlPSmodal" Text='<%# Eval("PS") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlTotalmodal" Text='<%# Eval("Total") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<div style="align-items: center">
<asp:UpdatePanel ID="UpFacturas" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="col-md-5" runat="server" id="dvFacturas" style="width: 60%; margin-left: 20%; margin-right: auto;">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Agregar Facturas</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="expand"></a>
</div>
<div class="portlet-body form">
<table class="Widthall">
<tr>
<td style="width: 50px;">Proveedor:</td>
<td>
<asp:DropDownList runat="server" CssClass="form-control input-sm select2me" ID="DdlProveedores" Style="width: 200px" AutoPostBack="true" DataTextField="RazonSocial" DataValueField="CveProveedor" OnSelectedIndexChanged="DdlProveedores_SelectedIndexChanged"></asp:DropDownList>
</td>
</tr>
<tr>
<td style="width: 50px;">Folio:</td>
<td>
<asp:DropDownList runat="server" CssClass="form-control input-sm select2me" ID="DdlFacturas" Style="width: 200px" AutoPostBack="false" DataTextField="Folio" DataValueField="CveCompra"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVFacturas" runat="server" ControlToValidate="DdlFacturas" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario para cargar la Refacturación, por favor seleccione uno." ValidationGroup="GrpCargaFactura"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEFacturas" runat="server" HighlightCssClass="vco" TargetControlID="RFVFacturas" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<asp:Button Text="Agregar Factura" CssClass="btn btn-primary" ID="BtnAgregaFactura" OnClick="BtnAgregaFactura_Click" ValidationGroup="GrpCargaFactura" runat="server" />
</td>
</tr>
</table>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<asp:UpdatePanel ID="UPGVFacturas" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="false" EmptyDataText="Aun No Registra Facturas" DataKeyNames="CveCompra" ToolTip="Listado de Unidades de Medida" CssClass="table table-striped table-advance table-hover Widthall ScrollAD " data-height="320" Style="text-align: left;" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Folio" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlFolio" Text='<%# Eval("Folio") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlFecha" Text='<%# Eval("Fecha") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Eliminar">
<ItemTemplate>
<asp:LinkButton ID="lbEliminar" runat="server" AlternateText="Eliminar" CausesValidation="False" Style="text-align: left" CommandName="Delete" OnClientClick="return confirm('¿Está seguro de eliminar la factura?')" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="row" runat="server" id="DivVincularCrear">
<div class="col-md-12">
<div class="row" runat="server" id="DivActualizarVincular" visible="false" align="center">
<h4>Los cambios se realizaran al dar click en vincular</h4>
@@ -5112,8 +5100,14 @@
</div>
</div>
<div class="modal-footer">
<asp:Button ID="BtnGuardarModalFletesImportaciones" OnClick="BtnGuardarModalFletesImportaciones_Click" runat="server" Text="Vincular" CssClass="btn btn-primary" ValidationGroup="VGMModalIMPFLE" />
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
<div runat="server" id="DivGastosyServiciosFooter" visible="false">
<asp:Button Text="Continuar" ID="BtnAgregarFlete" runat="server" OnClick="btnAgregarFlete_Click" class="btn default"></asp:Button>
<asp:Button Text="Cancelar" CssClass="btn btn-primary" ID="BtnCancelarFlete" data-dismiss="modal" runat="server" />
</div>
<div runat="server" id="DivVincularCrearFooter">
<asp:Button ID="BtnGuardarModalFletesImportaciones" OnClick="BtnGuardarModalFletesImportaciones_Click" runat="server" Text="Vincular" CssClass="btn btn-primary" ValidationGroup="VGMModalIMPFLE" />
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
</div>
</div>
</div>
</ContentTemplate>

View File

@@ -1533,7 +1533,7 @@ Partial Class Compras_Compras
If UsuarioActual.Empresa.CvePlataforma = 2 Then
TabActivosFijos.Visible = False
VerRefacturacion.Visible = False
liServicios.Visible = False
'liServicios.Visible = False
DivConsignaciones.Visible = False
End If
CargarCentrosDeCosto(DdlAsignarProyecto, DdlAsignaSubProyecto, LitHProyecto, LblSubProyectoHeader)
@@ -9545,7 +9545,7 @@ Partial Class Compras_Compras
Retorno = False
End If
If Not ObjContabilidad.UpdatePrePoliza(MinFecha, -1, -1, Nothing, CvePrePoliza, UsuarioActual.CveEmpresa) Then
If Not ObjContabilidad.UpdatePrePoliza(MinFecha, -1, -1, Nothing, CvePrePoliza, UsuarioActual.CveEmpresa, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
Retorno = False
End If
End If
@@ -9987,7 +9987,7 @@ Partial Class Compras_Compras
Retorno = False
End If
If Not ObjContabilidad.UpdatePrePoliza(MinFecha, -1, -1, IdPoliza, CvePrePoliza, UsuarioActual.CveEmpresa) Then
If Not ObjContabilidad.UpdatePrePoliza(MinFecha, -1, -1, IdPoliza, CvePrePoliza, UsuarioActual.CveEmpresa, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
Retorno = False
End If
End If
@@ -14642,7 +14642,7 @@ Partial Class Compras_Compras
dt = ObjContabilidad.DtResultados
For Each dr As DataRow In dt.Rows
If Not ObjContabilidad.UpdatePrepolizasDetalle(dr("CvePrePolizaDetalle").ToString.ToEntero, dr("Concepto").ToString, dr("CveSubProyecto").ToString.ToEntero, dr("IdCtaContable").ToString.ToEntero, CBool(dr("TipoMovto").ToString), 0) Then
If Not ObjContabilidad.UpdatePrepolizasDetalle(dr("CvePrePolizaDetalle").ToString.ToEntero, dr("Concepto").ToString, dr("CveSubProyecto").ToString.ToEntero, dr("IdCtaContable").ToString.ToEntero, CBool(dr("TipoMovto").ToString), 0, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorCancelar = True : Exit For
End If
Next
@@ -15892,71 +15892,71 @@ Partial Class Compras_Compras
End Sub
Protected Sub BtnFiltrar_Click(sender As Object, e As EventArgs)
If DdlTipo.SelectedValue.ToEntero = 1 Then
'POR SI LLEGARA A TRONAR
If DtServicios Is Nothing Then CreaDTServicios()
DtServicios.Rows.Clear()
'POR SI LLEGARA A TRONAR
If DtServicios Is Nothing Then CreaDTServicios()
DtServicios.Rows.Clear()
Dim objps As New ClsProductosServicios
Dim dr As DataRow
dvFacturas.Visible = False
GvFacturas.Visible = False
Dim objps As New ClsProductosServicios
Dim dr As DataRow
dvFacturas.Visible = False
GvFacturas.Visible = False
For Each DrGv As DataRow In TmpDT.Rows
If DrGv("CvePS").ToString.ToEntero > 0 Then
If objps.GetPS(DrGv("CvePS").ToString.ToEntero, -1, UsuarioActual.CveEmpresa) Then
If objps.DtResultados(0)("CveTipoPS").ToString.ToEntero = 1 Then
dr = DtServicios.NewRow()
dr("Consec") = DrGv("Consec").ToString.ToEntero
dr("Total") = DrGv("Total").ToString.ToDecimal
dr("CvePS") = DrGv("CvePS").ToString.ToEntero
dr("PS") = DrGv("PS").ToString
DtServicios.Rows.Add(dr)
End If
For Each DrGv As DataRow In TmpDT.Rows
If DrGv("CvePS").ToString.ToEntero > 0 Then
If objps.GetPS(DrGv("CvePS").ToString.ToEntero, -1, UsuarioActual.CveEmpresa) Then
If objps.DtResultados(0)("CveTipoPS").ToString.ToEntero = 1 Then
dr = DtServicios.NewRow()
dr("Consec") = DrGv("Consec").ToString.ToEntero
dr("Total") = DrGv("Total").ToString.ToDecimal
dr("CvePS") = DrGv("CvePS").ToString.ToEntero
dr("PS") = DrGv("PS").ToString
DtServicios.Rows.Add(dr)
End If
End If
Next
'[IPP] COMENTADO - MIRAS DE ELIMINAR - 8/FEBRERO/2018
'For Each gvr As GridViewRow In GvPS.Rows
' If objps.GetPS(gvr.DataKey("CvePS").ToEntero, -1, UsuarioActual.CveEmpresa) Then
' If objps.DtResultados(0)("CveTipoPS").ToString.ToEntero = 1 Then
' dr = DtServicios.NewRow()
' dr("Consec") = gvr.FCLabel("LtlConsecutivo").Text.ToEntero
' dr("Total") = gvr.FCLiteral("LtlTotal").Text.ToDecimal
' dr("PS") = gvr.DataKey("PS").ToString
' DtServicios.Rows.Add(dr)
' End If
' End If
'Next
objps.Dispose()
If DtServicios.Rows.Count > 0 Then
GVServicios.DataSource = DtServicios
GVServicios.DataBind()
GVServicios.Visible = True
Else
GVServicios.DataSource = Nothing
GVServicios.DataBind()
End If
Next
UpGVServicios.Update()
UpFacturas.Update()
UPGVFacturas.Update()
ElseIf DdlTipo.SelectedValue.ToEntero = 2 Then
GVServicios.Visible = False
dvFacturas.Visible = True
DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedores.DataBind()
DdlProveedores.Items.Insert(0, New ListItem("Seleccione", "-1"))
UpFacturas.Update()
UpGVServicios.Update()
'[IPP] COMENTADO - MIRAS DE ELIMINAR - 8/FEBRERO/2018
'For Each gvr As GridViewRow In GvPS.Rows
' If objps.GetPS(gvr.DataKey("CvePS").ToEntero, -1, UsuarioActual.CveEmpresa) Then
' If objps.DtResultados(0)("CveTipoPS").ToString.ToEntero = 1 Then
' dr = DtServicios.NewRow()
' dr("Consec") = gvr.FCLabel("LtlConsecutivo").Text.ToEntero
' dr("Total") = gvr.FCLiteral("LtlTotal").Text.ToDecimal
' dr("PS") = gvr.DataKey("PS").ToString
' DtServicios.Rows.Add(dr)
' End If
' End If
'Next
objps.Dispose()
If DtServicios.Rows.Count > 0 Then
GVServicios.DataSource = DtServicios
GVServicios.DataBind()
GVServicios.Visible = True
Else
GVServicios.DataSource = Nothing
GVServicios.DataBind()
End If
UpGVServicios.Update()
UpFacturas.Update()
UPGVFacturas.Update()
'If DdlTipo.SelectedValue.ToEntero = 1 Then
'ElseIf DdlTipo.SelectedValue.ToEntero = 2 Then
' GVServicios.Visible = False
' dvFacturas.Visible = True
' DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
' DdlProveedores.DataBind()
' DdlProveedores.Items.Insert(0, New ListItem("Seleccione", "-1"))
' UpFacturas.Update()
' UpGVServicios.Update()
'End If
End Sub
Public Sub btnAgregarFlete_Click(sender As Object, e As EventArgs) Handles BtnAgregarFlete.Click
@@ -16212,7 +16212,7 @@ Partial Class Compras_Compras
End If
If UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.CvePlataforma <> 2 Then
liServicios.Visible = True
'liServicios.Visible = True
liFletesImportaciones.Visible = True
End If
@@ -20040,6 +20040,17 @@ Partial Class Compras_Compras
End If
End Sub
Protected Sub RblGastosVincularCrear_Click(sender As Object, e As EventArgs)
Dim MostrarGastosServicios As Boolean = RblGastosVincularCrear.SelectedValue = "1"
DivGastosyServicios.Visible = MostrarGastosServicios
DivGastosyServiciosFooter.Visible = MostrarGastosServicios
DivVincularCrear.Visible = Not MostrarGastosServicios
DivVincularCrearFooter.Visible = Not MostrarGastosServicios
End Sub
End Class

View File

@@ -1143,7 +1143,7 @@ Partial Class RegPoliza
End If
End If
If Not ObjContabilidad.UpdatePrePoliza(TxtFechaPoliza.Text.ToDate, TxtNumeroPoliza.Text.ToEntero, DdlTipoPoliza.SelectedValue.ToEntero, IDPoliza, CvePrePoliza, UsuarioActual.CveEmpresa, TxtConcepto.Text.Trim, TxtFechaPoliza.Text.ToDate) Then
If Not ObjContabilidad.UpdatePrePoliza(TxtFechaPoliza.Text.ToDate, TxtNumeroPoliza.Text.ToEntero, DdlTipoPoliza.SelectedValue.ToEntero, IDPoliza, CvePrePoliza, UsuarioActual.CveEmpresa, TxtConcepto.Text.Trim, TxtFechaPoliza.Text.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
OcurrioError = True
End If

View File

@@ -497,6 +497,42 @@
</td>
</tr>
</table>
<asp:UpdatePanel runat="server" ID="UpBitacora" UpdateMode="Conditional">
<ContentTemplate>
<div class="row">
<div class="col-md-12">
<div class="portlet light bordered xspadding">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Historial de Modificación</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
</div>
<div class="portlet-body">
<asp:GridView ID="GvBitacora" runat="server" GridLines="None" Width="100%" CssClass="table table-striped table-advance table-hover Widthall ADSCroll mysmallbtn" CellSpacing="0" AutoGenerateColumns="False">
<Columns>
<asp:TemplateField>
<HeaderTemplate>Fecha</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="ConceptoHistorialBitacora" HeaderText="Campo" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Anterior" HeaderText="Anterior" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Actual" HeaderText="Actual" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />
</Columns>
</asp:GridView>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div id="DivContadoModal" align="center" class="modal ADS fade" role="dialog">
<div class="modal-dialog" style="width: 450px;">

View File

@@ -209,6 +209,7 @@ Partial Class ContabilidadC_RegPrePoliza
ViewState("CvePrePoliza") = Request("CvePrePoliza").ToEntero
CreaDT()
CargaPrePoliza()
CargaGvBitacora()
If IfNull(Request("Tipo"), "").ToString <> "NOMPROV" Then
GvPrePoliza.Columns(4).Visible = False
GvConcepto.Columns(4).Visible = False
@@ -463,9 +464,10 @@ Partial Class ContabilidadC_RegPrePoliza
End If
End If
CargaGvBitacora()
ObjContabilidad.Dispose()
UpPoliza.Update()
UpBitacora.Update()
End Sub
Private Sub GvPrePoliza_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvPrePoliza.RowDataBound
@@ -536,7 +538,7 @@ Partial Class ContabilidadC_RegPrePoliza
End Sub
Private Sub DdlConceptosContables_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContables.SelectedIndexChanged
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(5, 17, 201, 206, 14, 15, 16, 19, 25, 26, 21) Then
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(5, 17, 201, 205, 206, 14, 15, 16, 19, 25, 26, 21) Then
CargaProveedores()
DdlProveedores.Visible = True
DdlCompras.Visible = True
@@ -1011,7 +1013,7 @@ Partial Class ContabilidadC_RegPrePoliza
If ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate) Then
If ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
@@ -1019,7 +1021,7 @@ Partial Class ContabilidadC_RegPrePoliza
If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then
If Not ObjContabilidad.UpdatePrepolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCTextBox("TxtConcepto").Text, row.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero,
row.FCDropDownList("DdlCtaContable").SelectedValue.ToEntero, If(row.FCTextBox("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCTextBox("TxtCargo").Text.ToDecimal <> 0,
row.FCTextBox("TxtCargo").Text.ToDecimal, row.FCTextBox("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero, row.DataKey("CveTipoGasto").ToEntero)) Then
row.FCTextBox("TxtCargo").Text.ToDecimal, row.FCTextBox("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero, row.DataKey("CveTipoGasto").ToEntero), CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
OcurrioError = True
Exit For
End If
@@ -1643,5 +1645,15 @@ Partial Class ContabilidadC_RegPrePoliza
End If
ObjCompras.Dispose()
End Sub
Private Sub CargaGvBitacora()
' COMENTADO POR IPP PARA SUBIR 5 ABRIL 2017
Dim ObjGral As New ClsGenerales()
If ObjGral.GetHistorialBitacora(-1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa, CvePrePoliza:=CvePrePoliza) Then
GvBitacora.DataSource = ObjGral.DtResultados
GvBitacora.DataBind()
End If
ObjGral.Dispose()
End Sub
End Class

View File

@@ -926,7 +926,7 @@ Partial Class ContabilidadC_RegPrePoliza
Dim ObjContabilidad As New ClsContabilidad
ObjContabilidad.IniciaTransacSQL()
ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate)
ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario)
For Each row As GridViewRow In GvPrePoliza.Rows
If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then
@@ -934,7 +934,7 @@ Partial Class ContabilidadC_RegPrePoliza
row.DataKey("IdCtaContable").ToEntero, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero,
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text) Then
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
OcurrioError = True
Exit For
End If

View File

@@ -914,7 +914,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim ObjContabilidad As New ClsContabilidad
ObjContabilidad.IniciaTransacSQL()
ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate)
ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario)
For Each row As GridViewRow In GvPrePoliza.Rows
If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then
@@ -922,7 +922,7 @@ Partial Class ContabilidadC_RegPrePolizaS
row.DataKey("IdCtaContable").ToEntero, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero,
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text) Then
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
OcurrioError = True
Exit For
End If

File diff suppressed because it is too large Load Diff

View File

@@ -1199,13 +1199,16 @@ Partial Class Contratos_Default
GvFianzas.DataBind()
UpGvFianzas.Update()
End Sub
End Sub
#End Region
#Region " GUARDAR "
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
Dim ObjContratos As New ClsContratos
Dim ObjInventarios As New ClsInventarios(ObjContratos.IniciaTransacSQL)
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
If DdlContratista.SelectedValue.ToEntero = -1 And DdlCliente.SelectedValue.ToEntero = -1 Then
Alert("Debe seleccionar con quién está haciendo el contrato. Proveedor o Cliente", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim TieneError = False
Dim Modificado = False
@@ -1221,21 +1224,30 @@ Partial Class Contratos_Default
Maximo = txtMaximo.Text.ToDouble
Total = TxtTotal.Text.ToDouble
If DdlTipoContrato.SelectedValue = "25" AndAlso DdlPeriodo.SelectedValue.ToEntero() <= 0 Then
Alert("Debe seleccionar el periodo de facturación.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If DdlMoneda.SelectedIndex > 0 Then
If TxtTipoCambio.Text.Trim.Length = 0 Or TxtTipoCambio.Text.Trim.ToDouble = 0.0 Then
Alert("Cuando seleccione una moneda diferente a peso debe especificar el tipo de cambio.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
'Crear Contrato
If Not CveContrato > 0 Then
End If
If CveContrato > 0 Then
If DdlContratista.SelectedValue.ToEntero = -1 And DdlCliente.SelectedValue.ToEntero = -1 Then
Alert("Debe seleccionar con quién está haciendo el contrato. Proveedor o Cliente", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
End If
Dim ObjContratos As New ClsContratos
Dim ObjInventarios As New ClsInventarios(ObjContratos.IniciaTransacSQL)
'Crear Contrato
If Not CveContrato > 0 Then
CveContrato = ObjContratos.AddContratos(TxtNumeroContrato.Text, TxtDescripcionContrato.Text, TxtNumeroLicitacion.Text.Trim, DdlContratista.SelectedValue.ToEntero, DdlCliente.SelectedValue.ToEntero, -1, TxtFechaInicial.Text.ToDate, TxtFechaFinal.Text.ToDate,
TxtUbicacion.Text, TxtResponsable.Text, DdlSubProyectoContrato.SelectedValue.ToEntero, TxtPorIVA.Text.ToDouble, TxtPorAnticipo.Text.ToDouble, TxtPorAmortizacionAnticipo.Text.ToDouble,
@@ -1323,18 +1335,9 @@ Partial Class Contratos_Default
TieneError = True
End If
Else
Modificado = True
If DdlContratista.SelectedValue.ToEntero = -1 And DdlCliente.SelectedValue.ToEntero = -1 Then
Alert("Debe seleccionar con quién está haciendo el contrato. Proveedor o Cliente", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim ArchivoUpdate As String = "-1"
If Session("FileExtension").ToString <> "" Then
@@ -1433,16 +1436,8 @@ Partial Class Contratos_Default
End If
End If
'If Not TieneError Then
' TieneError = GuardarAlmacen(ObjInventarios)
'End If
If TieneError Then
ObjContratos.RollBack()
Else
@@ -1461,12 +1456,11 @@ Partial Class Contratos_Default
End If
UpGral.Update()
ObjContratos.Dispose()
End Sub
End Sub
#End Region
#Region " ELIMINAR "
Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs) Handles BtnEliminar.Click
Dim objContratos As New ClsContratos

View File

@@ -34,14 +34,11 @@
<div class="titlefiltros caption ">
<ul class="list-inline" style="font-size: 12px;">
<li>Cliente:
<asp:DropDownList ID="DdlCliente" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" CssClass="form-control input-sm select2me" Style="width: 250px !important;">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
<ADS:Dropdownlost ID="DdlCliente" runat="server" Width="230px" CssStyle="width: 100%;" UsaWebService="true" AppendDataBoundItems="true" CssClass="select2me" data-metodo="getcliente" DataTextField="NombreComercial" DataValueField="CveCliente"></ADS:Dropdownlost>
</li>
<li>Contrato:
<asp:DropDownList ID="DdlContrato" Width="230px" AppendDataBoundItems="true" runat="server" DataTextField="NumeroContrato" DataValueField="CveContrato" CssClass="form-control input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
<ADS:Dropdownlost ID="DdlContrato" runat="server" Width="230px" CssStyle="width: 100%;" UsaWebService="true" AppendDataBoundItems="true" CssClass="select2me" data-metodo="getcontratos" DataTextField="NumeroContrato" DataValueField="CveContrato">
</ADS:Dropdownlost>
</li>
<li>
Sucursal:

View File

@@ -111,8 +111,9 @@ Partial Class Contratos_FacturacionMasiva
If Not IsPostBack Then
FolioVigentes = False
CargaCombos()
txtFechaI.Text = DateTime.Today.ToString("d")
txtFechaF.Text = DateTime.Today.ToString("d")
Dim FechaRef = DateTime.Now
txtFechaI.Text = $"01/{FechaRef.Month}/{FechaRef.Year}"
txtFechaF.Text = txtFechaI.Text.ToDate().AddMonths(1).ToString("dd/MM/yyyy")
CargaDatos(-1, -1)
CreaDTVentas()
Mensaje = ""
@@ -131,11 +132,44 @@ Partial Class Contratos_FacturacionMasiva
ValidaFolio()
Dim ObjContratos As New ClsContratos
If ObjContratos.CicloComercialGet(CveContrato, CveCliente, -1, UsuarioActual.CveEmpresa, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime, DdlSucursal.SelectedValue.ToEntero) Then
DTCicloComercial = ObjContratos.DtResultados().FiltraParametros($"FueFacturado = 0")
GvCiclosComerciales.DataSource = DTCicloComercial
End If
ObjContratos.Dispose()
Try
If ObjContratos.CicloComercialGet(CveContrato, CveCliente, -1, UsuarioActual.CveEmpresa, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime, DdlSucursal.SelectedValue.ToEntero) Then
DTCicloComercial = ObjContratos.DtResultados.Clone
For Each Row As DataRow In ObjContratos.DtResultados().FiltraParametros($"FueFacturado = 0").Rows
If Row("Observaciones").ToString().Contains("{DIA}") Then
Row("Observaciones") = Row("Observaciones").ToString().Replace("{DIA}", DateTime.Now.Day.ToString())
End If
If Row("Observaciones").ToString().Contains("{MES}") Then
Dim fecha As DateTime = DateTime.Now
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
Row("Observaciones") = Row("Observaciones").ToString().Replace("{MES}", nombreMes)
End If
If Row("Observaciones").ToString().Contains("{AÑO}") Then
Row("Observaciones") = Row("Observaciones").ToString().Replace("{AÑO}", DateTime.Now.Year.ToString())
End If
If Row("Observaciones").ToString().Contains("{TC}") Then
Row("Observaciones") = Row("Observaciones").ToString().Replace("{TC}", GlobalTipoCambio(Now).FormatoNumero)
End If
DTCicloComercial.Rows.Add(Row.ItemArray)
Next
End If
Catch ex As Exception
DTCicloComercial = Nothing
OnError("Ocurrió un error al obtener las facturas a realizar", ex)
End Try
ObjContratos.Dispose()
GvCiclosComerciales.DataSource = DTCicloComercial
GvCiclosComerciales.DataBind()
UpGv.Update()
End Sub
@@ -174,14 +208,9 @@ Partial Class Contratos_FacturacionMasiva
Dim sb As New StringBuilder()
For Each row As GridViewRow In GvCiclosComerciales.Rows
If row.FCCheckBox("chkDis").Checked Then
Dim fecha As DateTime = DateTime.Now ', row.DataKey("FechaVenc").ToString.ToDateTime()
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
If row.FCCheckBox("chkDis").Checked Then
Dim Etiqueta As String = String.Format("{0} - {1}", nombreMes, fecha.Year)
Dim Resp = EmitirImprimir(row.DataKey("CveCicloComercial").ToString.ToEntero, Etiqueta)
Dim Resp = EmitirImprimir(row.DataKey("CveCicloComercial").ToString.ToEntero)
For Each Msg In Resp.Mensajes
sb.AppendFormat("{0}</br></br>", Msg)
@@ -212,10 +241,10 @@ Partial Class Contratos_FacturacionMasiva
EjecutarFacturacion()
End Sub
Private Function EmitirImprimir(pCveCicloComercial As Integer, Etiqueta As String) As Modelos.Factura.MMensajeFactura
Private Function EmitirImprimir(pCveCicloComercial As Integer) As Modelos.Factura.MMensajeFactura
Dim Resp As New Modelos.Factura.MMensajeFactura
ViewState("CveCicloComercial") = pCveCicloComercial
CreaObjetosVenta(Etiqueta)
CreaObjetosVenta()
If ObjFactura Is Nothing Or ObjFactura.Cliente Is Nothing Then
Alert("Ocurrió un error al procesar los datos de la Venta.", TipoMensaje.MsgError)
ObjFactura = Nothing
@@ -438,7 +467,7 @@ Partial Class Contratos_FacturacionMasiva
TmpDT.Columns.Add("CveTamaño", GetType(Integer))
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
End Sub
Private Sub CreaObjetosVenta(Etiqueta As String, Optional VistaPrevia As Boolean = False)
Private Sub CreaObjetosVenta(Optional VistaPrevia As Boolean = False)
Dim ObjFolios As New ClsGralFolios()
Dim Folio As String = ""
Dim Serie As String = ""
@@ -472,7 +501,7 @@ Partial Class Contratos_FacturacionMasiva
ObjFactura.MetodoPago = "Efectivo"
ObjFactura.FechaPago = DateTime.Today
ObjFactura.MotivoDescuento = ""
ObjFactura.Observaciones = Etiqueta + " " + TxtObservaciones.Text + " " + DR("Observaciones").ToString
ObjFactura.Observaciones = TxtObservaciones.Text + " " + DR("Observaciones").ToString
ObjFactura.FechaEjecucion = DateTime.Today
'ObjFactura.ClaveMetodoPagoSAT = GlobalDTMetodosPago.FiltroPrimeroValor("ClaveSAT", $"CveMetodoPago = {1}")
ObjFactura.UsuarioCreo = UsuarioActual.Usuario
@@ -553,9 +582,9 @@ Partial Class Contratos_FacturacionMasiva
DtR("CodigoPS") = row("CodigoPS")
DtR("SATClaveProdServ") = row("SATClaveProdServ")
DtR("NoIdentificacion") = row("NoIdentificacion")
DtR("CveTipoPS") = DrPS("CveTipoPS")
DtR("CveTipoInvPS") = DrPS("Inv_CveMetodoInventario")
DtR("Obs") = Etiqueta + " " + TxtObservaciones.Text + " " + row("Observacion").ToString
DtR("CveTipoPS") = drPS("CveTipoPS")
DtR("CveTipoInvPS") = drPS("Inv_CveMetodoInventario")
DtR("Obs") = TxtObservaciones.Text + " " + row("Observacion").ToString
DtR("PU") = row("PU")
DtR("IVA") = row("PorcentajeIVA")
DtR("PorcentajeIVA") = row("PorcentajeIVA")

View File

@@ -1,4 +1,4 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="EntregaAlmacen.aspx.vb" Inherits="Inventarios_EntregaAlmacen" %>
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="EntregaAlmacen.aspx.vb" Inherits="Inventarios_EntregaAlmacen" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>

View File

@@ -346,6 +346,11 @@ Partial Class Inventarios_ResguardoMaterial
ThSerie.Visible = True
TrSerie.Visible = True
TxtnSerie.Visible = True
Else
ThSerie.Visible = False
TrSerie.Visible = False
TxtnSerie.Visible = False
TxtnSerie.Text = ""
End If
'activa seccion
@@ -368,13 +373,19 @@ Partial Class Inventarios_ResguardoMaterial
If CBool(drp("AplicaLote")) Then
ThLote.Visible = True
TrLote.Visible = True
'TxtLote.Visible = True
Else
ThLote.Visible = False
TrLote.Visible = False
TxtLote.Text = ""
End If
'activa caducidad
If CBool(drp("AplicaCaducidad")) Then
ThCaducidad.Visible = True
TrCaducidad.Visible = True
'TxtCaducidad.Visible = True
Else
ThCaducidad.Visible = False
TrCaducidad.Visible = False
TxtCaducidad.Text = ""
End If
Else

View File

@@ -164,7 +164,7 @@
</div>
</div>
<div id="DivGastoIndirecto" style="display: none;" class="rowpadding">
<div id="DivTransitorio2" class="rowpadding" runat="server" visible="false">
<div class="row">
<asp:Label AssociatedControlID="TxtGastoIndirecto" Visible="false" id="LblGastoIndirecto" runat="server" Text="Gasto Indirecto:" CssClass="col-md-2"></asp:Label>

View File

@@ -204,7 +204,10 @@ Partial Class Inventarios_TraspasoAlmacen
Else
DivCodigoSeriePS.Visible = False
End If
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(0);$('#DivGastoIndirecto').show(0);$('#DivDocChofer').show(0);")
If ChkTransitorio.Checked Then
RegistraScript("$('#DivTransitorio').show(0);$('#DivGastoIndirecto').show(0);$('#DivDocChofer').show(0);")
DivTransitorio2.Visible = True
End If
If UsuarioActual.CveEmpresa.Contiene(1, 119) Then
DivEmitirTimbrado.Visible = True
@@ -226,7 +229,10 @@ Partial Class Inventarios_TraspasoAlmacen
TipoSeccionAlmacen = 0
Else
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(0);$('#DivGastoIndirecto').show(0);$('#DivDocChofer').show(0);")
If ChkTransitorio.Checked Then
RegistraScript("$('#DivTransitorio').show(0);$('#DivGastoIndirecto').show(0);$('#DivDocChofer').show(0);")
DivTransitorio2.Visible = True
End If
End If
End Sub
@@ -643,21 +649,21 @@ Partial Class Inventarios_TraspasoAlmacen
If TxtResponsable.Text.Trim = "" And Not UsuarioActual.CveEmpresa.Contiene(119) Then
Alert("Debe seleccionar un responsable para el traspaso transitorio.", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);")
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);") : DivTransitorio2.Visible = True
Exit Sub
End If
If DdlAlmacenTransitorio.SelectedValue.ToEntero <= 0 Then
Alert("Debe seleccionar un almacen transitorio.", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);")
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);") : DivTransitorio2.Visible = True
Exit Sub
End If
If DdlChofer.SelectedValue.ToEntero <= 0 And UsuarioActual.CveEmpresa.Contiene(119) Then
Alert("Debe seleccionar un Chofer", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);")
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);") : DivTransitorio2.Visible = True
Exit Sub
End If
End If
@@ -693,7 +699,7 @@ Partial Class Inventarios_TraspasoAlmacen
Alert("Por ser un traspaso entre sucursales es necesario indicar que el traspaso es transitorio.", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'');", "SonidoError")
ChkTransitorio.Checked = True
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);", "MuestraDivTransitorio")
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);", "MuestraDivTransitorio") : DivTransitorio2.Visible = True
Exit Sub
End If
End If
@@ -711,7 +717,7 @@ Partial Class Inventarios_TraspasoAlmacen
For Each dr As DataRow In DtMovimientos.Rows
If dr("EstatusExistencia").ToString = "-1" Then
Alert("Tiene que rectificar los movimientos con error.", TipoMensaje.MsgError)
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);")
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);") : DivTransitorio2.Visible = True
Exit Sub
End If
Next
@@ -1456,10 +1462,11 @@ Partial Class Inventarios_TraspasoAlmacen
TxtResponsable.Text = ""
TxtGastoIndirecto.Text = ""
RegistraScript("$('#DivTransitorio').show(200);$('#DivGastoIndirecto').show(100);$('#DivDocChofer').show(100);")
DivTransitorio2.Visible = True
ChkEmitirTimbrado.Checked = LblEmitirTimbrado.Visible
Else
RegistraScript("$('#DivTransitorio').hide(500);$('#DivGastoIndirecto').hide(500);$('#DivDocChofer').hide(500);")
DivTransitorio2.Visible = True
End If
CargaAlmacenDestino()
@@ -1974,7 +1981,7 @@ Partial Class Inventarios_TraspasoAlmacen
CargaRecepcion()
Else
Alert("No hay movimientos para el traspaso", TipoMensaje.MsgAdvertencia)
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);")
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);") : DivTransitorio2.Visible = True
End If
End Sub

View File

@@ -117,6 +117,11 @@
<ItemTemplate>
<asp:Label runat="server" CssClass="Texto" Text='<%# Eval("Importe", "${0:N2}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Moneda" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label runat="server" CssClass="Texto" Text='<%# Eval("Abreviatura") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Pagar Anticipo" ItemStyle-Width="20%" Visible="false" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>

View File

@@ -110,13 +110,13 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
{
GvSolicitudes.Columns[4].Visible = true;
GvSolicitudes.Columns[5].Visible = true;
GvSolicitudes.Columns[6].Visible = false;
GvSolicitudes.Columns[7].Visible = false;
}
else
{
GvSolicitudes.Columns[4].Visible = false;
GvSolicitudes.Columns[5].Visible = false;
GvSolicitudes.Columns[6].Visible = true;
GvSolicitudes.Columns[7].Visible = true;
}
CargaDatos();
}

View File

@@ -478,7 +478,7 @@ Partial Class Contabilidad_RegPrePoliza
For Each row As GridViewRow In GvPrePoliza.Rows
If Not ObjContabilidad.UpdatePrepolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCTextBox("TxtConcepto").Text, row.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero,
row.FCDropDownList("DdlCtaContable").SelectedValue.ToEntero, If(row.FCTextBox("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCTextBox("TxtCargo").Text.ToDecimal <> 0,
row.FCTextBox("TxtCargo").Text.ToDecimal, row.FCTextBox("TxtAbono").Text.ToDecimal)) Then
row.FCTextBox("TxtCargo").Text.ToDecimal, row.FCTextBox("TxtAbono").Text.ToDecimal), CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
OcurrioError = True
End If
Next

View File

@@ -675,13 +675,24 @@
</asp:UpdatePanel>
</td>
</tr>
<tr align="left" id="TrAlmacenOrigen" runat="server" visible="False">
<td>
<asp:Label runat="server" ToolTip="Almacen Asignado" Font-Bold="true" Text="Almacen O:"></asp:Label>
</td>
<td>
<asp:DropDownList ID="DdlAlmacenOrigen" runat="server" Enabled="false" CssClass="form-control input-sm select2me" DataTextField="Almacen" DataValueField="CveAlmacen" Width="100%">
<%--<asp:ListItem Selected="true" Text="Productos Financieros Disponibles" Value="88"></asp:ListItem>--%>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVAlmacenOrigen" runat="server" ControlToValidate="DdlAlmacenOrigen" InitialValue="" ErrorMessage="Debe Seleccionarse un Almacen" ValidationGroup="GrpEmitirImprimir"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEAlmacenOrigen" runat="server" HighlightCssClass="vco" TargetControlID="RFVAlmacenOrigen" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr align="left" id="TrAlmacenAsignado" runat="server" visible="False">
<td>
<asp:Label runat="server" ToolTip="Almacen Asignado" Font-Bold="true" Text="Almacen A:"></asp:Label>
</td>
<td>
<asp:DropDownList ID="DdlAlmacenAsignado" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Almacen" DataValueField="CveAlmacen" Width="130px">
<asp:DropDownList ID="DdlAlmacenAsignado" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Almacen" DataValueField="CveAlmacen" Width="100%">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVAlmacenAsignado" runat="server" ControlToValidate="DdlAlmacenAsignado" InitialValue="" ErrorMessage="Debe Seleccionarse un Almacen" ValidationGroup="GrpEmitirImprimir"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEAlmacenAsignado" runat="server" HighlightCssClass="vco" TargetControlID="RFVAlmacenAsignado" Width="300px"></ajax:ValidatorCalloutExtender>
@@ -692,7 +703,7 @@
<asp:Label runat="server" ToolTip="Tipo de Pedido" Font-Bold="true" Text="Tipo Pedido:"></asp:Label>
</td>
<td>
<asp:DropDownList ID="DdlTipoPedido" runat="server" CssClass="form-control input-sm select2me" Width="130px">
<asp:DropDownList ID="DdlTipoPedido" runat="server" CssClass="form-control input-sm select2me" Width="100%">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Text="Interno" Value="1"></asp:ListItem>
<asp:ListItem Text="Externo" Value="0"></asp:ListItem>
@@ -701,18 +712,6 @@
<ajax:ValidatorCalloutExtender ID="VCETipoPedido" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoPedido" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr align="left" id="TrAlmacenOrigen" runat="server" visible="False">
<td>
<asp:Label runat="server" ToolTip="Almacen Asignado" Font-Bold="true" Text="Almacen O:"></asp:Label>
</td>
<td>
<asp:DropDownList ID="DdlAlmacenOrigen" runat="server" Enabled="false" CssClass="form-control input-sm select2me" DataTextField="Almacen" DataValueField="CveAlmacen" Width="130px">
<asp:ListItem Selected="true" Text="Productos Financieros Disponibles" Value="88"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVAlmacenOrigen" runat="server" ControlToValidate="DdlAlmacenOrigen" InitialValue="" ErrorMessage="Debe Seleccionarse un Almacen" ValidationGroup="GrpEmitirImprimir"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEAlmacenOrigen" runat="server" HighlightCssClass="vco" TargetControlID="RFVAlmacenOrigen" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr align="left" id="TrAntEspecial" runat="server" visible="false">
<td><b>Anticipo Especial:</b>&nbsp;</td>
<td>
@@ -3016,7 +3015,7 @@
</td>
</tr>
</table>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer>
@@ -6210,47 +6209,170 @@
<h4 class="modal-title">Aplicar Remisiones de Nota de Crédito</h4>
</div>
<div class="modal-body">
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
<input type="text" id="TxtBusquedaRemNC" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaRemNC','{0}')", GvRemisionesNC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaRemNC','{0}')", GvRemisionesNC.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
<div class="row">
<div class="col-md-9">
<div class="row" id="DivVentasUsados" runat="server" visible="false">
<div class="col-md-2">
Factura:
</div>
<div class="col-md-10">
<asp:DropDownList ID="DdlVentaUsado" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="100%" CssClass="select2me" OnSelectedIndexChanged="DdlVentaUsado_SelectedIndexChanged"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVVentaUsado" runat="server" InitialValue="-1" ControlToValidate="DdlVentaUsado" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Factura''</b> es necesario, por favor ingréselo." ValidationGroup="VGAplicarRNC"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEVentaUsado" runat="server" HighlightCssClass="vco" TargetControlID="RFVVentaUsado" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
<div class="col-md-3">
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
<input type="text" id="TxtBusquedaRemNC" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaRemNC','{0}')", GvRemisionesNC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaRemNC','{0}')", GvRemisionesNC.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="max-height: 10px">
<div class="col-md-12" style="height: 440px; overflow: auto">
<asp:GridView ID="GvRemisionesNC" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveVenta" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="ChkAplicar" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="Folio" HeaderText="Folio" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" />
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlTotal" runat="server" Text='<%# Eval("Original", "{0:N2}") %>'></asp:Literal>
<asp:Literal ID="LtlAbrev" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Saldo" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:TextBox ID="TxtImporte" CssClass="myvalue" runat="server" Width="75px" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<div class="row">
<div class="col-md-12">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Cargos</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom">
<div class="row" style="margin-right: 10px;" align="right">
<input type="text" id="TxtBusquedaRNCCargos" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaRNCCargos','{0}')", GvRemisionesNC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaRNCCargos','{0}')", GvRemisionesNC.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<div class="row">
<div class="col-md-12" style="max-height: 440px; overflow: auto">
<asp:GridView ID="GvRemisionesNC" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveVenta" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="ChkAplicar" runat="server" AutoPostBack="true" OnCheckedChanged="ChkAplicarNCBon_CheckedChanged" />
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="Folio" HeaderText="Folio" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlTotal" runat="server" Text='<%# Eval("Original", "{0:N2}") %>'></asp:Literal>
<asp:Literal ID="LtlAbrev" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Saldo" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:TextBox ID="TxtImporte" CssClass="myvalue" runat="server" Width="75px" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
<div class="row">
<div class="col-md-12">
<table border="0" rules="none" class="well TextTab" style="float: right;" runat="server">
<tr align="right">
<td style="border: 1px none white"><b>Saldo Maximo Utilizable.:</b></td>
<td>
<asp:Label ID="LtlSMU" ClientIDMode="Static" runat="server" Style="text-align: right;" Text="0.00"></asp:Label></td>
<td align="right">&nbsp;
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row" id="DivRNCBon" runat="server" visible="false">
<div class="col-md-12">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Bonificaciones</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom">
<div class="row" style="margin-right: 10px;" align="right">
<input type="text" id="TxtBusquedaNCBon" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaNCBon','{0}')", GvRemisionesNCBon.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaNCBon','{0}')", GvRemisionesNCBon.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<div class="row">
<div class="col-md-12" style="max-height: 440px; overflow: auto">
<asp:GridView ID="GvRemisionesNCBon" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveVenta,CveVentaRNCCargo" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="ChkAplicar" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="Folio" HeaderText="Folio" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlTotal" runat="server" Text='<%# Eval("Original", "{0:N2}") %>'></asp:Literal>
<asp:Literal ID="LtlAbrev" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Saldo" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:TextBox ID="TxtImporte" CssClass="myvalue" runat="server" Width="75px" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<table border="0" rules="none" class="well TextTab" style="float: right;" runat="server">
<tr align="right">
<td style="border: 1px none white"><b>Saldo Maximo Utilizable.:</b></td>
<td>
<asp:Label ID="LtlSMUBon" ClientIDMode="Static" runat="server" Style="text-align: right;" Text="0.00"></asp:Label></td>
<td align="right">&nbsp;
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button id="CancelarAplicarRemNC" type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
<asp:Button Text="Aplicar Remisiones" ID="BtnAplicarRemisionNC" OnClick="BtnAplicarRemisionNC_Click" CssClass="btn btn-primary" runat="server" />
<asp:Button Text="Aplicar Remisiones" ID="BtnAplicarRemisionNC" OnClick="BtnAplicarRemisionNC_Click" CssClass="btn btn-primary" runat="server" ValidationGroup="VGAplicarRNC" />
</div>
</div>
</ContentTemplate>
@@ -6609,40 +6731,144 @@
<h4 class="modal-title">Aplicar Remisiones de Nota de Crédito</h4>
</div>
<div class="modal-body">
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
<input type="text" id="TxtBusquedaDescC" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaDescC','{0}')", GvDescNC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaDescC','{0}')", GvDescNC.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
<div class="row">
<div class="col-md-12">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Cargos</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom">
<div class="row" style="margin-right: 10px;" align="right">
<input type="text" id="TxtBusquedaNCCargos" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaNCCargos','{0}')", GvDescNCCargos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaNCCargos','{0}')", GvDescNCCargos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<div class="row">
<div class="col-md-12" style="max-height: 440px; overflow: auto">
<asp:GridView ID="GvDescNCCargos" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveVenta" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="ChkAplicar" runat="server" AutoPostBack="true" OnCheckedChanged="ChkAplicarRNC_CheckedChanged" />
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="Folio" HeaderText="Folio" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlTotal" runat="server" Text='<%# Eval("Original", "{0:N2}") %>'></asp:Literal>
<asp:Literal ID="LtlAbrev" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Saldo" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:TextBox ID="TxtImporte" CssClass="myvalue" runat="server" Width="75px" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
<div class="row">
<div class="col-md-12">
<table border="0" rules="none" class="well TextTab" style="float: right;" runat="server">
<tr align="right">
<td style="border: 1px none white"><b>Saldo Maximo Utilizable.:</b></td>
<td>
<asp:Label ID="LblSaldoMaximoUsados" ClientIDMode="Static" runat="server" Style="text-align: right;" Text="0.00"></asp:Label></td>
<td align="right">&nbsp;
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row" style="max-height: 10px">
<div class="col-md-12" style="height: 440px; overflow: auto">
<asp:GridView ID="GvDescNC" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveVenta" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="ChkAplicar" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="Folio" HeaderText="Folio" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlTotal" runat="server" Text='<%# Eval("Original", "{0:N2}") %>'></asp:Literal>
<asp:Literal ID="LtlAbrev" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Saldo" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:TextBox ID="TxtImporte" CssClass="myvalue" runat="server" Width="75px" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<div class="row" id="DivRNCBonificaciones" runat="server" visible="false">
<div class="col-md-12">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Bonificaciones</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom">
<div class="row" style="margin-right: 10px;" align="right">
<input type="text" id="TxtBusquedaNCBonificaciones" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaNCBonificaciones','{0}')", GvDescNCBonificaciones.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaNCBonificaciones','{0}')", GvDescNCBonificaciones.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<div class="row">
<div class="col-md-12" style="max-height: 440px; overflow: auto">
<asp:GridView ID="GvDescNCBonificaciones" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveVenta,CveVentaRNCCargo" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="ChkAplicar" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="Folio" HeaderText="Folio" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlTotal" runat="server" Text='<%# Eval("Original", "{0:N2}") %>'></asp:Literal>
<asp:Literal ID="LtlAbrev" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Saldo" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:TextBox ID="TxtImporte" CssClass="myvalue" runat="server" Width="75px" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<table border="0" rules="none" class="well TextTab" style="float: right;" runat="server">
<tr align="right">
<td style="border: 1px none white"><b>Saldo Maximo Utilizable.:</b></td>
<td>
<asp:Label ID="LblSaldoMaximoBonificacion" ClientIDMode="Static" runat="server" Style="text-align: right;" Text="0.00"></asp:Label></td>
<td align="right">&nbsp;
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
@@ -6661,7 +6887,6 @@
//FUNCIONES PARA COMERCIO EXTERIOR
function CalculaTotalUSD(TotalUSD, ValorUnitario, TxtCantidad) {
; debugger
TotalUSD.innerText = FormatoNumero(ToDouble(ValorUnitario.value) * ToDouble(TxtCantidad.value), 2);
}
@@ -7465,129 +7690,129 @@
var Total = ToDouble($get('TxtSubTotal').value);
let TipoAnticipo = $('#<%= DdlTipoAmortizacionAnticipo.ClientID %>').val();
let importeTxt = parseFloat(txt.value.replace(/,/g, ''));
let importeTxt = parseFloat(txt.value.replace(/,/g, ''));
if (isNaN(importeTxt)) {
importeTxt = 0;
} else {
if (importeTxt <= 0) {
importeTxt = 0;
chk.checked = false;
return;
}
}
saldo = (importeTxt > saldo) ? saldo : importeTxt;
var SaldoCompra = (Total - FnSumaValoresAnt() + ToDouble(txt.value)).toFixed(2); // le agrego lo del valor actual para validarlo //parseFloat(parseFloat($get('HdnVentaSaldo').value).toFixed(2));
if (SaldoCompra < 0) txt.value = SaldoCompra - txt.value;
//minimo entre saldocompra y el saldoanticipo
if (SaldoCompra < saldo) saldo = SaldoCompra;
if (ToDouble(txt.value) > 0) {
chk.checked = true;
} else {
chk.checked = false;
}
if (ToDouble(txt.value) > saldo) {
txt.value = saldo;
alert("El Importe no debe de exceder a el saldo");
}
$("#LblTotalAnticipos").text(FormatoNumero(FnSumaValoresAnt(), 2));
$get('HdnVentaSaldo').value = Total - FnSumaValoresAnt();
}
function FnSumaValoresAnt() {
debugger;
var totalPoints = 0;
var t = '';
$('input[name*=TxtAnticipo]').each(function () {
totalPoints += ToDouble($(this).val());
});
return Math.round(totalPoints * 100) / 100;
}
function LimpiaModal() {
$('#<%= TxtDireccion.ClientID %>').val('');
$('#<%= TxtColonia.ClientID %>').val('');
$('#<%= TxtCiudad.ClientID %>').val('');
$('#<%= TxtEstado.ClientID %>').val('');
$('#<%= TxtCP.ClientID %>').val('');
}
function BtnMateriales() {
$('#BtnMateriales').click();
}
function BtnEnviarMailCancelacion() {
$('#BtnEnviarMailCancelacion').click();
}
function BtnRefacturacionConfirmar() {
$('#BtnRefacturacionConfirmar').click();
}
function BtnRefacturacionConfirmarAceptacion(Liga) {
$('#BtnRefacturacionConfirmarAceptacion').click();
}
function BtnRefrescarPagina() {
$('#BtnRefrescarPagina').click();
}
function Recargar() {
$('#BtnRefrescarPagina').click();
}
function BtnAplicaNuevaNC() {
$('#BtnAplicaNuevaNC').click();
}
$('.DdlPS').on("select2:open", function (e) { $('.select2-container.select2-container--default .select2-dropdown .select2anothertable').remove(); });
$('.DdlPSPyME').on("select2:open", function (e) { $('.select2-container.select2-container--default .select2-dropdown .select2anothertable').remove(); });
$("body").on("mouseenter", ".select2-container.select2-container--default.select2-container--open .select2-dropdown li", function (event) {
var $this = $(this);
var ind = $this.index();
$(".select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable tr.active").removeClass('active');
$(".select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable tr:nth-child(" + (ind + 2) + ")").addClass('active');
//log($this);
});
var scrollfuncion = function () {
var stop = this.scrollTop;
$(".select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable").scrollTop(stop);
}
function CargaExistenciaAlmacenes(data, params) {
var div = $('<div class="select2anothertable" style=" max-width: 950px; overflow-x: auto;"></div>');
$('.select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable').remove();
$('.select2-container.select2-container--default.select2-container--open .select2-dropdown').prepend(div);
var table = $('<table id="TExistencias" ></table>'); div.append(table);
var tbody = $('<tbody></tbody>'); table.append(tbody);
$(".select2-container--default .select2-results>.select2-results__options").off("scroll", scrollfuncion);
$(".select2-container--default .select2-results>.select2-results__options").scroll(scrollfuncion);
var indexd = 0;
data.forEach(function (item) {
if (indexd == 0) {
var tr = $('<tr></tr>'); tbody.append(tr);
var td;
for (var key in item) {
if (!(key == "text" || key == "id")) { td = $('<td style="font-weight:bold;">' + key + '</td>'); tr.append(td); }
}
if (isNaN(importeTxt)) {
importeTxt = 0;
} else {
if (importeTxt <= 0) {
importeTxt = 0;
chk.checked = false;
return;
}
var tr = $('<tr></tr>'); tbody.append(tr);
}
var td;
for (var key in item) {
if (!(key == "text" || key == "id")) {
if ((item[key] > 0)) {
td = $('<td style = "font-weight:bold;" >' + item[key] + '</td>'); tr.append(td);
} else {
if ('<%= UsuarioActual.Empresa.Funcionalidad(566) %>' == '1') {
saldo = (importeTxt > saldo) ? saldo : importeTxt;
var SaldoCompra = (Total - FnSumaValoresAnt() + ToDouble(txt.value)).toFixed(2); // le agrego lo del valor actual para validarlo //parseFloat(parseFloat($get('HdnVentaSaldo').value).toFixed(2));
if (SaldoCompra < 0) txt.value = SaldoCompra - txt.value;
//minimo entre saldocompra y el saldoanticipo
if (SaldoCompra < saldo) saldo = SaldoCompra;
if (ToDouble(txt.value) > 0) {
chk.checked = true;
} else {
chk.checked = false;
}
if (ToDouble(txt.value) > saldo) {
txt.value = saldo;
alert("El Importe no debe de exceder a el saldo");
}
$("#LblTotalAnticipos").text(FormatoNumero(FnSumaValoresAnt(), 2));
$get('HdnVentaSaldo').value = Total - FnSumaValoresAnt();
}
function FnSumaValoresAnt() {
debugger;
var totalPoints = 0;
var t = '';
$('input[name*=TxtAnticipo]').each(function () {
totalPoints += ToDouble($(this).val());
});
return Math.round(totalPoints * 100) / 100;
}
function LimpiaModal() {
$('#<%= TxtDireccion.ClientID %>').val('');
$('#<%= TxtColonia.ClientID %>').val('');
$('#<%= TxtCiudad.ClientID %>').val('');
$('#<%= TxtEstado.ClientID %>').val('');
$('#<%= TxtCP.ClientID %>').val('');
}
function BtnMateriales() {
$('#BtnMateriales').click();
}
function BtnEnviarMailCancelacion() {
$('#BtnEnviarMailCancelacion').click();
}
function BtnRefacturacionConfirmar() {
$('#BtnRefacturacionConfirmar').click();
}
function BtnRefacturacionConfirmarAceptacion(Liga) {
$('#BtnRefacturacionConfirmarAceptacion').click();
}
function BtnRefrescarPagina() {
$('#BtnRefrescarPagina').click();
}
function Recargar() {
$('#BtnRefrescarPagina').click();
}
function BtnAplicaNuevaNC() {
$('#BtnAplicaNuevaNC').click();
}
$('.DdlPS').on("select2:open", function (e) { $('.select2-container.select2-container--default .select2-dropdown .select2anothertable').remove(); });
$('.DdlPSPyME').on("select2:open", function (e) { $('.select2-container.select2-container--default .select2-dropdown .select2anothertable').remove(); });
$("body").on("mouseenter", ".select2-container.select2-container--default.select2-container--open .select2-dropdown li", function (event) {
var $this = $(this);
var ind = $this.index();
$(".select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable tr.active").removeClass('active');
$(".select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable tr:nth-child(" + (ind + 2) + ")").addClass('active');
//log($this);
});
var scrollfuncion = function () {
var stop = this.scrollTop;
$(".select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable").scrollTop(stop);
}
function CargaExistenciaAlmacenes(data, params) {
var div = $('<div class="select2anothertable" style=" max-width: 950px; overflow-x: auto;"></div>');
$('.select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable').remove();
$('.select2-container.select2-container--default.select2-container--open .select2-dropdown').prepend(div);
var table = $('<table id="TExistencias" ></table>'); div.append(table);
var tbody = $('<tbody></tbody>'); table.append(tbody);
$(".select2-container--default .select2-results>.select2-results__options").off("scroll", scrollfuncion);
$(".select2-container--default .select2-results>.select2-results__options").scroll(scrollfuncion);
var indexd = 0;
data.forEach(function (item) {
if (indexd == 0) {
var tr = $('<tr></tr>'); tbody.append(tr);
var td;
for (var key in item) {
if (!(key == "text" || key == "id")) { td = $('<td style="font-weight:bold;">' + key + '</td>'); tr.append(td); }
}
}
var tr = $('<tr></tr>'); tbody.append(tr);
var td;
for (var key in item) {
if (!(key == "text" || key == "id")) {
if ((item[key] > 0)) {
td = $('<td style = "font-weight:bold;" >' + item[key] + '</td>'); tr.append(td);
} else {
if ('<%= UsuarioActual.Empresa.Funcionalidad(566) %>' == '1') {
var buscarAlmacenes = "CargaExistenciasSucursales(" + item.id + ",'" + item.text + "');"
td = $('<td>' + item[key] + ' <button type="button" class="btn btn-xs btn-primary" onclick="' + buscarAlmacenes + '">Ver mas existencias</button></td>'); tr.append(td);
} else {
@@ -7857,5 +8082,21 @@
$('#ModalAplicarRemisionesNC').modal('hide');
}
var verficaRNC = function () {
var total = 0;
if ('<%= UsuarioActual.CveEmpresa %>' == '140') {
$(".ChkAplicaRNC > input").each(function () {
if (this.checked) {
total = total + 1;
}
if (total == 2) {
alert("No se puede seleccionar mas de una remisión de nota de crédito.");
this.checked = false;
return false;
}
});
}
};
</script>
</asp:Content>

File diff suppressed because it is too large Load Diff