Merge branch 'master' of http://agonzalez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1,190 +1,197 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatFoliosGarantia.aspx.vb" Inherits="Acumuladores_CatFoliosGarantia" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Widthall {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
|
||||
.sinlink td a {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
color: black;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.white a {
|
||||
color: white !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Folios de Garantía
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarFolioGarantia" data-toggle="tooltip" data-placement="left" title="Agregar un Folio de Garantía" Text="<i class='fa fa-plus'></i> Agregar Folio "></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpFiltros" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Panel ID="Panel1" runat="server" DefaultButton="BtnConsultar">
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px;">
|
||||
<div class="tools">
|
||||
<asp:Button Text="Consultar" ID="BtnConsultar" CssClass="btn btn-primary" OnClick="BtnConsultar_Click" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row" style="padding-top: 10px;">
|
||||
<label class="col-md-1 truncate">Tipo Folio:</label>
|
||||
<div class="col-md-2 ">
|
||||
<%-- <asp:DropDownList ID="DdlSucursal" runat="server" CssClass="select2me" DataTextField="Sucursal" DataValueField="CveSucursal" Width="200px" ValidationGroup="GrpGuardar"></asp:DropDownList>--%>
|
||||
<asp:DropDownList ID="DdlTipoFolio" runat="server" CssClass="select2me" Width="100px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Value="general" >general</asp:ListItem>
|
||||
<asp:ListItem Value="optima">optima</asp:ListItem>
|
||||
<asp:ListItem Value="motobateria">motobateria</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Estatus:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEstatus" runat="server" CssClass="select2me" Width="100px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Activo" Value="1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Inactivo" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
<asp:UpdatePanel ID="UpGral" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="Widthall" style="text-align: right!important; margin-top: 20px!important; margin-bottom: 2px!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 class="row" style="margin: 5px">
|
||||
<asp:UpdatePanel ID="UPGvFolioGarantia" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvFolioGarantia" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveFolioGarantia,FolioGarantia,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"
|
||||
data-sort="true"
|
||||
data-freezerows="1"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Folio">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblFolioGarantia" runat="server" Text='<%# Eval("FolioGarantia") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Tipo Folio">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblTipoFolio" runat="server" Text='<%# Eval("tipoFolio") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Límite">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblLimite" runat="server" Text='<%# Eval("Limite") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SubProyecto" ItemStyle-Width="150px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblSubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="150px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblPuntos" runat="server" Text='<%# Eval("Estatus")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="AreaTexto" ItemStyle-Width ="100px" HeaderText="Área" />
|
||||
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" ItemStyle-Width="150px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="300px" HeaderText="Usuario">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="80px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgE" OnClick="Edit_ClickFolioGarantia" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="40px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" OnClick="Remove_ClickFolioGarantia" runat="server" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatFoliosGarantia.aspx.vb" Inherits="Acumuladores_CatFoliosGarantia" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Widthall {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
|
||||
.sinlink td a {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
color: black;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.white a {
|
||||
color: white !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Folios de Garantía
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarFolioGarantia" data-toggle="tooltip" data-placement="left" title="Agregar un Folio de Garantía" Text="<i class='fa fa-plus'></i> Agregar Folio "></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpFiltros" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Panel ID="Panel1" runat="server" DefaultButton="BtnConsultar">
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px;">
|
||||
<div class="tools">
|
||||
<asp:Button Text="Consultar" ID="BtnConsultar" CssClass="btn btn-primary" OnClick="BtnConsultar_Click" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row" style="padding-top: 10px;">
|
||||
<label class="col-md-1 truncate">Tipo Folio:</label>
|
||||
<div class="col-md-2 ">
|
||||
<%-- <asp:DropDownList ID="DdlSucursal" runat="server" CssClass="select2me" DataTextField="Sucursal" DataValueField="CveSucursal" Width="200px" ValidationGroup="GrpGuardar"></asp:DropDownList>--%>
|
||||
<asp:DropDownList ID="DdlTipoFolio" runat="server" CssClass="select2me" Width="100px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Value="general">general</asp:ListItem>
|
||||
<asp:ListItem Value="optima">optima</asp:ListItem>
|
||||
<asp:ListItem Value="motobateria">motobateria</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Estatus:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEstatus" runat="server" CssClass="select2me" Width="100px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Activo" Value="1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Inactivo" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
<asp:UpdatePanel ID="UpGral" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="Widthall" style="text-align: right!important; margin-top: 20px!important; margin-bottom: 2px!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 class="row" style="margin: 5px">
|
||||
<asp:UpdatePanel ID="UPGvFolioGarantia" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvFolioGarantia" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveFolioGarantia,FolioGarantia,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"
|
||||
data-sort="true"
|
||||
data-freezerows="1"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Folio">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblFolioGarantia" runat="server" Text='<%# Eval("FolioGarantia") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Tipo Folio">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblTipoFolio" runat="server" Text='<%# Eval("tipoFolio") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Límite">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblLimite" runat="server" Text='<%# Eval("Limite") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SubProyecto" ItemStyle-Width="150px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblSubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="150px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblPuntos" runat="server" Text='<%# Eval("Estatus")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="AreaTexto" ItemStyle-Width="100px" HeaderText="Área" />
|
||||
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" ItemStyle-Width="150px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="300px" HeaderText="Usuario">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="80px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgVer" OnClick="ImgVer_Click" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||
CssClass="btn btn-primary btn-circle btn-sm" Text="<i class='fa fa-bars'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="80px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgE" OnClick="Edit_ClickFolioGarantia" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="40px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" OnClick="Remove_ClickFolioGarantia" runat="server" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<%-- <ajax:TabContainer ID="TabBit" runat="server" ActiveTabIndex="0" Width="100%">
|
||||
<ajax:TabPanel ID="TabBitacora" runat="server" HeaderText="Bitácora">
|
||||
<ContentTemplate>
|
||||
@@ -227,69 +234,74 @@
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>--%>
|
||||
|
||||
<div id="DivAgregarFolioGarantia" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalFolioGarantia" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalFolioGarantia" runat="server">Agregar Folio Garantia</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtFolioGarantia" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtFolioGarantia" runat="server" ControlToValidate="TxtFolioGarantia" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFolioGarantia"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtFolioGarantia.ClientID.ToString()%>">Folio:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<%--<br />--%>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" >
|
||||
</ajax:TabContainer>--%>
|
||||
|
||||
<div id="DivAgregarFolioGarantia" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalFolioGarantia" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalFolioGarantia" runat="server">Agregar Folio Garantia</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtFolioGarantia" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtFolioGarantia" runat="server" ControlToValidate="TxtFolioGarantia" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFolioGarantia"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtFolioGarantia.ClientID.ToString()%>">Folio:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<%--<br />--%>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label runat="server" ID="lblSubProyecto" for="<%= DdlSubProyectos.ClientID.ToString()%>">SubProyecto:</asp:Label></br>
|
||||
<asp:DropDownList ID="DdlSubProyectos" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Width="50%" AutoPostBack="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVProducto2" InitialValue="-1" runat="server" ControlToValidate="DdlSubProyectos" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''SubProyecto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFolioGarantia"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEProducto2" runat="server" HighlightCssClass="vco" TargetControlID="RFVProducto2" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<%--<br />--%>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
<asp:DropDownList ID="DdlSubProyectos" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Width="50%" AutoPostBack="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVProducto2" InitialValue="-1" runat="server" ControlToValidate="DdlSubProyectos" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''SubProyecto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFolioGarantia"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEProducto2" runat="server" HighlightCssClass="vco" TargetControlID="RFVProducto2" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<%--<br />--%>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label></br>
|
||||
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label runat="server" ID="LblTipoFolio" for="<%= DdlTipoFolioModal.ClientID.ToString()%>">Tipo Folio:</asp:Label></br>
|
||||
<asp:DropDownList ID="DdlTipoFolioModal" runat="server" CssClass="form-control input-sm select2me" Width="50%" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Value="general" Selected ="True">General</asp:ListItem>
|
||||
<asp:ListItem Value="optima">Optima</asp:ListItem>
|
||||
<asp:ListItem Value="motobateria">Motobateria</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<i></i>
|
||||
</div>
|
||||
<%--<br />--%>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtLimite" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvLimite" runat="server" ControlToValidate="TxtLimite" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFolioGarantia"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtLimite.ClientID.ToString()%>">Límite:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
<asp:DropDownList ID="DdlTipoFolioModal" runat="server" CssClass="form-control input-sm select2me" Width="50%" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Value="general" Selected="True">General</asp:ListItem>
|
||||
<asp:ListItem Value="optima">Optima</asp:ListItem>
|
||||
<asp:ListItem Value="motobateria">Motobateria</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<i></i>
|
||||
</div>
|
||||
<%--<br />--%>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtLimite" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvLimite" runat="server" ControlToValidate="TxtLimite" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFolioGarantia"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtLimite.ClientID.ToString()%>">Límite:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label runat="server" ID="LblArea" for="<%= DdlArea.ClientID.ToString()%>">Área:</asp:Label></br>
|
||||
<asp:DropDownList ID="DdlArea" runat="server" CssClass="form-control input-sm select2me" Width="50%" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Value="1" Selected ="True">Piso</asp:ListItem>
|
||||
<asp:ListItem Value="2">Almacén</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<asp:DropDownList ID="DdlArea" runat="server" CssClass="form-control input-sm select2me" Width="50%" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Value="1" Selected="True">Piso</asp:ListItem>
|
||||
<asp:ListItem Value="2">Almacén</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<i></i>
|
||||
</div>
|
||||
<%-- <div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:TextBox ID="TxtCargo" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important; margin-right: 10px!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtCargo" runat="server" ControlToValidate="TxtCargo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cargo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
@@ -326,23 +338,77 @@
|
||||
<asp:RequiredFieldValidator ID="RfvTxtPuntos" runat="server" ControlToValidate="TxtPuntos" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Puntos''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtPuntos.ClientID.ToString()%>">Puntos:</label>
|
||||
<i></i>
|
||||
</div>--%>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarFolioGarantiaModal" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpFolioGarantia" />
|
||||
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content9" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
|
||||
</div>--%>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarFolioGarantiaModal" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpFolioGarantia" />
|
||||
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpGarantiasDetalle" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivGarantiasDetalle" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<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="row">
|
||||
<div class="col-md-12">
|
||||
<div style="overflow-y: auto; height: 400px; width:1200px;">
|
||||
<asp:GridView ID="GvGarantiasDetalle" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" Width="100%" EmptyDataText="No se encontraron datos" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Consecutivo" HeaderText="Consecutivo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<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="CodigoPS" 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="NumPoliza" HeaderText="Num.Póliza" 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%" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content9" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
|
||||
|
||||
@@ -216,12 +216,34 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarFolioGarantia"))
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
|
||||
Public Sub ImgVer_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
CveFolioGarantia = GvRow.DataKey("CveFolioGarantia")
|
||||
|
||||
LblFolio.Text = GvRow.DataKey("FolioGarantia")
|
||||
|
||||
Using ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.GetFoliosGarantiasDetalle(CveFolioGarantia) Then
|
||||
GvGarantiasDetalle.DataSource = ObjAcum.DtResultados
|
||||
End If
|
||||
End Using
|
||||
GvGarantiasDetalle.DataBind()
|
||||
|
||||
UpGarantiasDetalle.Update()
|
||||
|
||||
RegistraScript("$('#DivGarantiasDetalle').modal('show');")
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargadatosGvFolioGarantia(DdlEstatus.SelectedValue.ToEntero, DdlTipoFolio.SelectedValue)
|
||||
End Sub
|
||||
|
||||
@@ -1126,6 +1126,25 @@ Public Class ClsAcumuladores
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetFoliosGarantiasDetalle(CveFolioGarantia As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
SqlDataAdapter("PA_Acum_GarantiasDetalleFolioGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As SqlException
|
||||
OnError("Ocurrió un error al consultar los movimientos. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
#Region " IDisposable Support "
|
||||
|
||||
@@ -1516,7 +1516,7 @@ Public Class ClsInventarios
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
Public Function GetKardex(Entrada As Boolean, Salida As Boolean, CvePS As Integer, FechaI As String, FechaF As String, CveAlmacen As Integer, CveTiposAlmacen As String, CveUnidadMedida As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional AgruparAlmacen As Boolean = False, Optional Serie As String = "-1") As Boolean
|
||||
Public Function GetKardex(Entrada As Boolean, Salida As Boolean, CvePS As Integer, FechaI As String, FechaF As String, CveAlmacen As Integer, CveTiposAlmacen As String, CveUnidadMedida As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional AgruparAlmacen As Boolean = False, Optional Serie As String = "-1", Optional CveAlmacenes As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Inv_KardexGet")
|
||||
@@ -1534,6 +1534,8 @@ Public Class ClsInventarios
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@AgruparAlmacen", SqlDbType.Bit).Value = AgruparAlmacen
|
||||
.Add("@Serie", SqlDbType.VarChar).Value = Serie
|
||||
.Add("@CveAlmacenes", SqlDbType.VarChar).Value = CveAlmacenes
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -1551,16 +1553,17 @@ Public Class ClsInventarios
|
||||
|
||||
End Function
|
||||
|
||||
Public Function GetExistenciasProductoSerie(CvePS As Integer, CveAlmacen As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function GetExistenciasProductoSerie(CvePS As Integer, CveAlmacen As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CveAlmacenes As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Inv_ExistenciaPSSeriesGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||
.Add("@CveAlmacen", SqlDbType.VarChar).Value = CveAlmacen
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveAlmacenes", SqlDbType.VarChar).Value = CveAlmacenes
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -986,13 +986,6 @@ Public Class ClsPaginas
|
||||
Dim P As New ClsSubProyectos
|
||||
If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = P.DtResultados
|
||||
P.Dispose()
|
||||
|
||||
Dim msg As String = "aqui no se carga subproyectos"
|
||||
If Request IsNot Nothing Then
|
||||
msg = msg & Request.ServerVariables("URL")
|
||||
End If
|
||||
msg.GuardaLog()
|
||||
|
||||
End If
|
||||
|
||||
If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then
|
||||
@@ -1809,6 +1802,13 @@ Public Class ClsPaginas
|
||||
|
||||
Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim ObjUsr As New ClsInventarios
|
||||
If ObjUsr.GetAlmacenes(-1, -1, CveEmpresa, -1) Then Application(AppNombre) = ObjUsr.DtResultados
|
||||
ObjUsr.Dispose()
|
||||
End If
|
||||
|
||||
Dim Str As New StringBuilder
|
||||
Str.Append("1=1 AND ")
|
||||
@@ -1817,14 +1817,31 @@ Public Class ClsPaginas
|
||||
If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus)
|
||||
If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen)
|
||||
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacen"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTAlmacen = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTAlmacen") = value
|
||||
Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa)
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
'Get
|
||||
|
||||
' Dim Str As New StringBuilder
|
||||
' Str.Append("1=1 AND ")
|
||||
' If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa)
|
||||
' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
|
||||
' If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus)
|
||||
' If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen)
|
||||
|
||||
' Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacen"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
||||
' GlobalDTAlmacen = Dv.ToTable
|
||||
' Dv.Dispose()
|
||||
|
||||
'End Get
|
||||
'Set(value As DataTable)
|
||||
' Application("GlobalDTAlmacen") = value
|
||||
'End Set
|
||||
End Property
|
||||
Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1, Optional CveEstatus As Integer = 1) As DataTable
|
||||
Get
|
||||
|
||||
@@ -1366,10 +1366,6 @@ Namespace Modelos
|
||||
|
||||
End If
|
||||
|
||||
If Not GuardarUsados(ObjVentas.IniciaTransacSQL, ObjVentas.CveVenta, ObjVentas, factura.TipoDocto) Then
|
||||
ErrorList.Add("Error al guardar usados")
|
||||
End If
|
||||
|
||||
|
||||
If ErrorList.Count = 0 AndAlso ObjVentas.CveVenta > 0 Then
|
||||
|
||||
@@ -1379,6 +1375,11 @@ Namespace Modelos
|
||||
factura.Timbre.Comprobante.Serie = ObjVentas.Serie
|
||||
factura.Timbre.Comprobante.Folio = ObjVentas.Folio.ToString
|
||||
|
||||
|
||||
If Not GuardarUsados(ObjVentas.IniciaTransacSQL, ObjVentas, factura) Then
|
||||
ErrorList.Add("Error al guardar usados")
|
||||
End If
|
||||
|
||||
If factura.TipoDocto = "Egs" AndAlso NuevaFactura = 1 Then
|
||||
If DtVentasNC Is Nothing Then
|
||||
InicializaDTVentasNC()
|
||||
@@ -1909,31 +1910,32 @@ Namespace Modelos
|
||||
DtVentasNC.Rows.Add(Dr)
|
||||
End If
|
||||
End Sub
|
||||
Private Function GuardarUsados(SqlTransaccion As SqlClient.SqlTransaction, CveVenta As Integer, ByRef ObjVentas As ClsVentas, TipoDocto As String) As Boolean
|
||||
Private Function GuardarUsados(SqlTransaccion As SqlClient.SqlTransaction, ByRef ObjVentas As ClsVentas, factura As Modelos.Factura) As Boolean
|
||||
Dim Resultado As Boolean = True
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(533).ToEntero > 0 AndAlso TipoDocto.Contiene("Ing", "Ant", "Rem") Then
|
||||
Dim CvePSPSA As Integer = UsuarioActual.Empresa.Funcionalidad(533).ToEntero
|
||||
If UsuarioActual.Empresa.Funcionalidad(533).ToEntero > 0 AndAlso factura.TipoDocto.Contiene("Ing", "Rem") Then
|
||||
|
||||
Dim ObjAcum As New ClsAcumuladores(SqlTransaccion)
|
||||
If factura.TipoDocto = "Ing" AndAlso factura.Cliente.EsDistribuidor Then
|
||||
Dim CvePSPSA As Integer = UsuarioActual.Empresa.Funcionalidad(533).ToEntero
|
||||
|
||||
For Each drow As DataRow In DtDetalle.Rows
|
||||
If drow("CveTamaño").ToString.ToEntero > 0 And (CvePSPSA <> drow("CvePS").ToString.ToEntero) Then
|
||||
If ObjAcum.DistribuidorMovtosAdd(CveCliente, drow("Cantidad").ToString.ToEntero, drow("CveTamaño").ToString.ToEntero, 2, CveVenta, UsuarioActual.CveUsuario,
|
||||
UsuarioActual.CveEmpresa, 0D, "") Then
|
||||
Else
|
||||
Resultado = False
|
||||
Exit For
|
||||
Dim ObjAcum As New ClsAcumuladores(SqlTransaccion)
|
||||
|
||||
For Each drow As DataRow In factura.DtDetalle.Rows
|
||||
If drow("CveTamaño").ToString.ToEntero > 0 And (CvePSPSA <> drow("CvePS").ToString.ToEntero) Then
|
||||
If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, drow("Cantidad").ToString.ToEntero, drow("CveTamaño").ToString.ToEntero, 2, factura.CveVenta, UsuarioActual.CveUsuario,
|
||||
UsuarioActual.CveEmpresa, 0D, "") Then
|
||||
Resultado = False
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
Resultado = True
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
|
||||
If TipoDocto.Contiene("Rem") Then
|
||||
If DtRecepcionUsados IsNot Nothing Then
|
||||
For Each drow As DataRow In DtRecepcionUsados.Rows
|
||||
If Not ObjVentas.AddVentaUsado(CveVenta, drow("CvePS").ToString.ToEntero, drow("Cantidad").ToString.ToDecimal, drow("PU").ToString.ToDecimal, drow("CveBCIUsado").ToString.ToEntero, drow("CveModeloAuto").ToString.ToEntero) Then
|
||||
End If
|
||||
|
||||
If factura.TipoDocto.Contiene("Rem") Then
|
||||
If factura.DtRecepcionUsados IsNot Nothing Then
|
||||
For Each drow As DataRow In factura.DtRecepcionUsados.Rows
|
||||
If Not ObjVentas.AddVentaUsado(factura.CveVenta, drow("CvePS").ToString.ToEntero, drow("Cantidad").ToString.ToDecimal, drow("PU").ToString.ToDecimal, drow("CveBCIUsado").ToString.ToEntero, drow("CveModeloAuto").ToString.ToEntero) Then
|
||||
Resultado = False
|
||||
Exit For
|
||||
End If
|
||||
@@ -9302,6 +9304,7 @@ Namespace Modelos
|
||||
Public Property ClaveSATMunicipio As String
|
||||
Public Property ClaveSATColonia As String
|
||||
Public Property ClaveSATCP As String
|
||||
Public Property EsDistribuidor As Boolean
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -661,6 +661,10 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141, 152, 153) Then
|
||||
UsaGlobal = False
|
||||
|
||||
If CveEmpresa = 140 And Pagina.Contiene("ventas/ventas") Then
|
||||
AplicaParaVenta = 1
|
||||
End If
|
||||
|
||||
Dim objInv As New ClsInventarios
|
||||
If objInv.GetExistenciasProductosLike(Name, CveClasificacion, CveSubProyecto, Estatus.ToEntero, AplicaParaVenta, CveEmpresa) Then
|
||||
|
||||
|
||||
@@ -842,6 +842,17 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
||||
MsgError = "No se pudo insertar concepto de bancos complementaria";
|
||||
}
|
||||
}
|
||||
|
||||
if (ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 10))
|
||||
{
|
||||
if (ObjMov.ValorPolizaDescuadre > 0)
|
||||
{
|
||||
MsgError = ObjMov.MensajePolizaDescuadre;
|
||||
$"Bancos/IE PAGO Deudor | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}".GuardaLogAD("LogPrePolizas");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool AutoConta = UsuarioActual.Empresa.Funcionalidad(200).Equals("1");
|
||||
//if (UsuarioActual.CveEmpresa == 119) AutoConta = false;
|
||||
|
||||
@@ -881,15 +892,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
||||
MsgError = "No se pudo insertar la póliza";
|
||||
}
|
||||
|
||||
if (ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 10))
|
||||
{
|
||||
if (ObjMov.ValorPolizaDescuadre > 0)
|
||||
{
|
||||
MsgError = ObjMov.MensajePolizaDescuadre;
|
||||
$"Bancos/IE PAGO Deudor | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}".GuardaLogAD("LogPrePolizas");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (MsgError.Equals(""))
|
||||
{
|
||||
if (Msg.ToString().Equals(""))
|
||||
|
||||
@@ -849,7 +849,8 @@ Partial Class Bancos_PolizaCheque
|
||||
'Dim Conta As ClsContPAQi = Nothing
|
||||
Dim IDPoliza As Integer = 0
|
||||
Dim CveIE As Integer
|
||||
Dim MsgError As String = ""
|
||||
Dim MsgError As String = ""
|
||||
Dim idCuentaContabilizacion As Long = 1
|
||||
|
||||
'If ChkContabilizar.Checked AndAlso UsuarioActual.Empresa.UsaContabilidad Then
|
||||
' Conta = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
@@ -875,7 +876,8 @@ Partial Class Bancos_PolizaCheque
|
||||
Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCuenta={0}", DdlCuenta.SelectedValue))
|
||||
If dr IsNot Nothing Then
|
||||
CveMoneda = dr("CveMoneda").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim TC As Decimal = If(CveMoneda > 1, GlobalTipoCambio(TxtFechaDocumento.Text.ToDate), 1)
|
||||
Dim CveTipoPoliza As Integer = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, TipoPlantilla).FiltroPrimeroValor("TipoPoliza", String.Format("CvePlantillaPoliza={0}", DdlPlantilla.SelectedValue)).ToEntero
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("PolizaCheque/Guardar", DdlPlantilla.SelectedValue.ToEntero, TotalCargos, TotalAbonos, 1, TxtFechaDocumento.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=CveTipoPoliza)
|
||||
@@ -886,8 +888,8 @@ Partial Class Bancos_PolizaCheque
|
||||
|
||||
|
||||
If CvePrePoliza > 0 Then
|
||||
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
|
||||
Dim idCuentaContabilizacion As Long = 1
|
||||
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
|
||||
|
||||
Dim Importe As Double = 0
|
||||
Dim TipoMovto As Boolean = False
|
||||
Dim IdCtaContable As Integer = 0
|
||||
@@ -958,20 +960,6 @@ Partial Class Bancos_PolizaCheque
|
||||
End If
|
||||
|
||||
|
||||
'El movimiento 2 es el de Pago
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then
|
||||
If idCuentaContabilizacion > 0 Then
|
||||
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
'Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion)
|
||||
IDPoliza = ObjMov.ContaIdPoliza
|
||||
Else
|
||||
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
|
||||
End If
|
||||
Else
|
||||
Alert("No se puede contabilizar la Prepoliza debido a que una o mas cuentas son inválidas", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
If CvePeriodo > 0 Then
|
||||
If Not ObjNom.UpdatePagoNomina(CvePeriodo, CveIE, CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||
MsgError = "No se pudo actualizar el periodo de la nómina"
|
||||
@@ -1008,8 +996,25 @@ Partial Class Bancos_PolizaCheque
|
||||
Else
|
||||
MsgError = "No se pudo validar la prepoliza de cuadre."
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'El movimiento 2 es el de Pago
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then
|
||||
If idCuentaContabilizacion > 0 Then
|
||||
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
'Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion)
|
||||
IDPoliza = ObjMov.ContaIdPoliza
|
||||
Else
|
||||
MsgError = "Error al contabilizar"
|
||||
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
|
||||
End If
|
||||
Else
|
||||
Alert("No se puede contabilizar la Prepoliza debido a que una o mas cuentas son inválidas", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If MsgError = "" Then
|
||||
|
||||
ObjIE.Commit()
|
||||
|
||||
@@ -373,6 +373,11 @@ Partial Class Bancos_ProductosFinancieros
|
||||
|
||||
Next
|
||||
|
||||
|
||||
If Not ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then
|
||||
ErrorTransaccion = True
|
||||
End If
|
||||
|
||||
'Por el momento no hay movimiento para estas plantillas y no debe entrar aqui
|
||||
If UsuarioActual.Empresa.Funcionalidad(200).ToEntero > 0 And Not ErrorTransaccion Then
|
||||
If idCuentaContabilizacion > 0 Then
|
||||
@@ -386,9 +391,6 @@ Partial Class Bancos_ProductosFinancieros
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then
|
||||
ErrorTransaccion = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -1275,23 +1275,23 @@ Partial Class PopUpVerFactura
|
||||
Dim FechaMovimiento As Date = ObjInventarios.FechaRegistro
|
||||
|
||||
Dim CveMovimientoRelacionado As Integer = -1
|
||||
Dim FolioRelacionado As String = ""
|
||||
Dim FolioRelacionado As String = ""
|
||||
Dim CveConceptoMovtoRelacionado As Integer = -1
|
||||
|
||||
'VERIFICA SI TIENE MOVIMIENTO VIRTUAL RELACIONADO
|
||||
If UsuarioActual.CveEmpresa = 140 AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
CveMovimientoRelacionado = ObjInventarios.DtResultados.Rows(0)("CveMtoRel").ToString().ToEntero()
|
||||
If CveConcepto.Contiene(3, 26) AndAlso ObjInventarios.DtResultados.FiltroPrimeroValor("CveMovimientoVirtual").ToEntero() > 0 Then
|
||||
FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioVirtual")
|
||||
CveConceptoMovtoRelacionado = 37
|
||||
ElseIf CveConcepto = 37 Then
|
||||
FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioRelacionado")
|
||||
CveConceptoMovtoRelacionado = 3
|
||||
If CveConcepto.Contiene(3, 26) AndAlso ObjInventarios.DtResultados.FiltroPrimeroValor("CveMovimientoVirtual").ToEntero() > 0 Then
|
||||
FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioVirtual")
|
||||
CveConceptoMovtoRelacionado = 37
|
||||
ElseIf CveConcepto = 37 Then
|
||||
FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioRelacionado")
|
||||
CveConceptoMovtoRelacionado = 3
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim CantidadProductos As Decimal = 0
|
||||
Dim CantidadUsados As Decimal = 0
|
||||
|
||||
@@ -1567,8 +1567,8 @@ Partial Class PopUpVerFactura
|
||||
Dim concepto As String = ""
|
||||
If CveConcepto = 3 Then
|
||||
concepto = "SALIDA DE ALMACÉN"
|
||||
ElseIf CveConcepto = 37 Then
|
||||
concepto = "SALIDA VIRTUAL"
|
||||
ElseIf CveConcepto = 37 Then
|
||||
concepto = "SALIDA VIRTUAL"
|
||||
Else
|
||||
concepto = "SALIDA DE ALMACÉN POR RECONSTRUCCIÓN"
|
||||
End If
|
||||
@@ -1705,34 +1705,34 @@ Partial Class PopUpVerFactura
|
||||
|
||||
'ImprimirPDF(String.Format("Empresas/{0}/Formatos/Salidas.rdlc", 72), DtMovimientos, params, "ReporteSalidas", RDSName:="DsInventarios")
|
||||
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
ElseIf UsuarioActual.CveEmpresa = 140 Then
|
||||
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("Concepto", concepto))
|
||||
params.Add(New ReportParameter("Almacen", Almacen))
|
||||
params.Add(New ReportParameter("Fecha", Fecha))
|
||||
params.Add(New ReportParameter("FacturaProveedor", FolioVenta))
|
||||
params.Add(New ReportParameter("FacturadoA", If(DtMovimientos(0)("Nombre").ToString <> "", DtMovimientos(0)("Nombre").ToString, NombreCliente)))
|
||||
params.Add(New ReportParameter("Observaciones", Observaciones))
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("Folio", Folio))
|
||||
params.Add(New ReportParameter("Descuentos", ""))
|
||||
params.Add(New ReportParameter("IVA", ""))
|
||||
params.Add(New ReportParameter("Total", ""))
|
||||
'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
params.Add(New ReportParameter("NombreRecibio", Recibio))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString()))
|
||||
params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado))
|
||||
|
||||
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
ElseIf UsuarioActual.CveEmpresa = 140 Then
|
||||
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("Concepto", concepto))
|
||||
params.Add(New ReportParameter("Almacen", Almacen))
|
||||
params.Add(New ReportParameter("Fecha", Fecha))
|
||||
params.Add(New ReportParameter("FacturaProveedor", FolioVenta))
|
||||
params.Add(New ReportParameter("FacturadoA", If(DtMovimientos(0)("Nombre").ToString <> "", DtMovimientos(0)("Nombre").ToString, NombreCliente)))
|
||||
params.Add(New ReportParameter("Observaciones", Observaciones))
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("Folio", Folio))
|
||||
params.Add(New ReportParameter("Descuentos", ""))
|
||||
params.Add(New ReportParameter("IVA", ""))
|
||||
params.Add(New ReportParameter("Total", ""))
|
||||
'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
params.Add(New ReportParameter("NombreRecibio", Recibio))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString()))
|
||||
params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado))
|
||||
|
||||
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
Else
|
||||
params.Add(New ReportParameter("Folio", Folio))
|
||||
params.Add(New ReportParameter("Fecha", Fecha))
|
||||
@@ -2169,8 +2169,8 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("CantidadProductos", CantidadProductos.ToString()))
|
||||
params.Add(New ReportParameter("CantidadUsados", CantidadUsados.ToString()))
|
||||
params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString()))
|
||||
params.Add(New ReportParameter("CantidadUsados", CantidadUsados.ToString()))
|
||||
params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString()))
|
||||
params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado))
|
||||
Else
|
||||
params.Add(New ReportParameter("Observaciones", Observaciones)) 'TxtObservaciones.Text
|
||||
@@ -2516,19 +2516,19 @@ Partial Class PopUpVerFactura
|
||||
If (UsuarioActual.CveEmpresa = 72) Then
|
||||
params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
|
||||
End If
|
||||
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/SalidasGarantia.rdlc", DtMovimientos, params, String.Format("SalidaGarantia{0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
'Else
|
||||
' params.Add(New ReportParameter("Folio", Folio))
|
||||
' params.Add(New ReportParameter("Fecha", Fecha))
|
||||
' params.Add(New ReportParameter("Almacen", Almacen))
|
||||
' params.Add(New ReportParameter("SubProyecto", SubProyecto))
|
||||
' params.Add(New ReportParameter("Observaciones", Observaciones))
|
||||
' params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
||||
' ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
'End If
|
||||
|
||||
|
||||
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/SalidasGarantia.rdlc", DtMovimientos, params, String.Format("SalidaGarantia{0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
'Else
|
||||
' params.Add(New ReportParameter("Folio", Folio))
|
||||
' params.Add(New ReportParameter("Fecha", Fecha))
|
||||
' params.Add(New ReportParameter("Almacen", Almacen))
|
||||
' params.Add(New ReportParameter("SubProyecto", SubProyecto))
|
||||
' params.Add(New ReportParameter("Observaciones", Observaciones))
|
||||
' params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
||||
' ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
'End If
|
||||
|
||||
|
||||
Case 18 'D E V O L U C I O N D E L C L I E N T E
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/DevolucionCliente.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
@@ -2705,36 +2705,36 @@ Partial Class PopUpVerFactura
|
||||
ImprimirPDF(Archivo, DtMovimientos, params, String.Format("Salida por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
ElseIf CveConcepto = 22 Then
|
||||
ImprimirPDF(Archivo, DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
End If
|
||||
|
||||
'Case 22 'ENTRADA POR PRESTAMO
|
||||
' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
' Dim params As New List(Of ReportParameter)
|
||||
|
||||
' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
' If Imagen.Exists Then
|
||||
' params.Add(New ReportParameter("LogoPath", logouri))
|
||||
' Else
|
||||
' params.Add(New ReportParameter("LogoPath", ""))
|
||||
' End If
|
||||
|
||||
' params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
' params.Add(New ReportParameter("Concepto", "Entrada por Prestamo"))
|
||||
' params.Add(New ReportParameter("Almacen", Almacen))
|
||||
' params.Add(New ReportParameter("Fecha", Fecha))
|
||||
' params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
' params.Add(New ReportParameter("Folio", Folio))
|
||||
' params.Add(New ReportParameter("Descuentos", ""))
|
||||
' params.Add(New ReportParameter("IVA", ""))
|
||||
' params.Add(New ReportParameter("Total", ""))
|
||||
' 'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
||||
' params.Add(New ReportParameter("FacturadoA", NombreCliente))
|
||||
' If (UsuarioActual.CveEmpresa = 72) Then
|
||||
' params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
|
||||
' End If
|
||||
' ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
|
||||
End If
|
||||
|
||||
'Case 22 'ENTRADA POR PRESTAMO
|
||||
' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
' Dim params As New List(Of ReportParameter)
|
||||
|
||||
' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
' If Imagen.Exists Then
|
||||
' params.Add(New ReportParameter("LogoPath", logouri))
|
||||
' Else
|
||||
' params.Add(New ReportParameter("LogoPath", ""))
|
||||
' End If
|
||||
|
||||
' params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
' params.Add(New ReportParameter("Concepto", "Entrada por Prestamo"))
|
||||
' params.Add(New ReportParameter("Almacen", Almacen))
|
||||
' params.Add(New ReportParameter("Fecha", Fecha))
|
||||
' params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
' params.Add(New ReportParameter("Folio", Folio))
|
||||
' params.Add(New ReportParameter("Descuentos", ""))
|
||||
' params.Add(New ReportParameter("IVA", ""))
|
||||
' params.Add(New ReportParameter("Total", ""))
|
||||
' 'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
||||
' params.Add(New ReportParameter("FacturadoA", NombreCliente))
|
||||
' If (UsuarioActual.CveEmpresa = 72) Then
|
||||
' params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
|
||||
' End If
|
||||
' ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
|
||||
Case 24 'SALIDA POR RESGUARDO
|
||||
If DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 20 Or DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 19 Then
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
@@ -3217,11 +3217,11 @@ Partial Class PopUpVerFactura
|
||||
If CveConcepto = 2 Then
|
||||
ElseIf CveConcepto = 3 Then
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'OC' - IMPRIME PDF OC"
|
||||
Private Sub ImprimePDFOC(CveOrdenCompra As Integer)
|
||||
Dim reporte As Byte() = NewGeneraBytesOC(CveOrdenCompra, ConBitacora:=(UsuarioActual.Empresa.Funcionalidad(119) = "1"))
|
||||
@@ -3576,7 +3576,7 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("RFC", dr("RFC").ToString))
|
||||
params.Add(New ReportParameter("Puesto", dr("Puesto").ToString))
|
||||
params.Add(New ReportParameter("PuestoEntrego", dr("PuestoEntrego").ToString))
|
||||
params.Add(New ReportParameter("Departamento", dr("Departamento").ToString))
|
||||
params.Add(New ReportParameter("Departamento", dr("Departamento").ToString))
|
||||
params.Add(New ReportParameter("DepartamentoEntrego", dr("DepartamentoEntrego").ToString))
|
||||
params.Add(New ReportParameter("Folio", dr("Folio").ToString))
|
||||
params.Add(New ReportParameter("Sucursal", dr("SubProyecto").ToString))
|
||||
|
||||
@@ -2893,7 +2893,10 @@ Partial Class Compras_eFacturas
|
||||
|
||||
If Not (FechaDoRecibo >= FT1 And FechaDoRecibo < FT2) Then
|
||||
|
||||
BtnVincularPago.Visible = False
|
||||
If TieneRegistros AndAlso UsuarioActual.TienePermisoProceso(286) Then
|
||||
DivVincularPagoManualmente.Visible = True
|
||||
End If
|
||||
|
||||
MSGComplemento = MSGComplemento & " Existen mas de 3 días de diferencia entre la fecha del documento y la fecha de complemento. "
|
||||
|
||||
Exit For
|
||||
@@ -2902,24 +2905,14 @@ Partial Class Compras_eFacturas
|
||||
Next
|
||||
|
||||
If MSGComplemento.Trim.Length > 0 Then
|
||||
|
||||
' BtnVincularPago.Visible = False
|
||||
ViculacionConPUE = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'saco la información de lo vinculado en el ie
|
||||
|
||||
ImporteIES = ObjCompras.DtResultados.FiltraParametros("CveIE > 0").SUM("Importe")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DiferenciaImportes = Monto - ImporteIES
|
||||
ObjCompras.Dispose()
|
||||
|
||||
|
||||
@@ -856,6 +856,20 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
End If
|
||||
Next
|
||||
|
||||
If CvePeriodo > 0 Then
|
||||
If Not ObjNom.UpdateProvisionNomina(CvePeriodo, CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||
MsgError = "No se pudo actualizar el periodo de la nómina"
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 1) Then
|
||||
If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Contabilidad/RegPrePolizas | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
MsgError = ObjMov.MensajePolizaDescuadre
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'El movimiento 2 es el de Pago
|
||||
If ChkAutoConta.Checked AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
|
||||
If idCuentaContabilizacion > 0 Then
|
||||
@@ -871,18 +885,6 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
Alert("No se puede contabilizar la Prepoliza debido a que una o mas cuentas son inválidas")
|
||||
End If
|
||||
End If
|
||||
If CvePeriodo > 0 Then
|
||||
If Not ObjNom.UpdateProvisionNomina(CvePeriodo, CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||
MsgError = "No se pudo actualizar el periodo de la nómina"
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 1) Then
|
||||
If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Contabilidad/RegPrePolizas | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
MsgError = ObjMov.MensajePolizaDescuadre
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
|
||||
@@ -853,7 +853,21 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End If
|
||||
Next
|
||||
|
||||
'El movimiento 2 es el de Pago
|
||||
If CvePeriodo > 0 Then
|
||||
If Not ObjNom.UpdateProvisionNomina(CvePeriodo, CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||
MsgError = "No se pudo actualizar el periodo de la nómina"
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 1) Then
|
||||
If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Contabilidad/RegPrePolizas | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
MsgError = ObjMov.MensajePolizaDescuadre
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'El movimiento 2 es el de Pago
|
||||
If ChkAutoConta.Checked AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
|
||||
If idCuentaContabilizacion > 0 Then
|
||||
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
@@ -868,18 +882,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Alert("No se puede contabilizar la Prepoliza debido a que una o mas cuentas son inválidas")
|
||||
End If
|
||||
End If
|
||||
If CvePeriodo > 0 Then
|
||||
If Not ObjNom.UpdateProvisionNomina(CvePeriodo, CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||
MsgError = "No se pudo actualizar el periodo de la nómina"
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 1) Then
|
||||
If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Contabilidad/RegPrePolizas | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
MsgError = ObjMov.MensajePolizaDescuadre
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
'I N V E N T A R I O S
|
||||
|
||||
Using Objinventarios As New ClsInventarios
|
||||
If Objinventarios.GetAlmacenes(-1, -1, -1, -1) Then Application("GlobalDTAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTAlmacen") = Nothing
|
||||
'If Objinventarios.GetAlmacenes(-1, -1, -1, -1) Then Application("GlobalDTAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTAlmacen") = Nothing
|
||||
If Objinventarios.GetSeccionesAlmacenes(-1, -1) Then Application("GlobalDTSeccionAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTSeccionAlmacen") = Nothing
|
||||
If Objinventarios.GetTiposAlmacenes Then Application("GlobalDTTipoAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTTipoAlmacen") = Nothing
|
||||
If Objinventarios.GetConceptos Then Application("GlobalDTInvConceptos") = Objinventarios.DtResultados Else Application("GlobalDTInvConceptos") = Nothing
|
||||
|
||||
@@ -155,7 +155,10 @@
|
||||
|
||||
<label class="col-md-1 truncate" style="max-width: 80px;">Almacén:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="ddlAlmacen" runat="server" CssClass="select2me " Style="width: 175px !important;" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>
|
||||
<%--<asp:DropDownList ID="ddlAlmacen" runat="server" CssClass="select2me " Style="width: 175px !important;" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>--%>
|
||||
<asp:ListBox ID="ddlAlmacen" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"
|
||||
DataTextField="Almacen" DataValueField="CveAlmacen"></asp:ListBox>
|
||||
|
||||
</div>
|
||||
|
||||
<label class="col-md-1" style="max-width: 85px;">Fecha Inicio:</label>
|
||||
|
||||
@@ -32,7 +32,7 @@ Partial Class Inventarios_Kardex
|
||||
TxtFechaI.Text = Now.AddMonths(-1).ToShortDateString
|
||||
TxtFechaF.Text = Now.ToShortDateString
|
||||
CargaCombos()
|
||||
ddlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
'ddlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(258) Then GvM.Columns(1).Visible = True
|
||||
|
||||
@@ -80,7 +80,7 @@ Partial Class Inventarios_Kardex
|
||||
|
||||
ddlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1)
|
||||
ddlAlmacen.DataBind()
|
||||
If IfNull(Request("CveAlmacen"), "-1").ToString.ToEntero > 0 Then ddlAlmacen.SelectedValueExist(Request("CveAlmacen").ToString)
|
||||
If IfNull(Request("CveAlmacen"), "-1").ToString.ToEntero > 0 Then ddlAlmacen.SelectedValuesIfExist(Request("CveAlmacen").ToString)
|
||||
CargaClasificaciones()
|
||||
|
||||
CBLTiposAlmacen.DataSource = GlobalDTTipoAlmacen(-1)
|
||||
@@ -255,7 +255,8 @@ Partial Class Inventarios_Kardex
|
||||
|
||||
Dim FechaI As String = If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
|
||||
Dim FechaF As String = If(TxtFechaF.Text <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
|
||||
Dim CveAlmacen As Integer = ddlAlmacen.SelectedValue.ToEntero
|
||||
Dim CveAlmacen As Integer = -1
|
||||
Dim CveAlmacenes As String = ddlAlmacen.GetSelectedValues()
|
||||
If CvePS > 0 Then ddlProducto2.SelectedText = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("PSCodigo", "")
|
||||
|
||||
Dim CveTiposAlmacen = ""
|
||||
@@ -266,7 +267,7 @@ Partial Class Inventarios_Kardex
|
||||
Dim Serie As String = If(TxtSerie.Text <> "", TxtSerie.Text, "-1")
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.GetKardex(Entrada, Salida, CvePS, FechaI, FechaF, CveAlmacen, CveTiposAlmacen.Substring(0, CveTiposAlmacen.Length - 1), DdlUnidadMedida.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ChkAgruparAlmacen.Checked, Serie) Then
|
||||
If ObjInventarios.GetKardex(Entrada, Salida, CvePS, FechaI, FechaF, CveAlmacen, CveTiposAlmacen.Substring(0, CveTiposAlmacen.Length - 1), DdlUnidadMedida.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ChkAgruparAlmacen.Checked, Serie, CveAlmacenes) Then
|
||||
dt = ObjInventarios.DtResultados.Copy
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
@@ -304,8 +305,12 @@ Partial Class Inventarios_Kardex
|
||||
End Sub
|
||||
|
||||
Private Sub CargarExistenciasProductosSeries()
|
||||
Dim almacenes As String = ddlAlmacen.GetSelectedValues()
|
||||
If almacenes = "" Then
|
||||
almacenes = "-1"
|
||||
End If
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.GetExistenciasProductoSerie(ddlProducto2.SelectedValue.ToEntero(), ddlAlmacen.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
If ObjInventarios.GetExistenciasProductoSerie(ddlProducto2.SelectedValue.ToEntero(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, almacenes) Then
|
||||
GvSeries.DataSource = ObjInventarios.DtResultados
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
@@ -935,7 +935,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
|
||||
If CveTipoCompra = 9 Then
|
||||
CargaAlmacenes(-1, "21", CveTipoCompra)
|
||||
CargaAlmacenes(-1, "27", CveTipoCompra)
|
||||
End If
|
||||
|
||||
If CveTipoCompra = 10 Then
|
||||
@@ -972,9 +972,12 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
CveAlmacenDevolucionProveedor = DtRecepcion.Rows(0)("CveAlmacenDevolucionProveedor").ToString.ToEntero
|
||||
|
||||
'SI ES MOTOBATERIA NO GENERA MOVIMIENTO VIRTUAL
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" AndAlso (DtRecepcion.COUNT("CveTamaño", "CveTamaño > 0 AND CveTamaño <> 16") > 0 OrElse CargaSoloUsados) Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" AndAlso (DtRecepcion.COUNT("CveTamaño", "CveTamaño > 0 AND CveTamaño <> 16") > 0) Then
|
||||
RealizarMovimientoVirtual = True
|
||||
DivVirtualAdvertencia.Visible = True
|
||||
Else
|
||||
RealizarMovimientoVirtual = False
|
||||
DivVirtualAdvertencia.Visible = False
|
||||
End If
|
||||
|
||||
If TipoMovimiento = 2 AndAlso CveAlmacenDevolucionProveedor > 0 Then
|
||||
|
||||
@@ -557,6 +557,16 @@
|
||||
<asp:Label ID="LblSRSalarioDiarioIntegrado" runat="server"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2 bold">Salario base cotización</div>
|
||||
<div class="col-md-3">
|
||||
<asp:Label ID="LblSRSbc" runat="server"></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-3 bold"> </div>
|
||||
<div class="col-md-4">
|
||||
<asp:Label ID="Label3" runat="server"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2 bold">Puesto</div>
|
||||
<div class="col-md-3">
|
||||
|
||||
@@ -1247,6 +1247,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
string Departamento = "";
|
||||
string SD = "";
|
||||
string SDI = "";
|
||||
string SalarioDiarioIMSS = "";
|
||||
DataRow drow = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
if (drow != null)
|
||||
{
|
||||
@@ -1257,8 +1258,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
FechaFin = string.Format("{0:dd/MM/yyyy}", drow["FechaFin"]);
|
||||
DiasRetardos = string.Format("{0}", drow["DiasRetardos"].ToString().ToEntero());
|
||||
DiasIncapacidad = string.Format("{0}", drow["DiasIncapacidad"].ToString().ToEntero());
|
||||
SD = string.Format("{0}", drow["SalarioDiario"]);
|
||||
SDI = string.Format("{0}", drow["SalarioDiarioIntegrado"]);
|
||||
SD = string.Format("{0:####.####}", drow["SalarioDiario"]);
|
||||
SDI = string.Format("{0:####.####}", drow["SalarioDiarioIntegrado"]);
|
||||
SalarioDiarioIMSS = string.Format("{0:####.####}", drow["SalarioDiarioIMSS"]);
|
||||
}
|
||||
|
||||
using (ClsRH objrh = new ClsRH())
|
||||
@@ -1292,6 +1294,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
LblSRDepartamento.Text = Departamento;
|
||||
LblSRSalarioDiario.Text = SD;
|
||||
LblSRSalarioDiarioIntegrado.Text = SDI;
|
||||
LblSRSbc.Text = SalarioDiarioIMSS;
|
||||
|
||||
#endregion
|
||||
#region "Sobre Recibo"
|
||||
{
|
||||
|
||||
@@ -871,7 +871,7 @@
|
||||
|
||||
|
||||
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="False" GridLines=" none" BorderColor="Transparent" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn"
|
||||
DataKeyNames="SubProyecto, Cantidad, Importe, Descuento, CveOrdenCompra, CveUnidadMedida, CvePresupuestoEgreso, PS,CveClasificacion, CvePS, CveSubProyecto, CveActivoFijo, CodigoAF, TipoDato, Observacion, CveOrdenCompraDetalle,CveCompra,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,IEPSPSIVAPorcentaje" data-tableheader=".GVDHeader" ShowHeader="false" data-rows="0">
|
||||
DataKeyNames="SubProyecto, Cantidad, Importe, Descuento, CveOrdenCompra, CveUnidadMedida, CvePresupuestoEgreso, PS,CveClasificacion, CvePS, CveSubProyecto, CveActivoFijo, CodigoAF, TipoDato, Observacion, CveOrdenCompraDetalle,CveCompra,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,IEPSPSIVAPorcentaje,CantidadNoEditable" data-tableheader=".GVDHeader" ShowHeader="false" data-rows="0">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<EditItemTemplate>
|
||||
|
||||
@@ -3741,7 +3741,7 @@ Partial Class OC
|
||||
CargaDatosDetalles()
|
||||
Dim EditingRow As GridViewRow = GvD.Rows(e.NewEditIndex)
|
||||
If Not EsCreaApartirDe Then
|
||||
If EditingRow.DataKey("TipoDato").ToEntero = 2 Then
|
||||
If EditingRow.DataKey("TipoDato").ToEntero = 2 Or EditingRow.DataKey("CantidadNoEditable").ToDecimal > 0 Then
|
||||
EditingRow.FCDropDownList("DdlClasificacion").Enabled = False
|
||||
EditingRow.FCDropDownList("DdlPS").Enabled = False
|
||||
EditingRow.FCDropDownList("CboUnidadMedidaEdit").Enabled = False
|
||||
|
||||
@@ -1174,7 +1174,9 @@ function setwebservice(idDdlWS, idhdValue, idhdText, btn) {
|
||||
CveSubProyecto: (!(DdlWS.data('cvesubproyecto')) || DdlWS.data('cvesubproyecto') == '') ? ((!(DdlWS.parent().data('cvesubproyecto')) || DdlWS.parent().data('cvesubproyecto') == '') ? -1 : DdlWS.parent().data('cvesubproyecto')) : DdlWS.data('cvesubproyecto'),
|
||||
metodo: (!(DdlWS.data('metodo')) || DdlWS.data('metodo') == 'getps') ? ((!(DdlWS.parent().data('metodo')) || DdlWS.parent().data('metodo') == 'getps') ? 'getps' : DdlWS.parent().data('metodo')) : DdlWS.data('metodo'),
|
||||
Pagina: (!(DdlWS.data('pagina')) || DdlWS.data('pagina') == '') ? '-2' : DdlWS.data('pagina'),
|
||||
ColTexto: (!(DdlWS.data('coltexto')) || DdlWS.data('coltexto') == '') ? 'NC' : DdlWS.data('coltexto')
|
||||
ColTexto: (!(DdlWS.data('coltexto')) || DdlWS.data('coltexto') == '') ? 'NC' : DdlWS.data('coltexto'),
|
||||
aplicaparaventa: (!(DdlWS.data('aplicaparaventa')) || DdlWS.data('aplicaparaventa') == '') ? -1 : DdlWS.data('aplicaparaventa')
|
||||
|
||||
//Metodo: metodo
|
||||
};
|
||||
},
|
||||
|
||||
@@ -91,9 +91,6 @@ public class TareasJam : IHttpHandler
|
||||
}
|
||||
|
||||
|
||||
|
||||
//"ftp://us2.hostedftp.com/", "agrojam", "A12345678";
|
||||
|
||||
string FTPServer = "ftp://127.0.0.1/";
|
||||
string TFPUsr = "Toor";
|
||||
string FTPPass = "agj-3500";
|
||||
@@ -198,8 +195,12 @@ public class TareasJam : IHttpHandler
|
||||
DTAlmacenes.AcceptChanges();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DataTable dtCloned = DTVentas.Clone();
|
||||
dtCloned.Columns[3].DataType = typeof(DateTime);
|
||||
dtCloned.Columns[3].DataType = typeof(string);
|
||||
|
||||
foreach (DataRow row in DTVentas.Rows)
|
||||
{
|
||||
@@ -209,7 +210,7 @@ public class TareasJam : IHttpHandler
|
||||
DTVentas = dtCloned;
|
||||
foreach (DataRow dRow in DTVentas.Rows)
|
||||
{
|
||||
DateTime tmpDate = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd").ToDate();
|
||||
string tmpDate = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd");//.ToDate().ToString("yyyy/MM/dd").ToDate();
|
||||
dRow[3] = tmpDate;
|
||||
}
|
||||
|
||||
@@ -217,7 +218,7 @@ public class TareasJam : IHttpHandler
|
||||
|
||||
|
||||
dtCloned = DTAlmacenes.Clone();
|
||||
dtCloned.Columns[3].DataType = typeof(DateTime);
|
||||
dtCloned.Columns[3].DataType = typeof(string);
|
||||
|
||||
foreach (DataRow row in DTAlmacenes.Rows)
|
||||
{
|
||||
@@ -227,7 +228,8 @@ public class TareasJam : IHttpHandler
|
||||
DTAlmacenes = dtCloned;
|
||||
foreach (DataRow dRow in DTAlmacenes.Rows)
|
||||
{
|
||||
DateTime tmpDate = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd").ToDate();
|
||||
//DateTime tmpDate = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd").ToDate();
|
||||
string tmpDate = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd");
|
||||
dRow[3] = tmpDate;
|
||||
}
|
||||
DTAlmacenes.AcceptChanges();
|
||||
@@ -249,6 +251,7 @@ public class TareasJam : IHttpHandler
|
||||
if (!ErrorProceso)
|
||||
{
|
||||
|
||||
int contador = 0;
|
||||
|
||||
SpreadsheetInfo.SetLicense(Extensiones.ModExtensiones.SerialGemBoxSpreadsheet());
|
||||
|
||||
@@ -258,8 +261,18 @@ public class TareasJam : IHttpHandler
|
||||
{
|
||||
ColumnHeaders = true,
|
||||
StartRow = 0
|
||||
});
|
||||
worksheetAlmacenes.Columns[3].Style.NumberFormat = "yyyy/MM/dd";
|
||||
});
|
||||
|
||||
foreach (DataRow DRow in DTAlmacenes.Rows)
|
||||
{
|
||||
|
||||
//contador++;
|
||||
//var cell = worksheetAlmacenes.Cells[contador, 3];
|
||||
//cell.Style.WrapText = true;
|
||||
|
||||
|
||||
}
|
||||
//worksheetAlmacenes.Columns[3].Style.NumberFormat = "yyyy/MM/dd";
|
||||
workbookAlmacenes.Save(RutaAlmacenes);
|
||||
|
||||
var workbookProductos = new ExcelFile();
|
||||
@@ -278,7 +291,28 @@ public class TareasJam : IHttpHandler
|
||||
ColumnHeaders = true,
|
||||
StartRow = 0
|
||||
});
|
||||
worksheetVentas.Columns[3].Style.NumberFormat = "yyyy/MM/dd";
|
||||
|
||||
|
||||
contador = 0;
|
||||
foreach (DataRow DRow in DTVentas.Rows)
|
||||
{
|
||||
|
||||
//var value = DateTime.Now;
|
||||
contador++;
|
||||
|
||||
var cell = worksheetVentas.Cells[contador, 3];
|
||||
cell.Style.WrapText = false;
|
||||
cell.Style.IsTextVertical = false;
|
||||
cell.Style.Font.Italic = false;
|
||||
|
||||
//cell.Style.NumberFormat = "h:mm AM/PM"; // "yyyy-MM-dd";
|
||||
//cell.SetValue(value);
|
||||
|
||||
|
||||
}
|
||||
|
||||
//worksheetVentas.Columns[3].Style.NumberFormat = "yyyy/MM/dd";
|
||||
|
||||
workbookVentas.Save(RutaVentas);
|
||||
|
||||
|
||||
@@ -292,7 +326,7 @@ public class TareasJam : IHttpHandler
|
||||
workbookClientes.Save(RutaClientes);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var FInfoProductos = new FileInfo(RutaProductos);
|
||||
@@ -438,7 +472,7 @@ public class TareasJam : IHttpHandler
|
||||
|
||||
|
||||
ClsSisMail Correo = new ClsSisMail();
|
||||
// string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx";
|
||||
// string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx";
|
||||
string Para = "oscar.irigoyen@adssistemas.mx";
|
||||
string Asunto = ErrorProceso ? $"Carga Layout Corteva {DateTime.Now.ToString("yyyy-MM-dd")}" : $"Carga Layout Corteva Error {DateTime.Now.ToString("yyyy-MM-dd")}";
|
||||
|
||||
|
||||
@@ -378,7 +378,7 @@
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtCodigo" runat="server" CssClass="form-control" MaxLength="25"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCodigo" runat="server" OnTextChanged="TxtCodigo_TextChanged" AutoPostBack="true" CssClass="form-control" MaxLength="25"></asp:TextBox>
|
||||
<label for="<%= TxtCodigo.ClientID.ToString()%>">Código:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input">
|
||||
|
||||
@@ -845,6 +845,12 @@ Partial Class Clientes
|
||||
If Request("CveEmpresaCRM") IsNot Nothing AndAlso IsNumeric(Request("CveEmpresaCRM")) AndAlso Request("CveEmpresaCRM").ToEntero > 0 Then
|
||||
ViewState("CveEmpresaCRM") = Request("CveEmpresaCRM")
|
||||
CargaDatosCRM()
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then ' Funcionalidad Es Distribuidor
|
||||
DivEsDistribuidor.Visible = True
|
||||
DivCargoUsado.Visible = True
|
||||
DivBonificacionUsado.Visible = True
|
||||
End If
|
||||
|
||||
ChecaPermiteCredito()
|
||||
@@ -10190,6 +10196,18 @@ Partial Class Clientes
|
||||
GvPagosNoBancarios.DataBind()
|
||||
End If
|
||||
ObjBancos.Dispose()
|
||||
End Sub
|
||||
End Sub
|
||||
Protected Sub TxtCodigo_TextChanged(sender As Object, e As EventArgs)
|
||||
|
||||
If CveCliente <= 0 AndAlso UsuarioActual.CveEmpresa = 140 Then
|
||||
DdlTipoCliente.SelectedValueExist("1")
|
||||
ChkEsDistribuidor.Checked = True
|
||||
ChkCargoUsado.Checked = True
|
||||
ChkBonificacionUsado.Checked = True
|
||||
End If
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="Ventas - Facturación" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PV.aspx.vb" Inherits="PV" EnableEventValidation="false"%>
|
||||
<%@ Page Title="Ventas - Facturación" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PV.aspx.vb" Inherits="PV" EnableEventValidation="false" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
|
||||
<%--Necesario para el modal que no se cierra--%>
|
||||
@@ -621,7 +621,7 @@
|
||||
<th runat="server" visible="false" id="nomostrar2"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<asp:GridView ID="GvPS" GridLines="None" runat="server" data-tableheader="#tbps" ShowHeader="true" AutoGenerateColumns="False"
|
||||
<asp:GridView ID="GvPS" GridLines="None" runat="server" data-tableheader="#tbps" ShowHeader="true" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveVentaDetalle,Consec,CvePS,Total, IEPS, CveClasificacion,CveUM,CveProyecto,CveSubProyecto,TipoDocto,PS,Obs,Cantidad,PU,Descuento,IVA,CantidadInventario,CantidadFacturadaRem,EsCargo" CssClass="table table-striped table-advance table-hover Widthall Sortable mysmallbtn ScrollAD" Style="min-width: 980px;">
|
||||
<Columns>
|
||||
<%--0--%>
|
||||
@@ -2374,25 +2374,25 @@
|
||||
<label for="<%= TxtLocalidadCliente.ClientID.ToString()%>">Localidad:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div id="DivEstadoPaisCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
||||
<asp:DropDownList ID="DdlSATPais" runat="server" CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlSATPais_SelectedIndexChanged" AutoPostBack="true">
|
||||
<asp:ListItem Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Value="MEX" Text="México" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Value="USA" Text="USA"></asp:ListItem>
|
||||
<asp:ListItem Value="CAN" Text="Canada"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<div id="DivEstadoPaisCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVSATPais" runat="server" InitialValue="-1" ControlToValidate="DdlSATPais" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pais''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlSATPais.ClientID.ToString()%>">Pais:</label>
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
||||
<asp:DropDownList ID="DdlSATPais" runat="server" CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlSATPais_SelectedIndexChanged" AutoPostBack="true">
|
||||
<asp:ListItem Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Value="MEX" Text="México" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Value="USA" Text="USA"></asp:ListItem>
|
||||
<asp:ListItem Value="CAN" Text="Canada"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVSATPais" runat="server" InitialValue="-1" ControlToValidate="DdlSATPais" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pais''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlSATPais.ClientID.ToString()%>">Pais:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
||||
<asp:DropDownList ID="DdlEstadoSAT" DataTextField="NombreEstado" DataValueField="CveSATEstado" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlEstadoSAT" runat="server" InitialValue="-1" ControlToValidate="DdlEstadoSAT" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlEstadoSAT.ClientID.ToString()%>">Estado:</label>
|
||||
<asp:DropDownList ID="DdlEstadoSAT" DataTextField="NombreEstado" DataValueField="CveSATEstado" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlEstadoSAT" runat="server" InitialValue="-1" ControlToValidate="DdlEstadoSAT" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlEstadoSAT.ClientID.ToString()%>">Estado:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div id="DivCorreoCuentaCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
|
||||
@@ -2571,7 +2571,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="DivAddVenta" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UpModalVenta" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -2768,7 +2768,7 @@
|
||||
</div>
|
||||
<div class="col-md-6" align="right" id="divagregrarotrops" runat="server">
|
||||
<label>Agregar otro Producto:</label>
|
||||
<asp:CheckBox ID="ChkAgregar" runat="server" Checked="true" />
|
||||
<asp:CheckBox ID="ChkAgregar" runat="server" Checked="true" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -2960,16 +2960,19 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 17px;">
|
||||
<div class="col-md-2">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPoliza" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtPoliza" CssClass="form-control" runat="server" MaxLength="50" Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVPoliza" runat="server" ControlToValidate="TxtPoliza" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Póliza''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVPoliza" runat="server" ControlToValidate="TxtPoliza" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Poliza''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
|
||||
<%--<ajax:ValidatorCalloutExtender ID="VCEPoliza" runat="server" HighlightCssClass="vco" TargetControlID="RFVPoliza"></ajax:ValidatorCalloutExtender>--%>
|
||||
<label for="<%= TxtPoliza.ClientID.ToString()%>">Poliza:</label>
|
||||
<label for="<%= TxtPoliza.ClientID.ToString()%>">Póliza:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
</div>
|
||||
<div class="row" style="margin-top: 17px;">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtImporteAjuste" CssClass="form-control" runat="server" Enabled="false" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVImporteAjuste" runat="server" ControlToValidate="TxtImporteAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||
@@ -2978,7 +2981,7 @@
|
||||
<label for="<%= TxtImporteAjuste.ClientID.ToString()%>">Importe:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-6">
|
||||
<asp:Button ID="BtnCalcularImporteAjuste" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnCalcularImporteAjuste_Click" runat="server" Text="Recalcular" UseSubmitBehavior="false" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -2991,7 +2994,7 @@
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel ID="UpAgregar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<%-- <asp:Button ID="BtnCalculaMesesUso" Text="" OnClick="BtnCalculaMesesUso_Click" ClientIDMode="Static" Style="display: none;" runat="server" />--%>
|
||||
<%-- <asp:Button ID="BtnCalculaMesesUso" Text="" OnClick="BtnCalculaMesesUso_Click" ClientIDMode="Static" Style="display: none;" runat="server" />--%>
|
||||
<asp:Button ClientIDMode="Static" ID="LnkAgregarPS" OnClick="LnkAgregarPS_Click" runat="server" CssClass="btn btn-primary" Text="Agregar" ValidationGroup="GrpAddVenta" UseSubmitBehavior="false" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
@@ -3018,12 +3021,12 @@
|
||||
let regex = new RegExp("^[0-9]+$");
|
||||
arguments.IsValid = regex.test(arguments.Value);
|
||||
return;
|
||||
//MARCA MOTOBATERIAS
|
||||
//MARCA MOTOBATERIAS
|
||||
} else if ((CveMarca == "1090" || CveMarca == "1091") || CveClasificacion == "20517") {
|
||||
let regex = new RegExp("^[1X]");
|
||||
arguments.IsValid = regex.test(arguments.Value);
|
||||
return;
|
||||
//AUTOMOTRIZ-ACUMULADORES
|
||||
//AUTOMOTRIZ-ACUMULADORES
|
||||
} else {
|
||||
let regex = new RegExp("^[1X]|^[0-9][A-HJ-M][0-3][0-9][A-Z][ACEN][2-5]$");
|
||||
arguments.IsValid = regex.test(arguments.Value);
|
||||
@@ -3045,12 +3048,12 @@
|
||||
var regex = new RegExp("^\d{4}$|^[A-L][0-9][1-9A-Z][A-HJ-M]$");
|
||||
arguments.IsValid = regex.test(arguments.Value);
|
||||
return;
|
||||
//MARCA MOTOBATERIAS
|
||||
//MARCA MOTOBATERIAS
|
||||
} else if ((CveMarca == "1090" || CveMarca == "1091") || CveClasificacion == "20517") {
|
||||
var regex = new RegExp("^[A-L][0-9][1-9A-Z][A-HJ-M]$");
|
||||
arguments.IsValid = regex.test(arguments.Value);
|
||||
return;
|
||||
//AUTOMOTRIZ-ACUMULADORES
|
||||
//AUTOMOTRIZ-ACUMULADORES
|
||||
} else {
|
||||
var regex = new RegExp("^[X]|^[x]|[A-L][0-9][1-9A-Z][A-HJ-M]$");
|
||||
arguments.IsValid = regex.test(arguments.Value);
|
||||
|
||||
@@ -2306,6 +2306,10 @@ Partial Class PV
|
||||
DdlEstadoSAT.DataBind()
|
||||
DdlEstadoSAT.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
If UsuarioActual.CveEmpresa = 140 AndAlso ClaveSATPais = "MEX" Then
|
||||
DdlEstadoSAT.SelectedValueExist("26")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Sub DdlSATPais_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaEstados(DdlSATPais.SelectedValue)
|
||||
@@ -2768,6 +2772,18 @@ Partial Class PV
|
||||
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString)
|
||||
End If
|
||||
|
||||
'SELECCIONA VENDEDOR DEL USUARIO CUANDO SEA VENTA NUEVA Y SIN CLIENTE
|
||||
If UsuarioActual.CveVendedor > 0 Then
|
||||
If CveVenta = -1 AndAlso Not DdlVendedor.SelectedValue.ToEntero() > 0 Then DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString())
|
||||
If DdlVendedor.SelectedValue.ToEntero() > 0 AndAlso Not UsuarioActual.TienePermisoProceso(161) Then
|
||||
DdlVendedor.Enabled = False
|
||||
End If
|
||||
'multiples vendedores visible
|
||||
If UsuarioActual.TienePermisoProceso(153) Then
|
||||
DdlVendedor.Enabled = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub ObtenerFechaVencimientoCER()
|
||||
Try
|
||||
@@ -6174,6 +6190,46 @@ Partial Class PV
|
||||
CveTamanio = drPS("CveTamaño").ToString.ToEntero
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(404).ToEntero > 0 Then 'cuando el valor es 10.- secuencia Cliente/Sucursal, 20 - sucursal/cliente
|
||||
Dim TipoPrecioLista As Integer = UsuarioActual.Empresa.Funcionalidad(404).ToEntero
|
||||
' si es 10. primero el cliente
|
||||
Dim CvePrecioListaPS As Integer
|
||||
Dim PorcentajePrecio As Decimal = 0
|
||||
|
||||
If TipoPrecioLista = 10 Then
|
||||
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
||||
If CvePrecioListaPS <= 0 Then
|
||||
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
|
||||
End If
|
||||
Else
|
||||
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
|
||||
If CvePrecioListaPS <= 0 Then
|
||||
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
||||
End If
|
||||
End If
|
||||
|
||||
If CvePrecioListaPS > 0 Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
||||
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDecimal
|
||||
PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDecimal
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
End If
|
||||
|
||||
If PrecioSugerido = 0 Then
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
||||
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
||||
If CostoPS = 0 Then CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
||||
ObjInventarios.Dispose()
|
||||
If CostoPS > 0 And PorcentajePrecio > 0 Then
|
||||
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
|
||||
End If
|
||||
End If
|
||||
'CvePrecioLista = CvePrecioListaPS
|
||||
End If
|
||||
|
||||
TxtPUFactura.Text = PrecioSugerido.FormatoNumero(2)
|
||||
|
||||
If DTBCIUsados IsNot Nothing AndAlso CveTamanio > 0 Then
|
||||
|
||||
@@ -424,10 +424,10 @@
|
||||
</td>
|
||||
</tr>--%>
|
||||
<tr runat="server" id="trsucursalciente" visible="false">
|
||||
<td align="left" ><b>
|
||||
<td align="left"><b>
|
||||
<asp:Label ID="LblSucursal" runat="server" Text="Sucursal"></asp:Label>
|
||||
:</b></td>
|
||||
<td align="left" >
|
||||
<td align="left">
|
||||
<div class="row align-items-start">
|
||||
<div class="col-md-10">
|
||||
<asp:DropDownList ID="DdlSucursalCliente" runat="server" AutoPostBack="true" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal">
|
||||
@@ -438,11 +438,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td align="left" >
|
||||
<td align="left">
|
||||
<b>
|
||||
<asp:Label ID="LtlTitleRFCSucursal" runat="server" Text=""></asp:Label></b>
|
||||
</td>
|
||||
<td align="left" >
|
||||
<td align="left">
|
||||
<asp:Label ID="LtlRFCSucursal" runat="server" Text=""></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1575,7 +1575,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:HiddenField ID="HdnTotalRNC" runat="server" ClientIDMode="Static" Value="0" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
@@ -4316,23 +4316,18 @@
|
||||
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<%--<i class="fa fa-users font-green"></i>--%>
|
||||
<span class="caption-subject bold uppercase">Bitacora</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<%--<div class=" font-green" style="cursor: pointer;" runat="server" id="ImgAddObs" visible="false">
|
||||
<i class="fa fa-commenting font-green"></i>
|
||||
<span class="caption-subject bold">Agregar</span>
|
||||
</div>--%>
|
||||
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold" data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-green' style='font-weight: 700 !important;' ><span class='caption-subject bold'>Agregar</span></i>" Style="cursor: pointer;" ToolTip="Observaciones"></asp:HyperLink><br />
|
||||
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold" runat="server" Visible="false" Style="cursor: pointer; text-decoration: none;" ToolTip="Agendar"><i class='fa fa-calendar-plus-o font-green' style='font-weight: 700 !important;' ></i> <span class="caption-subject bold font-green">Agendar</span></asp:HyperLink><br />
|
||||
<asp:Literal ID="LtlTareaNueva" runat="server"></asp:Literal>
|
||||
<UserControl:TareaNueva runat="server" id="TareaNueva" />
|
||||
<script> function OnAddedTareaNueva() {
|
||||
$('.btnupEventoBitacora').click();
|
||||
}
|
||||
|
||||
<script>
|
||||
function OnAddedTareaNueva() {
|
||||
$('.btnupEventoBitacora').click();
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
@@ -6800,7 +6795,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtImporte" CssClass="myvalue" runat="server" Width="75px" />
|
||||
<asp:TextBox ID="TxtImporte" CssClass="myvalue ImportesRNCCargo" runat="server" Width="75px" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
@@ -6877,23 +6872,24 @@
|
||||
</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">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<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">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<asp:HiddenField ID="HdnSaldoMaximoUsados" runat="server" ClientIDMode="Static" Value="0" />
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="CancelarAplicarDescNC" type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
@@ -7084,13 +7080,116 @@
|
||||
|
||||
}
|
||||
function CalculaSaldoRNCChk(TxtImporte, Saldo, Chk) {
|
||||
//ImportesRNCCargo
|
||||
if (Chk.checked) {
|
||||
let SaldoMaximoUtilizable = ToDouble(HdnSaldoMaximoUsados.value)
|
||||
let ImportesAsignados = 0;
|
||||
|
||||
$('.ImportesRNCCargo').each(function () {
|
||||
if ($(this).context.id != TxtImporte.id) {
|
||||
ImportesAsignados += ToDouble($(this).val());
|
||||
}
|
||||
});
|
||||
let Importe = SaldoMaximoUtilizable - ImportesAsignados;
|
||||
|
||||
if (Importe > 0) {
|
||||
if (Saldo > Importe) {
|
||||
TxtImporte.value = FormatoNumero(Importe, 2);
|
||||
} else {
|
||||
TxtImporte.value = FormatoNumero(Saldo, 2);
|
||||
}
|
||||
} else {
|
||||
TxtImporte.value = "";
|
||||
Chk.checked = false;
|
||||
}
|
||||
|
||||
} else {
|
||||
TxtImporte.value = "";
|
||||
}
|
||||
}
|
||||
function LimitaSaldoRNCChk(TxtImporte, Saldo) {
|
||||
//var Importe = 0;
|
||||
|
||||
//if (TxtImporte.value.includes('.')) {
|
||||
// return;
|
||||
//}
|
||||
//if (TxtImporte.value.includes(',')) {
|
||||
// return;
|
||||
//}
|
||||
|
||||
//var regex = new RegExp("^\d*\.?\d*$");
|
||||
|
||||
//if (regex.test(TxtImporte.value.trim())) {
|
||||
// if (TxtImporte.value != '') {
|
||||
// Importe = parseFloat(TxtImporte.value);
|
||||
// }
|
||||
//let SaldoMaximoUtilizable = ToDouble(HdnSaldoMaximoUsados.value)
|
||||
//let ImportesAsignados = 0;
|
||||
//$('.ImportesRNCCargo').each(function () {
|
||||
// if ($(this).context.id != TxtImporte.id) {
|
||||
// ImportesAsignados += ToDouble($(this).val());
|
||||
// }
|
||||
//});
|
||||
|
||||
// let ImporteDiferencia = SaldoMaximoUtilizable - ImportesAsignados;
|
||||
|
||||
// if (ImporteDiferencia < 0) {
|
||||
// ImporteDiferencia = 0;
|
||||
// }
|
||||
// if (ImporteDiferencia > 0) {
|
||||
// if (ImporteDiferencia > Importe) {
|
||||
// TxtImporte.value = FormatoNumero(Importe, 2);
|
||||
// } else {
|
||||
// TxtImporte.value = FormatoNumero(ImporteDiferencia, 2);
|
||||
// }
|
||||
// } else {
|
||||
// TxtImporte.value = "";
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
|
||||
var Importe = 0;
|
||||
|
||||
if (TxtImporte.value.includes('.')) {
|
||||
return;
|
||||
}
|
||||
if (TxtImporte.value.includes(',')) {
|
||||
return;
|
||||
}
|
||||
|
||||
var regex = new RegExp("^[-+]?[0-9]+\.[0-9]+$");
|
||||
|
||||
if (regex.test(TxtImporte.value)) {
|
||||
if (TxtImporte.value != '') {
|
||||
Importe = parseFloat(TxtImporte.value);
|
||||
}
|
||||
|
||||
let SaldoMaximoUtilizable = parseFloat(HdnSaldoMaximoUsados.value)
|
||||
let ImportesAsignados = 0;
|
||||
$('.ImportesRNCCargo').each(function () {
|
||||
if ($(this).context.id != TxtImporte.id) {
|
||||
ImportesAsignados += ToDouble($(this).val());
|
||||
}
|
||||
});
|
||||
let ImporteDiferencia = SaldoMaximoUtilizable - ImportesAsignados;
|
||||
|
||||
if (Importe > ImporteDiferencia) {
|
||||
TxtImporte.value = FormatoNumero(ImporteDiferencia, 2);
|
||||
} else {
|
||||
TxtImporte.value = FormatoNumero(Importe, 2);;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function CalculaSaldoRNCBonChk(TxtImporte, Saldo, Chk) {
|
||||
if (Chk.checked) {
|
||||
TxtImporte.value = FormatoNumero(Saldo, 2);
|
||||
} else {
|
||||
TxtImporte.value = "";
|
||||
}
|
||||
}
|
||||
function LimitaSaldoRNCChk(TxtImporte, Saldo) {
|
||||
function LimitaSaldoRNCBonChk(TxtImporte, Saldo) {
|
||||
var Importe = 0;
|
||||
|
||||
if (TxtImporte.value.includes('.')) {
|
||||
@@ -7543,6 +7642,7 @@
|
||||
var totalDebito = ToDouble($get("TxtImporteDebito").value);
|
||||
var totalCheque = ToDouble($get("TxtImporteCheque").value);
|
||||
var totalTransferencia = ToDouble($get("TxtImporteTransferencia").value);
|
||||
var totalRNC = ToDouble($get("HdnTotalRNC").value);
|
||||
|
||||
var TotalOtrosContado = 0;
|
||||
|
||||
@@ -7552,7 +7652,7 @@
|
||||
}
|
||||
} catch (e) { }
|
||||
|
||||
var total = totalEfectivo + totalCredito + totalDebito + totalCheque + totalTransferencia + TotalOtrosContado;
|
||||
var total = totalEfectivo + totalCredito + totalDebito + totalCheque + totalTransferencia + TotalOtrosContado + totalRNC;
|
||||
var totalVenta = ToDouble($get('TxtTotal').value);
|
||||
|
||||
if (total > totalVenta) {
|
||||
@@ -7561,7 +7661,7 @@
|
||||
$get("TxtCambio").value = "0.00";
|
||||
}
|
||||
|
||||
$get("TxtImporteContado").value = total;
|
||||
$get("TxtImporteContado").value = total - totalRNC;
|
||||
}
|
||||
|
||||
// ****************************************************************************************************************************************************************************
|
||||
@@ -8100,23 +8200,23 @@
|
||||
function ConvertirPesos(ChkConvertirDoctoPesos) {
|
||||
//LIMPIA
|
||||
$('#<%= LtlTotalConvertido.ClientID %>').text('');
|
||||
$("#TrConversionPesosTexto").hide();
|
||||
$("#TrConversionPesosTexto").hide();
|
||||
|
||||
//CALCULA
|
||||
if (ChkConvertirDoctoPesos.checked) {
|
||||
ConvertirDllsPesos();
|
||||
}
|
||||
}
|
||||
|
||||
function ConvertirPesosDlls() {
|
||||
var totalPesos = FormatoNumero(ToDouble($get('TxtTotal').value) / ToDouble($get('TxtTipoCambioDlls').value), 2)
|
||||
$('#<%= LblDolaresConvertidos.ClientID %>').text(totalPesos);
|
||||
$("#TrConversionDolaresTexto").show();
|
||||
//CALCULA
|
||||
if (ChkConvertirDoctoPesos.checked) {
|
||||
ConvertirDllsPesos();
|
||||
}
|
||||
}
|
||||
|
||||
function ConvertirDolares(ChkConvertirDolares) {
|
||||
//LIMPIA
|
||||
$('#<%= LblDolaresConvertidos.ClientID %>').text('');
|
||||
function ConvertirPesosDlls() {
|
||||
var totalPesos = FormatoNumero(ToDouble($get('TxtTotal').value) / ToDouble($get('TxtTipoCambioDlls').value), 2)
|
||||
$('#<%= LblDolaresConvertidos.ClientID %>').text(totalPesos);
|
||||
$("#TrConversionDolaresTexto").show();
|
||||
}
|
||||
|
||||
function ConvertirDolares(ChkConvertirDolares) {
|
||||
//LIMPIA
|
||||
$('#<%= LblDolaresConvertidos.ClientID %>').text('');
|
||||
$("#TrConversionDolaresTexto").hide();
|
||||
|
||||
//CALCULA
|
||||
|
||||
@@ -1791,6 +1791,15 @@ Partial Class Ventas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property SerieVenta As String
|
||||
Get
|
||||
Return IfNull(ViewState("SerieVenta"), "", ViewState("SerieVenta")).ToString()
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("SerieVenta") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
'#Region "AuxiliarConta"
|
||||
@@ -1985,6 +1994,7 @@ Partial Class Ventas
|
||||
|
||||
DdlSATPS.setEsWebService(True) : DdlSATPS.Attributes.Add("data-metodo", "getpssat")
|
||||
DivPSSAT.Visible = True
|
||||
|
||||
SetValues()
|
||||
CvePresupuesto = 0
|
||||
|
||||
@@ -3671,6 +3681,10 @@ Partial Class Ventas
|
||||
DdlEstadoSAT.DataBind()
|
||||
DdlEstadoSAT.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
If UsuarioActual.CveEmpresa = 140 AndAlso ClaveSATPais = "MEX" Then
|
||||
DdlEstadoSAT.SelectedValueExist("26")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Sub DdlSATPais_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaEstados(DdlSATPais.SelectedValue)
|
||||
@@ -4065,7 +4079,9 @@ Partial Class Ventas
|
||||
|
||||
|
||||
ViewState("FolioFiscal") = DbRowVenta("FolioFiscal").ToString()
|
||||
LblSerie.Text = DbRowVenta("Serie").ToString()
|
||||
|
||||
SerieVenta = DbRowVenta("Serie").ToString()
|
||||
LblSerie.Text = SerieVenta
|
||||
ViewState("Serie") = DbRowVenta("Serie").ToString()
|
||||
ViewState("Folio") = DbRowVenta("Folio").ToString().ToEntero()
|
||||
TxtFolio.Text = DbRowVenta("Folio").ToString()
|
||||
@@ -8305,6 +8321,7 @@ Partial Class Ventas
|
||||
If ObjFolios.GetFolios(factura.TipoDocto, UsuarioActual.CveEmpresa) Then
|
||||
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", DdlSubProyectoDatos.SelectedValue.ToEntero()))
|
||||
If DT.Rows.Count > 0 Then
|
||||
factura.Serie = DT.Rows(0)("Serie").ToString()
|
||||
factura.Folio = DT.Rows(0)("FActual").ToString().ToEntero()
|
||||
Else
|
||||
ProcesoCorrecto = False
|
||||
@@ -8492,6 +8509,11 @@ Partial Class Ventas
|
||||
ObjFactura.FacturarSucursal = (Me.FacturarSucursal AndAlso DdlSucursalCliente.SelectedValue.ToEntero() > 0 AndAlso (Me.ClienteSucursal IsNot Nothing AndAlso Not String.IsNullOrEmpty(Me.ClienteSucursal.RFC)))
|
||||
ObjFactura.VentaDesglosaIEPS = Me.VentaDesglosaIEPS
|
||||
'ObjFactura.RefDocto = TxtDocto.Text.Trim
|
||||
|
||||
If EsCreaApartirDe Then
|
||||
ViewState("EstablecioFolio") = False
|
||||
End If
|
||||
|
||||
'si es cancelacion, debe de conservar el folio actual
|
||||
If Not EsCancelacion Then ObjFactura.Folio = If(EstablecioFolio Or VistaPrevia Or (CveVenta > 0 And (NuevaFactura.Contiene(0, 2))), TxtFolio.Text.Trim.ToEntero(), -1)
|
||||
|
||||
@@ -10090,11 +10112,6 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not GuardarUsados(ObjVentas.IniciaTransacSQL, ObjVentas.CveVenta) Then
|
||||
ErrorList.Add("Error al guardar usados")
|
||||
End If
|
||||
|
||||
|
||||
If ErrorList.Count = 0 AndAlso ObjVentas.CveVenta > 0 Then
|
||||
|
||||
factura.CveVenta = ObjVentas.CveVenta
|
||||
@@ -10104,6 +10121,10 @@ Partial Class Ventas
|
||||
factura.Timbre.Comprobante.Serie = ObjVentas.Serie
|
||||
factura.Timbre.Comprobante.Folio = ObjVentas.Folio.ToString()
|
||||
|
||||
If Not GuardarUsados(ObjVentas.IniciaTransacSQL, factura) Then
|
||||
ErrorList.Add("Error al guardar usados")
|
||||
End If
|
||||
|
||||
If factura.TipoDocto = "Egs" AndAlso NuevaFactura = 1 Then
|
||||
If DtVentasNC Is Nothing Then
|
||||
InicializaDTVentasNC()
|
||||
@@ -15061,7 +15082,11 @@ Partial Class Ventas
|
||||
'ViewState("NumAprobacion") = CLng(DT.Rows(0)("Aprobacion").ToString())
|
||||
'ViewState("FechaAprobacion") = DT.Rows(0)("FechaAprobacion").ToString().ToDate
|
||||
ViewState("FolioActual") = DT.Rows(0)("FActual").ToString()
|
||||
LblSerie.Text = DT.Rows(0)("Serie").ToString()
|
||||
If UsuarioActual.CveEmpresa = 140 AndAlso CveVenta > 0 AndAlso Not EsCreaApartirDe AndAlso Not String.IsNullOrEmpty(SerieVenta) Then
|
||||
LblSerie.Text = SerieVenta
|
||||
Else
|
||||
LblSerie.Text = DT.Rows(0)("Serie").ToString()
|
||||
End If
|
||||
TxtFolio.Text = DT.Rows(0)("FActual").ToString()
|
||||
BtnCrearApartirDe.Enabled = True
|
||||
BtnEmitirImprimir.Visible = True
|
||||
@@ -15116,7 +15141,13 @@ Partial Class Ventas
|
||||
'ViewState("SubProyectoPorcentajeIVA") = dr("IVA")
|
||||
ViewState("TipoFormato") = dr("TipoFormato")
|
||||
ViewState("Serie") = dr("Serie")
|
||||
LblSerie.Text = dr("Serie").ToString()
|
||||
|
||||
If UsuarioActual.CveEmpresa = 140 AndAlso Me.CveVenta > 0 AndAlso Not EsCreaApartirDe AndAlso Not String.IsNullOrEmpty(SerieVenta) Then
|
||||
LblSerie.Text = SerieVenta
|
||||
Else
|
||||
LblSerie.Text = dr("Serie").ToString()
|
||||
End If
|
||||
|
||||
If SerieXML <> "" Then LblSerie.Text = SerieXML
|
||||
Dim CveSubProyecto As Integer = GetSubProyectoSucursal()
|
||||
If CveSubProyecto > 0 Then CargaSubProyecto(CveSubProyecto)
|
||||
@@ -16877,9 +16908,9 @@ Partial Class Ventas
|
||||
|
||||
Protected Sub BtnAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnAgregarSucursal.Click
|
||||
|
||||
Dim LT As String = "0"
|
||||
Dim LG As String = "0"
|
||||
|
||||
Dim LT As String = "0"
|
||||
Dim LG As String = "0"
|
||||
|
||||
If CveCliente > 0 Then
|
||||
Dim ObjCliente As New ClsClientes
|
||||
Try
|
||||
@@ -16924,13 +16955,13 @@ Partial Class Ventas
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar la sucursal", ex)
|
||||
End Try
|
||||
ObjCliente.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
UpCliente.Update()
|
||||
RegistraScript("hideDivAgregarSucursal();")
|
||||
|
||||
ObjCliente.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
UpCliente.Update()
|
||||
RegistraScript("hideDivAgregarSucursal();")
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -21285,11 +21316,6 @@ Partial Class Ventas
|
||||
Return
|
||||
End If
|
||||
|
||||
If DdlSATPS.SelectedValue = "" OrElse DdlSATPS.SelectedValue = "46920" Then
|
||||
Alert("Producto SAT no valido", TipoMensaje.MsgAdvertencia)
|
||||
Return
|
||||
End If
|
||||
|
||||
Dim CveMetodoInventario As Integer = 0
|
||||
If ChkRequiereSerie.Checked Then CveMetodoInventario = 5 Else CveMetodoInventario = 1
|
||||
|
||||
@@ -22990,12 +23016,12 @@ Partial Class Ventas
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
DeshabilitarAplicarNotaDeCredito(LblRFC.Text)
|
||||
|
||||
AplicaNCMasiva = False
|
||||
AplicaNC = False
|
||||
LBNotaCredito.Visible = True
|
||||
'LkNotaCredito.Visible = False
|
||||
DeshabilitarAplicarNotaDeCredito(LblRFC.Text)
|
||||
|
||||
TxtNCPorcentaje.Attributes.Add("onkeyup", "CalculaImporteNC();")
|
||||
TxtNCImporte.Attributes.Add("onkeyup", "CalculaPorcentajeNC();")
|
||||
@@ -23083,6 +23109,7 @@ Partial Class Ventas
|
||||
|
||||
Me.TmpDTRNCBonificacionesCliente = DtNC.FiltraParametros("TipoRNC = 2")
|
||||
Me.TmpDTRNCBonificacionesCliente.Columns.Add("ImporteBonificacion", GetType(Decimal))
|
||||
Me.TmpDTRNCBonificacionesCliente.Columns.Add("IVABonificacion", GetType(Decimal))
|
||||
Me.TmpDTRNCBonificacionesCliente.Columns.Add("CveVentaRNCCargo", GetType(Integer))
|
||||
|
||||
GvRemisionesNC.DataBind()
|
||||
@@ -23090,7 +23117,7 @@ Partial Class Ventas
|
||||
|
||||
If CveVentaUsado > 0 Then
|
||||
Dim FacUsado As New Modelos.Factura(UsuarioActual, CveVentaUsado, UsuarioActual.CveEmpresa)
|
||||
LtlSMU.Text = String.Format("{0:N2}", FacUsado.DtDetalle.SUM("Total", "EsCargo = True").ToDecimal())
|
||||
LtlSMU.Text = String.Format("{0:N2}", FacUsado.DtDetalle.SUM("Total", "EsCargo = True").ToDecimal() + FacUsado.DtDetalle.SUM("ImporteIVA", "EsCargo = True").ToDecimal())
|
||||
Else
|
||||
LtlSMU.Text = String.Format("{0:N2}", 0)
|
||||
End If
|
||||
@@ -23112,12 +23139,16 @@ Partial Class Ventas
|
||||
|
||||
Me.TmpDTRNCBonificacionesCliente = DtNC.FiltraParametros("TipoRNC = 2")
|
||||
Me.TmpDTRNCBonificacionesCliente.Columns.Add("ImporteBonificacion", GetType(Decimal))
|
||||
Me.TmpDTRNCBonificacionesCliente.Columns.Add("IVABonificacion", GetType(Decimal))
|
||||
Me.TmpDTRNCBonificacionesCliente.Columns.Add("CveVentaRNCCargo", GetType(Integer))
|
||||
|
||||
GvDescNCCargos.DataBind()
|
||||
GvDescNCBonificaciones.DataBind()
|
||||
|
||||
LblSaldoMaximoUsados.Text = String.Format("{0:N2}", Me.TmpDT.SUM("Total", "EsCargo = True").ToDecimal())
|
||||
Dim SaldoMaximoUsados As Decimal = Me.TmpDT.SUM("Total", "EsCargo = True").ToDecimal() + Me.TmpDT.SUM("ImporteIVA", "EsCargo = True").ToDecimal()
|
||||
|
||||
LblSaldoMaximoUsados.Text = String.Format("{0:N2}", SaldoMaximoUsados)
|
||||
HdnSaldoMaximoUsados.Value = SaldoMaximoUsados.ToString()
|
||||
|
||||
UpDescNC.Update()
|
||||
End Sub
|
||||
@@ -23130,28 +23161,52 @@ Partial Class Ventas
|
||||
TmpDTRNCBonificacionesSeleccionadas = Me.TmpDTRNCBonificacionesCliente.Clone()
|
||||
End If
|
||||
|
||||
Dim CveVentaBonificacion As Integer = -1
|
||||
Dim ImporteBonificacion As Decimal = 0
|
||||
Dim ListaBon As New List(Of VentasBonificaciones)
|
||||
Dim DtBon As DataTable = Nothing
|
||||
Dim SbFiltro As New StringBuilder()
|
||||
SbFiltro.Append("CveVenta IN(")
|
||||
Using ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.DistribuidorMovtosGet(CveCliente, UsuarioActual.CveEmpresa, CveVentaRNCCargo:=GvRow.DataKey("CveVenta").ToEntero()) Then
|
||||
Dim RowMovto As DataRow = ObjAcum.DtResultados.FiltroPrimero("")
|
||||
|
||||
CveVentaBonificacion = RowMovto("CveVentaBonificacion").ToString().ToEntero()
|
||||
ImporteBonificacion = RowMovto("ImporteBonificacion").ToString().ToDecimal()
|
||||
DtBon = ObjAcum.DtResultados.Copy()
|
||||
End If
|
||||
End Using
|
||||
|
||||
If CveVentaBonificacion > 0 Then
|
||||
Dim RowBonificacion As DataRow = Me.TmpDTRNCBonificacionesCliente.FiltroPrimero($"CveVenta = {CveVentaBonificacion}")
|
||||
RowBonificacion("ImporteBonificacion") = ImporteBonificacion
|
||||
RowBonificacion("CveVentaRNCCargo") = GvRow.DataKey("CveVenta").ToEntero()
|
||||
If DtBon IsNot Nothing Then
|
||||
Dim queryBonificacion = From dr In DtBon
|
||||
Group By CveVentaBonificacion = dr("CveVentaBonificacion").ToString().ToEntero
|
||||
Into x = Group
|
||||
Select New With {
|
||||
.CveVentaBonificacion = CveVentaBonificacion,
|
||||
.ImporteBonificacion = x.Sum(Function(s) s("ImporteBonificacion").ToString().ToDecimal),
|
||||
.IVABonificacion = x.Sum(Function(s) s("IVABonificacion").ToString().ToDecimal)
|
||||
}
|
||||
|
||||
If ChkAplicarRNC.Checked Then
|
||||
TmpDTRNCBonificacionesSeleccionadas.Rows.Add(RowBonificacion.ItemArray)
|
||||
Else
|
||||
Dim RowEliminar As DataRow = Me.TmpDTRNCBonificacionesSeleccionadas.Select($"CveVenta = {CveVentaBonificacion}").FirstOrDefault()
|
||||
TmpDTRNCBonificacionesSeleccionadas.Rows.Remove(RowEliminar)
|
||||
End If
|
||||
For Each bon In queryBonificacion
|
||||
SbFiltro.AppendFormat("'{0}',", bon.CveVentaBonificacion)
|
||||
ListaBon.Add(New VentasBonificaciones() With {.CveVentaRNCCargo = GvRow.DataKey("CveVenta").ToEntero(), .CveVentaBonificacion = bon.CveVentaBonificacion, .ImporteBonificacion = bon.ImporteBonificacion, .IVABonificacion = bon.IVABonificacion})
|
||||
Next
|
||||
SbFiltro.Remove(SbFiltro.Length - 1, 1)
|
||||
SbFiltro.Append(")")
|
||||
End If
|
||||
|
||||
If ListaBon.Count > 0 Then
|
||||
Dim Bonificaciones = Me.TmpDTRNCBonificacionesCliente.Select(SbFiltro.ToString())
|
||||
|
||||
For Each RowBonificacion As DataRow In Bonificaciones
|
||||
Dim RNCBonificacion = ListaBon.Where(Function(x) x.CveVentaBonificacion = RowBonificacion("CveVenta").ToString().ToEntero())
|
||||
|
||||
RowBonificacion("ImporteBonificacion") = RNCBonificacion.Sum(Function(x) x.ImporteBonificacion)
|
||||
RowBonificacion("IVABonificacion") = RNCBonificacion.Sum(Function(x) x.IVABonificacion)
|
||||
RowBonificacion("CveVentaRNCCargo") = GvRow.DataKey("CveVenta").ToEntero()
|
||||
|
||||
If ChkAplicarRNC.Checked Then
|
||||
TmpDTRNCBonificacionesSeleccionadas.Rows.Add(RowBonificacion.ItemArray)
|
||||
Else
|
||||
For Each RowEliminar In Me.TmpDTRNCBonificacionesSeleccionadas.Select(SbFiltro.ToString())
|
||||
RowEliminar.Delete()
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
@@ -23165,7 +23220,7 @@ Partial Class Ventas
|
||||
GvDescNCBonificaciones.DataSource = TmpDTRNCBonificacionesSeleccionadas
|
||||
GvDescNCBonificaciones.DataBind()
|
||||
|
||||
LblSaldoMaximoBonificacion.Text = String.Format("{0:N2}", Me.TmpDTRNCBonificacionesSeleccionadas.SUM("ImporteBonificacion").ToDecimal())
|
||||
LblSaldoMaximoBonificacion.Text = String.Format("{0:N2}", Me.TmpDTRNCBonificacionesSeleccionadas.SUM("ImporteBonificacion").ToDecimal() + Me.TmpDTRNCBonificacionesSeleccionadas.SUM("IVABonificacion").ToDecimal())
|
||||
|
||||
UpDescNC.Update()
|
||||
|
||||
@@ -23178,28 +23233,52 @@ Partial Class Ventas
|
||||
TmpDTRNCBonificacionesSeleccionadas = Me.TmpDTRNCBonificacionesCliente.Clone()
|
||||
End If
|
||||
|
||||
Dim CveVentaBonificacion As Integer = -1
|
||||
Dim ImporteBonificacion As Decimal = 0
|
||||
Dim ListaBon As New List(Of VentasBonificaciones)
|
||||
Dim DtBon As DataTable = Nothing
|
||||
Dim SbFiltro As New StringBuilder()
|
||||
SbFiltro.Append("CveVenta IN(")
|
||||
Using ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.DistribuidorMovtosGet(CveCliente, UsuarioActual.CveEmpresa, CveVentaRNCCargo:=GvRow.DataKey("CveVenta").ToEntero()) Then
|
||||
Dim RowMovto As DataRow = ObjAcum.DtResultados.FiltroPrimero("")
|
||||
|
||||
CveVentaBonificacion = RowMovto("CveVentaBonificacion").ToString().ToEntero()
|
||||
ImporteBonificacion = RowMovto("ImporteBonificacion").ToString().ToDecimal()
|
||||
DtBon = ObjAcum.DtResultados.Copy()
|
||||
End If
|
||||
End Using
|
||||
|
||||
If CveVentaBonificacion > 0 Then
|
||||
Dim RowBonificacion As DataRow = Me.TmpDTRNCBonificacionesCliente.FiltroPrimero($"CveVenta = {CveVentaBonificacion}")
|
||||
RowBonificacion("ImporteBonificacion") = ImporteBonificacion
|
||||
RowBonificacion("CveVentaRNCCargo") = GvRow.DataKey("CveVenta").ToEntero()
|
||||
If DtBon IsNot Nothing Then
|
||||
Dim queryBonificacion = From dr In DtBon
|
||||
Group By CveVentaBonificacion = dr("CveVentaBonificacion").ToString().ToEntero
|
||||
Into x = Group
|
||||
Select New With {
|
||||
.CveVentaBonificacion = CveVentaBonificacion,
|
||||
.ImporteBonificacion = x.Sum(Function(s) s("ImporteBonificacion").ToString().ToDecimal),
|
||||
.IVABonificacion = x.Sum(Function(s) s("IVABonificacion").ToString().ToDecimal)
|
||||
}
|
||||
|
||||
If ChkAplicarRNC.Checked Then
|
||||
TmpDTRNCBonificacionesSeleccionadas.Rows.Add(RowBonificacion.ItemArray)
|
||||
Else
|
||||
Dim RowEliminar As DataRow = Me.TmpDTRNCBonificacionesSeleccionadas.Select($"CveVenta = {CveVentaBonificacion}").FirstOrDefault()
|
||||
TmpDTRNCBonificacionesSeleccionadas.Rows.Remove(RowEliminar)
|
||||
End If
|
||||
For Each bon In queryBonificacion
|
||||
SbFiltro.AppendFormat("'{0}',", bon.CveVentaBonificacion)
|
||||
ListaBon.Add(New VentasBonificaciones() With {.CveVentaRNCCargo = GvRow.DataKey("CveVenta").ToEntero(), .CveVentaBonificacion = bon.CveVentaBonificacion, .ImporteBonificacion = bon.ImporteBonificacion, .IVABonificacion = bon.IVABonificacion})
|
||||
Next
|
||||
SbFiltro.Remove(SbFiltro.Length - 1, 1)
|
||||
SbFiltro.Append(")")
|
||||
End If
|
||||
|
||||
If ListaBon.Count > 0 Then
|
||||
Dim Bonificaciones = Me.TmpDTRNCBonificacionesCliente.Select(SbFiltro.ToString())
|
||||
|
||||
For Each RowBonificacion As DataRow In Bonificaciones
|
||||
Dim RNCBonificacion = ListaBon.Where(Function(x) x.CveVentaBonificacion = RowBonificacion("CveVenta").ToString().ToEntero())
|
||||
|
||||
RowBonificacion("ImporteBonificacion") = RNCBonificacion.Sum(Function(x) x.ImporteBonificacion)
|
||||
RowBonificacion("IVABonificacion") = RNCBonificacion.Sum(Function(x) x.IVABonificacion)
|
||||
RowBonificacion("CveVentaRNCCargo") = GvRow.DataKey("CveVenta").ToEntero()
|
||||
|
||||
If ChkAplicarRNC.Checked Then
|
||||
TmpDTRNCBonificacionesSeleccionadas.Rows.Add(RowBonificacion.ItemArray)
|
||||
Else
|
||||
For Each RowEliminar In Me.TmpDTRNCBonificacionesSeleccionadas.Select(SbFiltro.ToString())
|
||||
RowEliminar.Delete()
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
@@ -23213,7 +23292,7 @@ Partial Class Ventas
|
||||
GvRemisionesNCBon.DataSource = TmpDTRNCBonificacionesSeleccionadas
|
||||
GvRemisionesNCBon.DataBind()
|
||||
|
||||
LtlSMUBon.Text = String.Format("{0:N2}", Me.TmpDTRNCBonificacionesSeleccionadas.SUM("ImporteBonificacion").ToDecimal())
|
||||
LtlSMUBon.Text = String.Format("{0:N2}", Me.TmpDTRNCBonificacionesSeleccionadas.SUM("ImporteBonificacion").ToDecimal() + Me.TmpDTRNCBonificacionesSeleccionadas.SUM("IVABonificacion").ToDecimal())
|
||||
|
||||
UpModalRemisionesNC.Update()
|
||||
|
||||
@@ -23226,8 +23305,8 @@ Partial Class Ventas
|
||||
End Sub
|
||||
Protected Sub GvDescNCBonificaciones_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDescNCBonificaciones.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.FCCheckBox("ChkAplicar").Attributes.Add("onclick", $"CalculaSaldoRNCChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble}, this);")
|
||||
e.Row.FCTextBox("TxtImporte").Attributes.Add("onkeyup", $"LimitaSaldoRNCChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble});")
|
||||
e.Row.FCCheckBox("ChkAplicar").Attributes.Add("onclick", $"CalculaSaldoRNCBonChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble}, this);")
|
||||
e.Row.FCTextBox("TxtImporte").Attributes.Add("onkeyup", $"LimitaSaldoRNCBonChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble});")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -23575,7 +23654,7 @@ Partial Class Ventas
|
||||
Dim UltimoRenglonRNC As Integer = 1
|
||||
For Each RowUsado As DataRow In RNC.DtDetalle.Rows
|
||||
|
||||
Dim PorcentajeUsado = (RowUsado("Total").ToString().ToDecimal() - RowUsado("Descuento").ToString().ToDecimal() + RowUsado("ImporteIVA").ToString().ToDecimal() + RowUsado("ImporteIEPS").ToString().ToDecimal() - RowUsado("ImporteRetIVA").ToString().ToDecimal() - RowUsado("ImporteRetISR").ToString().ToDecimal()) / RNC.Total
|
||||
Dim PorcentajeUsado = ((RowUsado("Total").ToString().ToDecimal() - RowUsado("Descuento").ToString().ToDecimal() + RowUsado("ImporteIVA").ToString().ToDecimal() + RowUsado("ImporteIEPS").ToString().ToDecimal() - RowUsado("ImporteRetIVA").ToString().ToDecimal() - RowUsado("ImporteRetISR").ToString().ToDecimal()) / RNC.Total) / ListaNC.Count
|
||||
Dim Obs = RowUsado("CodigoPS").ToString()
|
||||
|
||||
If Not String.IsNullOrEmpty(TxtNCObservaciones.Text.Trim()) Then
|
||||
@@ -23620,7 +23699,7 @@ Partial Class Ventas
|
||||
|
||||
For Each RowCargo As DataRow In RNCCargo.DtDetalle.Rows
|
||||
|
||||
Dim PorcentajeCargo = (RowCargo("Total").ToString().ToDecimal() - RowCargo("Descuento").ToString().ToDecimal() + RowCargo("ImporteIVA").ToString().ToDecimal() + RowCargo("ImporteIEPS").ToString().ToDecimal() - RowCargo("ImporteRetIVA").ToString().ToDecimal() - RowCargo("ImporteRetISR").ToString().ToDecimal()) / RNCCargo.Total
|
||||
Dim PorcentajeCargo = ((RowCargo("Total").ToString().ToDecimal() - RowCargo("Descuento").ToString().ToDecimal() + RowCargo("ImporteIVA").ToString().ToDecimal() + RowCargo("ImporteIEPS").ToString().ToDecimal() - RowCargo("ImporteRetIVA").ToString().ToDecimal() - RowCargo("ImporteRetISR").ToString().ToDecimal()) / RNCCargo.Total) / ListaNCBonificacion.Count
|
||||
|
||||
Dim Obs = RowCargo("CodigoPS").ToString()
|
||||
|
||||
@@ -26510,29 +26589,21 @@ Partial Class Ventas
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function GuardarUsados(SqlTransaccion As SqlClient.SqlTransaction, CveVenta As Integer) As Boolean
|
||||
Private Function GuardarUsados(SqlTransaccion As SqlClient.SqlTransaction, factura As Modelos.Factura) As Boolean
|
||||
Dim Resultado As Boolean = True
|
||||
|
||||
If ClienteEsDistribuidor Then
|
||||
'If UsuarioActual.Empresa.Funcionalidad(533).ToEntero() > 0 Then
|
||||
' Dim CvePSPSA As Integer = UsuarioActual.Empresa.Funcionalidad(533).ToEntero()
|
||||
|
||||
If ClienteEsDistribuidor AndAlso factura.TipoDocto.Contiene("Ing") Then
|
||||
Dim ObjAcum As New ClsAcumuladores(SqlTransaccion)
|
||||
|
||||
Dim CvePSPSA As Integer = UsuarioActual.Empresa.Funcionalidad(533).ToEntero
|
||||
|
||||
For Each drow As DataRow In TmpDT.Rows
|
||||
If drow("CveTamaño").ToString().ToEntero() > 0 Then
|
||||
Dim TempDTAcums = GlobalDTAcumTamaños.FiltraParametros("CvePSCargo = " & drow("CvePS").ToString())
|
||||
If TempDTAcums IsNot Nothing AndAlso TempDTAcums.Rows.Count > 0 Then
|
||||
If Not ObjAcum.DistribuidorMovtosAdd(CveCliente, drow("Cantidad").ToString().ToEntero(), drow("CveTamaño").ToString().ToEntero(), 2, CveVenta, UsuarioActual.CveUsuario,
|
||||
UsuarioActual.CveEmpresa, 0D, "") Then
|
||||
Resultado = False
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
Resultado = True
|
||||
For Each drow As DataRow In factura.DtDetalle.Rows
|
||||
If drow("CveTamaño").ToString.ToEntero > 0 And (CvePSPSA <> drow("CvePS").ToString.ToEntero) Then
|
||||
If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, drow("Cantidad").ToString.ToEntero, drow("CveTamaño").ToString.ToEntero, 2, factura.CveVenta, UsuarioActual.CveUsuario,
|
||||
UsuarioActual.CveEmpresa, 0D, "") Then
|
||||
Resultado = False
|
||||
Exit For
|
||||
End If
|
||||
TempDTAcums.Dispose()
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
@@ -26650,81 +26721,96 @@ Partial Class Ventas
|
||||
RegistraScript("$('#ModalAplicarDescuentoNC').modal('show'); ")
|
||||
End Sub
|
||||
Protected Sub BtnAplicarDesc_Click(sender As Object, e As EventArgs)
|
||||
Dim CveSATNC = "84111506"
|
||||
Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, SATClavePS:=CveSATNC, AplicaParaVenta:=1).Rows(0)
|
||||
Try
|
||||
Dim CveSATNC = "84111506"
|
||||
Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, SATClavePS:=CveSATNC, AplicaParaVenta:=1).Rows(0)
|
||||
|
||||
If DrPS Is Nothing Then
|
||||
Alert("Ocurrió un error al cargar la información del Producto. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
AplicaNCMasiva = True
|
||||
|
||||
If ListaNCDesc Is Nothing Then
|
||||
ListaNCDesc = New List(Of Modelos.Factura)
|
||||
Else
|
||||
ListaNCDesc.Clear()
|
||||
End If
|
||||
|
||||
If ListaNCBonificacion Is Nothing Then
|
||||
ListaNCBonificacion = New List(Of Modelos.Factura)
|
||||
Else
|
||||
ListaNCBonificacion.Clear()
|
||||
End If
|
||||
|
||||
Dim TotalRemNCAplicado As Decimal = 0
|
||||
For Each GvRow As GridViewRow In GvDescNCCargos.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
If GvRow.FCCheckBox("ChkAplicar").Checked Then
|
||||
Dim RemNC As New Modelos.Factura(UsuarioActual, GvRow.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa)
|
||||
RemNC.TotalRemNCAplicado = GvRow.FCTextBox("TxtImporte").Text.ToDecimal()
|
||||
TotalRemNCAplicado += RemNC.TotalRemNCAplicado
|
||||
|
||||
If RemNC.TotalRemNCAplicado <= 0 Then
|
||||
Alert($"Debe asignar un importe en la siguiente remisión: <b>{RemNC.SerieFolio}</b>", TipoMensaje.MsgAdvertencia)
|
||||
ListaNCDesc.Clear()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
ListaNCDesc.Add(RemNC)
|
||||
End If
|
||||
If DrPS Is Nothing Then
|
||||
Alert("Ocurrió un error al cargar la información del Producto. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim LimiteUsados As Decimal = Me.TmpDT.SUM("Total", "EsCargo = True").ToDecimal()
|
||||
AplicaNCMasiva = True
|
||||
|
||||
'VERIFICA EL LIMITE DE LOS USADOS
|
||||
If TotalRemNCAplicado > LimiteUsados Then
|
||||
Alert($"La suma de las remisiones de nota de crédito de tipo 'Cargo' no debe superar el total de Usados.<br/>Total RNC: {TotalRemNCAplicado:N2}.<br/>Total Usados: {LimiteUsados:N2}", TipoMensaje.MsgAdvertencia)
|
||||
ListaNCDesc.Clear()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
For Each GvRow As GridViewRow In GvDescNCBonificaciones.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
If GvRow.FCCheckBox("ChkAplicar").Checked Then
|
||||
Dim RemNC As New Modelos.Factura(UsuarioActual, GvRow.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa)
|
||||
RemNC.TotalRemNCAplicado = GvRow.FCTextBox("TxtImporte").Text.ToDecimal()
|
||||
RemNC.CveVentaRNCCargo = GvRow.DataKey("CveVentaRNCCargo").ToEntero()
|
||||
TotalRemNCAplicado += RemNC.TotalRemNCAplicado
|
||||
|
||||
If RemNC.TotalRemNCAplicado <= 0 Then
|
||||
Alert($"Debe asignar un importe en la siguiente remisión: <b>{RemNC.SerieFolio}</b>", TipoMensaje.MsgAdvertencia)
|
||||
ListaNCBonificacion.Clear()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
ListaNCBonificacion.Add(RemNC)
|
||||
End If
|
||||
If ListaNCDesc Is Nothing Then
|
||||
ListaNCDesc = New List(Of Modelos.Factura)
|
||||
Else
|
||||
ListaNCDesc.Clear()
|
||||
End If
|
||||
Next
|
||||
|
||||
LblDescuentosRNC.Text = TotalRemNCAplicado.FormatoNumero
|
||||
LblTotalNC.Text = (TxtTotal.Text.ToDecimal() - TotalRemNCAplicado).FormatoNumero
|
||||
If ListaNCBonificacion Is Nothing Then
|
||||
ListaNCBonificacion = New List(Of Modelos.Factura)
|
||||
Else
|
||||
ListaNCBonificacion.Clear()
|
||||
End If
|
||||
|
||||
Dim CvePS = DrPS("CvePS").ToString().ToEntero()
|
||||
Dim TotalRemNCAplicado As Decimal = 0
|
||||
For Each GvRow As GridViewRow In GvDescNCCargos.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
If GvRow.FCCheckBox("ChkAplicar").Checked Then
|
||||
Dim RemNC As New Modelos.Factura(UsuarioActual, GvRow.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa)
|
||||
RemNC.TotalRemNCAplicado = GvRow.FCTextBox("TxtImporte").Text.ToDecimal()
|
||||
TotalRemNCAplicado += RemNC.TotalRemNCAplicado
|
||||
|
||||
If RemNC.TotalRemNCAplicado <= 0 Then
|
||||
Alert($"Debe asignar un importe en la siguiente remisión: <b>{RemNC.SerieFolio}</b>", TipoMensaje.MsgAdvertencia)
|
||||
ListaNCDesc.Clear()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
ListaNCDesc.Add(RemNC)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim LimiteUsados As Decimal = LblSaldoMaximoUsados.Text.Trim().ToDecimal()
|
||||
|
||||
'VERIFICA EL LIMITE DE LOS USADOS
|
||||
If TotalRemNCAplicado > LimiteUsados Then
|
||||
Alert($"La suma de las remisiones de nota de crédito de tipo 'Cargo' no debe superar el total de Usados.<br/>Total RNC: {TotalRemNCAplicado:N2}.<br/>Total Usados: {LimiteUsados:N2}", TipoMensaje.MsgAdvertencia)
|
||||
ListaNCDesc.Clear()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
For Each GvRow As GridViewRow In GvDescNCBonificaciones.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
If GvRow.FCCheckBox("ChkAplicar").Checked Then
|
||||
Dim RemNC As New Modelos.Factura(UsuarioActual, GvRow.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa)
|
||||
RemNC.TotalRemNCAplicado = GvRow.FCTextBox("TxtImporte").Text.ToDecimal()
|
||||
RemNC.CveVentaRNCCargo = GvRow.DataKey("CveVentaRNCCargo").ToEntero()
|
||||
TotalRemNCAplicado += RemNC.TotalRemNCAplicado
|
||||
|
||||
If RemNC.TotalRemNCAplicado <= 0 Then
|
||||
Alert($"Debe asignar un importe en la siguiente remisión: <b>{RemNC.SerieFolio}</b>", TipoMensaje.MsgAdvertencia)
|
||||
ListaNCBonificacion.Clear()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
ListaNCBonificacion.Add(RemNC)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim LimiteBonficaciones As Decimal = LblSaldoMaximoBonificacion.Text.Trim().ToDecimal()
|
||||
|
||||
'VERIFICA EL LIMITE DE LOS USADOS
|
||||
If ListaNCBonificacion.Sum(Function(x) x.TotalRemNCAplicado) > LimiteBonficaciones Then
|
||||
Alert($"La suma de las remisiones de nota de crédito de tipo 'Cargo' no debe superar el total de Usados.<br/>Total RNC: {TotalRemNCAplicado:N2}.<br/>Total Usados: {LimiteUsados:N2}", TipoMensaje.MsgAdvertencia)
|
||||
ListaNCDesc.Clear()
|
||||
Exit Sub
|
||||
End If
|
||||
HdnTotalRNC.Value = TotalRemNCAplicado.ToString()
|
||||
LblDescuentosRNC.Text = TotalRemNCAplicado.FormatoNumero
|
||||
LblTotalNC.Text = (TxtTotal.Text.ToDecimal() - TotalRemNCAplicado).FormatoNumero
|
||||
|
||||
Dim CvePS = DrPS("CvePS").ToString().ToEntero()
|
||||
|
||||
AplicarNC(CvePS, True)
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al aplicar remisiones de nota de crédito", ex)
|
||||
End Try
|
||||
|
||||
AplicarNC(CvePS, True)
|
||||
|
||||
UpPS.Update()
|
||||
|
||||
@@ -27326,12 +27412,11 @@ Partial Class Ventas
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub DdlClasificacionPS_SelectedIndex(sender As Object, e As EventArgs) Handles DdlClasificacionPS.SelectedIndexChanged
|
||||
Dim SATPS As DataTable = GlobalDTClasificaciones(CveEmpresa:=UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacionPS.SelectedValue.ToEntero)
|
||||
Dim CveSATPS As String = SATPS.FiltroPrimeroValor("CveSATPS")
|
||||
Dim SatPSText As String = SATPS.FiltroPrimeroValor("SATClaveProductoServicio")
|
||||
DdlSATPS.SelectedValue = CveSATPS
|
||||
DdlSATPS.SelectedText = SatPSText
|
||||
End Sub
|
||||
|
||||
Partial Class VentasBonificaciones
|
||||
Public CveVentaRNCCargo As Integer = -1
|
||||
Public CveVentaBonificacion As Integer = -1
|
||||
Public ImporteBonificacion As Decimal = 0
|
||||
Public IVABonificacion As Decimal = 0
|
||||
End Class
|
||||
End Class
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ WebService Language="VB" Class="WSGPSApp" %>
|
||||
<%@ WebService Language="VB" Class="WSGPSApp" %>
|
||||
Option Strict On
|
||||
|
||||
Imports System.Web
|
||||
@@ -31,8 +31,8 @@ Public Class WSGPSApp
|
||||
Inherits System.Web.Services.WebService
|
||||
|
||||
Private Const LongValue As Long = &H100000000
|
||||
Public Property Credentials As AuthHeader
|
||||
|
||||
Public Property Credentials As AuthHeader
|
||||
|
||||
#Region "G L O B A L S"
|
||||
Property GlobalDTDispositivos(CveCliente As Integer) As DataTable
|
||||
Get
|
||||
@@ -90,7 +90,7 @@ Public Class WSGPSApp
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTDispositivosUsuarios") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
#End Region
|
||||
<SoapHeader("Credentials")>
|
||||
<WebMethod>
|
||||
@@ -411,7 +411,7 @@ Public Class WSGPSApp
|
||||
Public Function AddTramaApp(DevID As String, Lat As Double, Lng As Double, FechaTrama As DateTime, SO As String, Speed As Double) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
Using ObjGPS As New ClsGPS
|
||||
Retorno = ObjGPS.AddTrama(DevID,"", Lat, Lng, FechaTrama, Speed, String.Format("App{0}", SO))
|
||||
Retorno = ObjGPS.AddTrama(DevID, "", Lat, Lng, FechaTrama, Speed)
|
||||
End Using
|
||||
Return Retorno
|
||||
End Function
|
||||
@@ -990,8 +990,8 @@ Public Class WSGPSApp
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#Region "F U N C I O N E S"
|
||||
Private Sub CreaObjetoEmpresa(ByRef UsuarioActual As Usuario)
|
||||
Dim ObjEmpresa As New ClsSisEmpresas()
|
||||
@@ -1107,7 +1107,7 @@ Public Class WSGPSApp
|
||||
OnError("Acceso no autorizado", New SoapException("Unauthorized", SoapException.ClientFaultCode))
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
End Class
|
||||
Namespace ADGPSModels
|
||||
|
||||
@@ -118,6 +118,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user