This commit is contained in:
Antonio Gonzalez
2020-07-21 11:44:09 -07:00
21 changed files with 275 additions and 101 deletions

View File

@@ -1453,9 +1453,11 @@ Public Class ClsBancos
_Folio = SqlAdapter.SelectCommand.Parameters("@FolioRegistro").Value.ToString _Folio = SqlAdapter.SelectCommand.Parameters("@FolioRegistro").Value.ToString
Catch Ex1 As SqlException Catch Ex1 As SqlException
If Ex1.Message.Contains("Número: 2627;") Or Ex1.Message.Contains("Número: 2601;") Then If Ex1.Message.Contains("Número: 2627;") Then
Me.OnError("Ocurrió un error al Guardar el Movimiento.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Me.OnError("Ocurrió un error al Guardar el Movimiento.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
ElseIf Ex1.Message.Contains("Número: 2601;") Then
Alert("Ya existe un movimiento bancario con el mismo Folio: <b>" & Folio & "</b>.", TipoMensaje.MsgAdvertencia) Alert("Ya existe un movimiento bancario con el mismo Folio: <b>" & Folio & "</b>.", TipoMensaje.MsgAdvertencia)
Me.OnError("Ocurrió un error al Guardar el Movimiento. Ya existe un movimiento bancario con el mismo Folio: <b>" & Folio & "</b>.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Else Else
Me.OnError("Ocurrió un error al Guardar el Movimiento.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Me.OnError("Ocurrió un error al Guardar el Movimiento.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End If End If

View File

@@ -1460,7 +1460,13 @@ Public Class ClsPaginas
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
Dim ObjBancos As New ClsBancos Dim ObjBancos As New ClsBancos
If ObjBancos.GetBancosCuentasUsuarios(-1) Then If ObjBancos.GetBancosCuentasUsuarios(-1) Then
Application(AppNombre) = ObjBancos.DtResultados
If CveEmpresa > 0 Then
Application(AppNombre) = ObjBancos.DtResultados.FiltraParametros($"CveEmpresa = { CveEmpresa }")
Else
Application(AppNombre) = ObjBancos.DtResultados
End If
Else Else
Application(AppNombre) = Nothing Application(AppNombre) = Nothing
End If End If
@@ -8073,7 +8079,7 @@ Public Class ClsPaginas
End Sub End Sub
#End Region #End Region
Public Sub CargarCentrosDeCosto(DdlProyecto As DropDownList, DdlSubProyecto As DropDownList, LthProyectoP As Label, LblSubProyecto As Label) Public Sub CargarCentrosDeCosto(DdlProyecto As DropDownList, DdlSubProyecto As DropDownList, LthProyectoP As Label, LblSubProyecto As Label, Optional AplicaTodos As String = "Todos")
Select Case UsuarioActual.Empresa.Tipo_CentroCosto Select Case UsuarioActual.Empresa.Tipo_CentroCosto
Case 1 Case 1
If DdlProyecto IsNot Nothing Then DdlProyecto.Visible = False If DdlProyecto IsNot Nothing Then DdlProyecto.Visible = False
@@ -8096,15 +8102,15 @@ Public Class ClsPaginas
End Select End Select
If DdlProyecto IsNot Nothing Then If DdlProyecto IsNot Nothing Then
DdlProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1).FiltraParametros("", "", {"CveProyecto", "Proyecto"}), GlobalDTProyectos(UsuarioActual.CveEmpresa, -1).FiltraParametros("", "", {"CveProyecto", "Proyecto"})) DdlProyecto.DataSource = If(Not UsuarioActual.TienePermisoProceso(110), GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1).FiltraParametros("", "", {"CveProyecto", "Proyecto"}), GlobalDTProyectos(UsuarioActual.CveEmpresa, -1).FiltraParametros("", "", {"CveProyecto", "Proyecto"}))
DdlProyecto.DataBind() DdlProyecto.DataBind()
DdlProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) If AplicaTodos <> "" Then DdlProyecto.Items.Insert(0, New ListItem(AplicaTodos, "-1"))
End If End If
If DdlSubProyecto IsNot Nothing Then If DdlSubProyecto IsNot Nothing Then
DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) DdlSubProyecto.DataSource = If(Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1))
DdlSubProyecto.DataBind() DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) If AplicaTodos <> "" Then DdlSubProyecto.Items.Insert(0, New ListItem(AplicaTodos, "-1"))
End If End If
End Sub End Sub
End Class End Class

View File

@@ -8,7 +8,7 @@
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server"> <asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Catálogo de Tipo Gastos de Rechazo de Paquetes Catálogo de Tipo Gasto
</asp:Content> </asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel runat="server" ID="UpAgregar"> <asp:UpdatePanel runat="server" ID="UpAgregar">
@@ -23,11 +23,11 @@
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server"> <asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveTipoGasto,TipoGasto,Estatus,FechaIng" EmptyDataText="No se encontraron Tipo Gasto de Baja Registrados" ToolTip="Listado de Tipo Gasto de Baja" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center; width: 100%" GridLines="None"> <asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveTipoGasto,TipoGasto,Estatus,FechaIng" EmptyDataText="No se encontraron Tipo Gasto" ToolTip="Listado de Tipo Gasto " CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; width: 100%" GridLines="None">
<Columns> <Columns>
<asp:BoundField HeaderText="Tipo Gasto" DataField="TipoGasto" /> <asp:BoundField HeaderText="Tipo Gasto" DataField="TipoGasto" />
<asp:BoundField HeaderText="Estatus" DataField="Estatus" /> <asp:BoundField HeaderText="Estatus" DataField="Estatus" ItemStyle-Width="15%" />
<asp:BoundField HeaderText="Fecha de Ingreso" DataField="FechaIng" /> <asp:BoundField HeaderText="Fecha de Ingreso" DataField="FechaIng" ItemStyle-Width="15%" />
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar"> <asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Subir" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" /> <asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Subir" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />

View File

@@ -2338,7 +2338,7 @@
</tr> </tr>
<tr> <tr>
<td align="left"> <td align="left">
<asp:Label ID="LblAplicaNC" runat="server" Width="100px" Text="Aplica NC:" ToolTip="Aplica Nota Crédito"></asp:Label></td> <asp:Label ID="LblAplicaNC" runat="server" Width="100px" Text="Aplica NC/Dev:" ToolTip="Aplica Nota Crédito"></asp:Label></td>
<td align="left"> <td align="left">
<asp:CheckBox ID="ChkAplicaNotaCredito" CssClass="make-switchsd" runat="server" /></td> <asp:CheckBox ID="ChkAplicaNotaCredito" CssClass="make-switchsd" runat="server" /></td>
</tr> </tr>

View File

@@ -134,15 +134,19 @@ public partial class Contabilidad_RepIVA : ClsPaginas
{ {
Decimal SubTotal = (e.Row.DBCampo("SubTotal16").ToDecimal() > 0 ? e.Row.DBCampo("SubTotal16").ToDecimal() : (e.Row.DBCampo("SubTotal8").ToDecimal() > 0 ? e.Row.DBCampo("SubTotal8").ToDecimal() : (Decimal)0.0)); Decimal SubTotal = (e.Row.DBCampo("SubTotal16").ToDecimal() > 0 ? e.Row.DBCampo("SubTotal16").ToDecimal() : (e.Row.DBCampo("SubTotal8").ToDecimal() > 0 ? e.Row.DBCampo("SubTotal8").ToDecimal() : (Decimal)0.0));
Decimal dif = Math.Round(SubTotal * e.Row.DBCampo("PorcentajeIVA").ToDecimal(), 2) - Math.Round(e.Row.DBCampo("IVA").ToDecimal(), 2); Decimal dif = Math.Round(SubTotal * e.Row.DBCampo("PorcentajeIVA").ToDecimal(), 2) - Math.Round(e.Row.DBCampo("IVA").ToDecimal() + Math.Round(e.Row.DBCampo("IVANoDeducible").ToDecimal()), 2);
if (dif > 1) if (dif > 1)
{ {
e.Row.ForeColor = System.Drawing.Color.Red; e.Row.ForeColor = System.Drawing.Color.Red;
e.Row.Cells[0].Text = e.Row.Cells[0].Text + "Err"; e.Row.Cells[0].Text = e.Row.Cells[0].Text + "Err";
e.Row.ToolTip = "Dif:" + dif.ToString() + "- Sub:" + e.Row.DBCampo("SubTotal") + " - IVA:" + e.Row.DBCampo("IVA"); e.Row.ToolTip = "Dif:" + dif.ToString() + "- Sub:" + SubTotal + " - IVA:" + e.Row.DBCampo("IVA");
} }
} }
if (e.Row.DBCampo("IVA").ToDecimal() < 0 || e.Row.DBCampo("IEPS").ToDecimal() < 0 || e.Row.DBCampo("SubTotal16").ToDecimal() < 0 || e.Row.DBCampo("SubTotal8").ToDecimal() < 0 || e.Row.DBCampo("valorActosImp0").ToDecimal() < 0)
{
e.Row.ForeColor = System.Drawing.Color.Red;
}
} }
} }

View File

@@ -31,7 +31,7 @@
<div class="portlet solid grey-cascade portlet-filter"> <div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle magindate"> <div class="portlet-title portlet-filterT smalltitle magindate">
<div class="tools"> <div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" OnClick="BtnConsultar_Click" /> <asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" OnClick="BtnConsultar_Click" ValidationGroup="GrpConsulta" />
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%> <a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" /> <asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
</div> </div>
@@ -40,6 +40,7 @@
<ul class="list-inline text-size-12"> <ul class="list-inline text-size-12">
<li>F. I.</li> <li>F. I.</li>
<li style="margin-right: 30px"> <li style="margin-right: 30px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;"> <div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox> <asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox>
<span class="input-group-btn "> <span class="input-group-btn ">
@@ -47,7 +48,12 @@
</span> </span>
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender> <ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender> <ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="CVTxtFechaDel" runat="server" ControlToValidate="TxtFechaDel" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="CECVTxtFechaDel" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaDel" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</li> </li>
<li>F. F. </li> <li>F. F. </li>
<li style="margin-right: 30px"> <li style="margin-right: 30px">
@@ -58,15 +64,25 @@
</span> </span>
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender> <ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender> <ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="CVTxtFechaAl" runat="server" ControlToValidate="TxtFechaAl" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="CECVTxtFechaAl" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaAl" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</li> </li>
<li>Cuentas: <li>Cuenta:
</li> </li>
<li> <li>
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="350px"> <asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="350px">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
</li> </li>

View File

@@ -23,7 +23,7 @@
<div class="portlet solid grey-cascade portlet-filter"> <div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle"> <div class="portlet-title portlet-filterT smalltitle">
<div class="tools"> <div class="tools">
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" runat="server" Text="Consultar" Width="100px" OnClick="BtnConsultar_Click" /> <asp:Button ID="BtnConsultar" CssClass="btn btn-default" runat="server" Text="Consultar" Width="100px" OnClick="BtnConsultar_Click" ValidationGroup="GrpConsulta" />
<a href="javascript:;" class="expand"></a> <a href="javascript:;" class="expand"></a>
</div> </div>
<div class="titlefiltros caption"> <div class="titlefiltros caption">
@@ -36,6 +36,10 @@
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span> <asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender> <ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender> <ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="CVTxtFechaDel" runat="server" ControlToValidate="TxtFechaDel" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="CECVTxtFechaDel" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaDel" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<label class="col-md-1 truncate">Fecha Fin:</label> <label class="col-md-1 truncate">Fecha Fin:</label>
@@ -46,17 +50,25 @@
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span> <asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender> <ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender> <ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="CVTxtFechaAl" runat="server" ControlToValidate="TxtFechaAl" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="CECVTxtFechaAl" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaAl" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<label class="col-md-1 truncate">Cuentas:</label> <label class="col-md-1 truncate">Cuenta:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList CssClass="form-control input-sm" runat="server" ID="DdlTipoCuentas" Width="150px"> <asp:DropDownList CssClass="form-control input-sm" runat="server" ID="DdlTipoCuentas" Width="150px">
<asp:ListItem Text="Todas" Value="1" /> <asp:ListItem Text="Todas" Value="-1" />
<asp:ListItem Text="Con Movimientos" Value="2" /> <asp:ListItem Text="Con Movimientos" Value="2" />
<asp:ListItem Text="Saldo Actual no igual a cero" Value="3" /> <asp:ListItem Text="Saldo Actual no igual a cero" Value="3" />
<asp:ListItem Text="Con Movimientos y saldo no igual a cero" Value="4" /> <asp:ListItem Text="Con Movimientos y saldo no igual a cero" Value="4" />
<asp:ListItem Text="Con Movimientos o saldo no igual a cero " Value="5" /> <asp:ListItem Text="Con Movimientos o saldo no igual a cero " Value="5" />
</asp:DropDownList> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlTipoCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>

View File

@@ -35,7 +35,7 @@
<div class="portlet solid grey-cascade portlet-filter"> <div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle"> <div class="portlet-title portlet-filterT smalltitle">
<div class="tools"> <div class="tools">
<asp:Button ID="BtnConsultar" runat="server" CssClass="btn btn-default" Text="Consultar" Width="100px" OnClick="BtnConsultar_Click" /> <asp:Button ID="BtnConsultar" runat="server" CssClass="btn btn-default" Text="Consultar" Width="100px" OnClick="BtnConsultar_Click" ValidationGroup="GrpConsulta" />
<a href="javascript:;" class="expand"></a> <a href="javascript:;" class="expand"></a>
</div> </div>
<div class="titlefiltros caption "> <div class="titlefiltros caption ">
@@ -50,8 +50,8 @@
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender> <ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender> <ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="CVFechaDel" runat="server" ControlToValidate="TxtFechaDel" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator> <asp:CompareValidator ID="CVTxtFechaDel" runat="server" ControlToValidate="TxtFechaDel" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOFecha2Del" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDel" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="CECVTxtFechaDel" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaDel" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
@@ -65,8 +65,8 @@
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender> <ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender> <ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="CVFechaAl" runat="server" ControlToValidate="TxtFechaAl" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator> <asp:CompareValidator ID="CVTxtFechaAl" runat="server" ControlToValidate="TxtFechaAl" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOFecha2Al" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaAl" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="CECVTxtFechaAl" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaAl" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
@@ -82,6 +82,10 @@
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="false"> <asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="false">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>

View File

@@ -56,7 +56,8 @@
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvD" DataKeyNames="CvePS,CveUM,CveAlmacen,PU,Existencia,Serie,SeccionAlmacen,CveSeccionAlmacen,FechaCaducidad,Lote,Codigo,PS" runat="server" AutoGenerateColumns="False" EmptyDataText="No hay movimientos pendientes" CssClass="table table-hover Widthall" GridLines="None"> <asp:GridView ID="GvD" DataKeyNames="CvePS,CveUM,CveAlmacen,PU,Existencia,Serie,SeccionAlmacen,CveSeccionAlmacen,FechaCaducidad,Lote,Codigo,PS" runat="server" AutoGenerateColumns="False" EmptyDataText="No hay movimientos pendientes" CssClass="table table-hover Widthall" GridLines="None">
<Columns> <Columns>
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" /> <asp:BoundField HeaderText="Codigo" DataField="Codigo" />
<asp:BoundField HeaderText="Producto" DataField="PS" />
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="5%" /> <asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="5%" />
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="5%" /> <asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="5%" />
<asp:BoundField HeaderText="FechaCaducidad" DataField="FechaCaducidad" ItemStyle-Width="5%" /> <asp:BoundField HeaderText="FechaCaducidad" DataField="FechaCaducidad" ItemStyle-Width="5%" />

View File

@@ -76,6 +76,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
Dim CveMovimientoDetalleEntrada As Integer = 0 Dim CveMovimientoDetalleEntrada As Integer = 0
Dim Cont As Integer = 0 Dim Cont As Integer = 0
Dim Lista As New Hashtable
For Each gvr As GridViewRow In GvD.Rows For Each gvr As GridViewRow In GvD.Rows
'que este seleccionado y que tenga diferente seccion 'que este seleccionado y que tenga diferente seccion
@@ -83,7 +84,10 @@ Partial Class Inventarios_AjustesSeccionAlmacen
If gvr.DataKey("CveSeccionAlmacen").ToEntero > 0 Then If gvr.DataKey("CveSeccionAlmacen").ToEntero > 0 Then
ObjPS.UpdateAplicaSeccionAlmacen(gvr.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, True) ObjPS.UpdateAplicaSeccionAlmacen(gvr.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, True)
Else
ObjPS.UpdateAplicaSeccionAlmacen(gvr.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, False)
End If End If
If Not Lista.ContainsKey(gvr.DataKey("CvePS").ToEntero) Then Lista.Add(gvr.DataKey("CvePS").ToEntero, gvr.FCDropDownList("DDlS").SelectedValue.ToEntero) 'guardo que dato le corresponde
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, gvr.DataKey("Existencia").ToDecimal, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, 0, -1, CveSeccionAlmacen:=gvr.DataKey("CveSeccionAlmacen").ToEntero, Serie:=gvr.DataKey("Serie"), Lote:=gvr.DataKey("Lote"), FechaCaducidad:=gvr.DataKey("FechaCaducidad").ToDate) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, gvr.DataKey("Existencia").ToDecimal, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, 0, -1, CveSeccionAlmacen:=gvr.DataKey("CveSeccionAlmacen").ToEntero, Serie:=gvr.DataKey("Serie"), Lote:=gvr.DataKey("Lote"), FechaCaducidad:=gvr.DataKey("FechaCaducidad").ToDate) Then
ErrorMovInv = True ErrorMovInv = True
@@ -108,7 +112,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal() Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal()
Dim PU As Decimal = Row("PUOriginal").ToString().ToDecimal() Dim PU As Decimal = Row("PUOriginal").ToString().ToDecimal()
Dim CveUM As Integer = Row("CveUM").ToString().ToEntero() Dim CveUM As Integer = Row("CveUM").ToString().ToEntero()
Dim CveSeccionAlmacen As Integer = GvD.Rows(ind).FCDropDownList("DDlS").SelectedValue.ToEntero ' IfNull(Row("CveSeccionAlmacen"), "-1").ToString().ToEntero() Dim CveSeccionAlmacen As Integer = Lista(Row("CvePS").ToString().ToEntero()) 'GvD.Rows(ind).FCDropDownList("DDlS").SelectedValue.ToEntero ' IfNull(Row("CveSeccionAlmacen"), "-1").ToString().ToEntero()
Dim CostoIndirecto As Decimal = Row("CostoIndirecto").ToString().ToDecimal() Dim CostoIndirecto As Decimal = Row("CostoIndirecto").ToString().ToDecimal()
Dim Serie As String = Row("Serie").ToString() Dim Serie As String = Row("Serie").ToString()
Dim Lote As String = Row("Lote").ToString() Dim Lote As String = Row("Lote").ToString()
@@ -117,6 +121,9 @@ Partial Class Inventarios_AjustesSeccionAlmacen
'actualizamos el PS, para que tenga el aplica seccion 'actualizamos el PS, para que tenga el aplica seccion
ObjPS.UpdateAplicaSeccionAlmacen(Row("CvePS").ToString().ToEntero(), UsuarioActual.CveEmpresa, True) ObjPS.UpdateAplicaSeccionAlmacen(Row("CvePS").ToString().ToEntero(), UsuarioActual.CveEmpresa, True)
If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then
ErrorMovInv = True
End If
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, CveUM, CvePS, PU, -1, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote, Serie:=Serie, FechaCaducidad:=FechaCaducidad, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, CveUM, CvePS, PU, -1, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote, Serie:=Serie, FechaCaducidad:=FechaCaducidad, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorMovInv = True ErrorMovInv = True
@@ -132,11 +139,12 @@ Partial Class Inventarios_AjustesSeccionAlmacen
End If End If
End If End If
Lista = Nothing
End If End If
If Not ErrorMovInv Then If Not ErrorMovInv Then
ObjInventario.Commit() ObjInventario.Commit()
GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, -1, -1) = Nothing
CargaDatos() CargaDatos()
Alert("El Movimiento quede registrado correctamente", TipoMensaje.MsgInformacion) Alert("El Movimiento quede registrado correctamente", TipoMensaje.MsgInformacion)
Else Else
@@ -318,11 +326,11 @@ Partial Class Inventarios_AjustesSeccionAlmacen
CveSeccionAlmacen = DrSeccion("CveSeccion").ToString().ToEntero() CveSeccionAlmacen = DrSeccion("CveSeccion").ToString().ToEntero()
End If End If
Dim Serie As String = RowExcel("Serie").ToString() Dim Serie As String = RowExcel("Serie").ToString().Trim
Dim Lote As String = RowExcel("Lote").ToString() Dim Lote As String = RowExcel("Lote").ToString()
Dim FechaCaducidad As Date = IfNull(RowExcel("FechaCaducidad"), MinFecha).ToString.ToDate Dim FechaCaducidad As Date = IfNull(RowExcel("FechaCaducidad"), MinFecha).ToString.ToDate
Dim RowExistencia As DataRow = DtExistenciasSecciones.FiltroPrimero($"CvePS={CvePS}") Dim RowExistencia As DataRow = DtExistenciasSecciones.FiltroPrimero($"CvePS={CvePS} and ISNULL(Serie,'') = '{Serie}'")
If RowExistencia IsNot Nothing AndAlso CveSeccionAlmacen > 0 Then If RowExistencia IsNot Nothing AndAlso CveSeccionAlmacen > 0 Then
Dim CveSeccionAlmacenSalida As Integer = RowExistencia("CveSeccionAlmacen").ToString().ToEntero() Dim CveSeccionAlmacenSalida As Integer = RowExistencia("CveSeccionAlmacen").ToString().ToEntero()
@@ -332,6 +340,13 @@ Partial Class Inventarios_AjustesSeccionAlmacen
Dim FechaCaducidadSalida As Date = IfNull(RowExistencia("FechaCaducidad"), MinFecha).ToString.ToDate Dim FechaCaducidadSalida As Date = IfNull(RowExistencia("FechaCaducidad"), MinFecha).ToString.ToDate
Dim PUSalida As Decimal = RowExistencia("PU").ToString() Dim PUSalida As Decimal = RowExistencia("PU").ToString()
'condicion para ajustar la seccion y permita hacer los cambios en el trigger
If CveSeccionAlmacenSalida > 0 Then
ErrorMovInv = Not ObjPS.UpdateAplicaSeccionAlmacen(CvePS, UsuarioActual.CveEmpresa, True)
Else
ErrorMovInv = Not ObjPS.UpdateAplicaSeccionAlmacen(CvePS, UsuarioActual.CveEmpresa, False)
End If
'GENERA LA SALIDA DE LOS PRODUCTOS QUE VIENEN EN EL EXCEL 'GENERA LA SALIDA DE LOS PRODUCTOS QUE VIENEN EN EL EXCEL
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadSalida, CveUM, CvePS, PUSalida, CveSeccionAlmacen:=CveSeccionAlmacenSalida, Serie:=SerieSalida, Lote:=LoteSalida, FechaCaducidad:=FechaCaducidadSalida, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadSalida, CveUM, CvePS, PUSalida, CveSeccionAlmacen:=CveSeccionAlmacenSalida, Serie:=SerieSalida, Lote:=LoteSalida, FechaCaducidad:=FechaCaducidadSalida, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorMovInv = True ErrorMovInv = True
@@ -355,6 +370,9 @@ Partial Class Inventarios_AjustesSeccionAlmacen
'ACTUALIZAMOS EL PS, PARA QUE TENGA EL APLICA SECCION 'ACTUALIZAMOS EL PS, PARA QUE TENGA EL APLICA SECCION
ErrorMovInv = Not ObjPS.UpdateAplicaSeccionAlmacen(CvePS, UsuarioActual.CveEmpresa, True) ErrorMovInv = Not ObjPS.UpdateAplicaSeccionAlmacen(CvePS, UsuarioActual.CveEmpresa, True)
If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then
ErrorMovInv = True
End If
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, CantidadEntrada, CveUMEntrada, CvePSEntrada, PUEntrada, -1, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, CantidadEntrada, CveUMEntrada, CvePSEntrada, PUEntrada, -1, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorMovInv = True ErrorMovInv = True
@@ -370,7 +388,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
End If End If
If RowExistencia Is Nothing Then If RowExistencia Is Nothing Then
ExistenciasNoEncontradas.AppendFormat("{0},", SeccionAlmacen) ExistenciasNoEncontradas.AppendFormat("{0} - S:{1}<br/>", Codigo, Serie)
ErrorMovInv = True ErrorMovInv = True
End If End If

View File

@@ -227,7 +227,7 @@
</td> </td>
<td runat="server" id="TdSeccionAlmacen" visible="false"> <td runat="server" id="TdSeccionAlmacen" visible="false">
<asp:DropDownlist ID="DdlSeccionAlmacen" runat="server" DataTextField="Seccion" DataValueField="CveSeccionAlmacen" CssClass="form-control input-sm select2me" /> <asp:DropDownlist ID="DdlSeccionAlmacen" runat="server" DataTextField="SeccionAlmacen" DataValueField="CveSeccionAlmacen" CssClass="form-control input-sm select2me" />
</td> </td>
<td align="center"> <td align="center">
@@ -403,7 +403,7 @@
<div style="max-height: 300px; overflow-y: auto;"> <div style="max-height: 300px; overflow-y: auto;">
<asp:GridView ID="GvDatosDesapartado" DataKeyNames="CvePS,CveUM,CveMovimientoDetalle,CveSeccionAlmacen,Serie,Lote,FechaCaducidad,PU,Cantidad,AplicaSeccion" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró mercancía apartada" ToolTip="Listado de Movimientos" CssClass="Widthall table table-striped table-hover" GridLines="None"> <asp:GridView ID="GvDatosDesapartado" DataKeyNames="CvePS,CveUM,CveMovimientoDetalle,CveSeccionAlmacen,Serie,Lote,FechaCaducidad,PU,Cantidad,AplicaSeccion" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró mercancía apartada" ToolTip="Listado de Movimientos" CssClass="Widthall table table-striped table-hover" GridLines="None">
<Columns> <Columns>
<asp:BoundField HeaderText="#" DataField="No" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" /> <asp:BoundField HeaderText="#" DataField="No" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" ItemStyle-Font-Size="6pt" />
<asp:BoundField HeaderText="Disponible" DataField="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Disponible" DataField="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" />
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
@@ -418,7 +418,7 @@
<asp:BoundField HeaderText="F.Caducidad" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-Width="10%" /> <asp:BoundField HeaderText="F.Caducidad" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-Width="10%" />
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false"> <asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
<ItemTemplate> <ItemTemplate>
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="Seccion" AppendDataBoundItems="true" DataValueField="CveSeccion" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true"> <asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true">
</asp:DropDownList> </asp:DropDownList>
</ItemTemplate> </ItemTemplate>

View File

@@ -805,10 +805,14 @@ Partial Class Inventarios_Apartados
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onblur", String.Format("ValidaCantidad(this,{0})", e.Row.DBCampo("Cantidad"))) e.Row.FCTextBox("TxtCantidad").Attributes.Add("onblur", String.Format("ValidaCantidad(this,{0})", e.Row.DBCampo("Cantidad")))
If CBool(e.Row.DBCampo("AplicaSeccion")) AndAlso DdlAlmacenDestinoDesapartado.SelectedValue.ToEntero > 0 Then If CBool(e.Row.DBCampo("AplicaSeccion")) AndAlso DdlAlmacenDestinoDesapartado.SelectedValue.ToEntero > 0 Then
Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestinoDesapartado.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero)
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = True e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = True
e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestinoDesapartado.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero) e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = dtt
e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind() e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1")) If dtt.Rows.Count = 0 Then
e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
End If
dtt.Dispose()
End If End If
End If End If

View File

@@ -1049,7 +1049,9 @@
<div style="text-align: center"> <div style="text-align: center">
<label for="<%= DdlAlmacenInventarioFisico.ClientID.ToString()%>">Almacen:</label> <label for="<%= DdlAlmacenInventarioFisico.ClientID.ToString()%>">Almacen:</label>
<asp:DropDownList ID="DdlAlmacenInventarioFisico" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" Width="60%" CssClass="form-control input-sm select2me" AppendDataBoundItems="true"></asp:DropDownList> <asp:DropDownList ID="DdlAlmacenInventarioFisico" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" Width="60%" CssClass="form-control input-sm select2me" AppendDataBoundItems="true"></asp:DropDownList>
<%--<asp:RequiredFieldValidator ID="RFVAlmacenInvFisico" runat="server" InitialValue="-1" ControlToValidate="DdlAlmacenInventarioFisico" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacen''</b> es necesario, por favor ingréselo."></asp:RequiredFieldValidator>--%> <asp:RequiredFieldValidator ID="RFVAlmacenInvFisico" runat="server" InitialValue="-1" ControlToValidate="DdlAlmacenInventarioFisico" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacen''</b> es necesario, por favor ingréselo." ValidationGroup="InvFisico"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="CERFVAlmacenInvFisico" runat="server" HighlightCssClass="vco" TargetControlID="RFVAlmacenInvFisico" Width="350px"></ajax:ValidatorCalloutExtender>
<i></i> <i></i>
</div> </div>
</div> </div>
@@ -1062,6 +1064,19 @@
<span class="input-group-btn "> <span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaInvFisico" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton> <asp:LinkButton ID="ImgFechaInvFisico" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span> </span>
<asp:RequiredFieldValidator ID="RFVTxtFechaInvFisico" runat="server" ControlToValidate="TxtFechaInvFisico" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="InvFisico"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="CERFVTxtFechaInvFisico" runat="server" HighlightCssClass="vco" TargetControlID="RFVTxtFechaInvFisico" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:MaskedEditExtender ID="MEFechaInv" runat="server" TargetControlID="TxtFechaInvFisico" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender> <ajax:MaskedEditExtender ID="MEFechaInv" runat="server" TargetControlID="TxtFechaInvFisico" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalEFehcInv" TargetControlID="TxtFechaInvFisico" PopupButtonID="ImgFechaInvFisico" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender> <ajax:CalendarExtender runat="server" ID="CalEFehcInv" TargetControlID="TxtFechaInvFisico" PopupButtonID="ImgFechaInvFisico" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="CvFechaInv" runat="server" ControlToValidate="TxtFechaInvFisico" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="InvFisico"></asp:CompareValidator> <asp:CompareValidator ID="CvFechaInv" runat="server" ControlToValidate="TxtFechaInvFisico" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="InvFisico"></asp:CompareValidator>
@@ -1424,7 +1439,7 @@
<br /> <br />
</div> </div>
<div runat="server" id="divSerie" class="form-group form-md-line-input input-iconright" visible="false"> <div runat="server" id="divSerie" class="form-group form-md-line-input input-iconright" visible="false">
<asp:TextBox ID="TxtnSerie" CssClass="form-control input-sm" runat="server" Width="80px" Visible="false"></asp:TextBox> <asp:TextBox ID="TxtnSerie" CssClass="form-control input-sm" runat="server" Width="120px" Visible="false"></asp:TextBox>
<asp:Button Text="" ID="BtnSerieAddNew" OnClick="BtnSerieAddNew_Click" Style="display: none" runat="server" /> <asp:Button Text="" ID="BtnSerieAddNew" OnClick="BtnSerieAddNew_Click" Style="display: none" runat="server" />
<label for="<%= TxtnSerie.ClientID.ToString()%>">Serie</label> <label for="<%= TxtnSerie.ClientID.ToString()%>">Serie</label>
<br /> <br />

View File

@@ -2217,6 +2217,7 @@ Partial Class Inventarios_EntradasSalidas
'PERMISO SOLO PARA EDITAR SERIELOTE 'PERMISO SOLO PARA EDITAR SERIELOTE
If UsuarioActual.TienePermisoProceso(245) Then If UsuarioActual.TienePermisoProceso(245) Then
GvM.Columns(9).Visible = True GvM.Columns(9).Visible = True
TxtnSerie.Visible = True
End If End If
TxtnLote.Visible = False TxtnLote.Visible = False
@@ -2294,7 +2295,6 @@ Partial Class Inventarios_EntradasSalidas
e.Row.FCTextBox("LblEditCodigo").Enabled = False e.Row.FCTextBox("LblEditCodigo").Enabled = False
e.Row.FCTextBox("TxtSerie").Enabled = False e.Row.FCTextBox("TxtSerie").Enabled = False
e.Row.FCTextBox("TxtLote").Enabled = False e.Row.FCTextBox("TxtLote").Enabled = False
e.Row.FCTextBox("TxtBatch").Enabled = False
e.Row.FCDropDownList("DdlSeccionAlmacen").Enabled = False e.Row.FCDropDownList("DdlSeccionAlmacen").Enabled = False
End If End If

View File

@@ -2,6 +2,7 @@
Option Explicit On Option Explicit On
Imports System.Data Imports System.Data
Imports System.Data.Entity.Core.Common.CommandTrees
Imports System.IO Imports System.IO
Imports Extensiones Imports Extensiones
@@ -655,7 +656,7 @@ Partial Class Inventarios_EntregaAlmacen
Select Case ObjInventario.DtResultados.Rows(0)("TipoDocto").ToString Select Case ObjInventario.DtResultados.Rows(0)("TipoDocto").ToString
Case "Ing", "Ped" Case "Ing", "Ped"
Filtro = "CveConcepto IN (3,40)" Filtro = "CveConcepto IN (3,40)"
Case "Dev" Case "Dev", "dPe"
'cuand es devolucionventa=1, es cancelación de la devolución 'cuand es devolucionventa=1, es cancelación de la devolución
If EsDevolucionVenta = 1 Then Filtro = "CveConcepto = 18" Else Filtro = "CveConcepto IN (3,40)" If EsDevolucionVenta = 1 Then Filtro = "CveConcepto = 18" Else Filtro = "CveConcepto IN (3,40)"
Case Else Case Else
@@ -2180,7 +2181,7 @@ Partial Class Inventarios_EntregaAlmacen
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
For Each Dr As DataRow In ObjInventario.DtResultados.Rows For Each Dr As DataRow In ObjInventario.DtResultados.Rows
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccionAlmacen").ToString.ToEntero, -1)) Then
ErrorMovInv = True ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.") TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.")
Exit For Exit For
@@ -2339,7 +2340,7 @@ Partial Class Inventarios_EntregaAlmacen
End If End If
For Each Dr As DataRow In ObjInventario.DtResultados.Rows For Each Dr As DataRow In ObjInventario.DtResultados.Rows
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1), EsInterno:=EsInterno) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccionAlmacen").ToString.ToEntero, -1), EsInterno:=EsInterno) Then
ErrorMovInv = True ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.") TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.")
Exit For Exit For

View File

@@ -240,23 +240,23 @@
<ajax:ValidatorCalloutExtender ID="VCESerie" runat="server" HighlightCssClass="vco" TargetControlID="RFVSerie" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCESerie" runat="server" HighlightCssClass="vco" TargetControlID="RFVSerie" Width="300px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<div class="row" style="margin-top: 5px;" runat="server" id="divSeccionAlmacen" visible="false">
<label class="col-md-4">Sección Almacén</label>
<div class="col-md-8">
<asp:DropDownList ID="DdlSeccionAlmacen" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataTextField="SeccionAlmacen" DataValueField="CveSeccionAlmacen" ></asp:DropDownList>
</div>
</div>
<div class="row" style="margin-top: 5px;" runat="server" id="divLote" visible="false"> <div class="row" style="margin-top: 5px;" runat="server" id="divLote" visible="false">
<label class="col-md-4">Lote</label> <label class="col-md-4">Lote</label>
<div class="col-md-8"> <div class="col-md-8">
<asp:TextBox runat="server" ID="TxtLote"></asp:TextBox> <asp:TextBox runat="server" ID="TxtLote"></asp:TextBox>
<asp:RequiredFieldValidator runat="server" ID="RFVLote" ControlToValidate="TxtLote" Enabled="false" ValidationGroup="GrpIngresar" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Lote''</b> es necesario, por favor ingrése una." Display="Dynamic" Text="*"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCELote" runat="server" HighlightCssClass="vco" TargetControlID="RFVLote" Width="300px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<div class="row" style="margin-top: 5px;" runat="server" id="divFechaCaducidad" visible="false"> <div class="row" style="margin-top: 5px;" runat="server" id="divFechaCaducidad" visible="false">
<label class="col-md-4">Fecha Caducidad</label> <label class="col-md-4">Fecha Caducidad</label>
<div class="col-md-8"> <div class="col-md-8">
<asp:TextBox runat="server" ID="TxtFechaCaducidad"></asp:TextBox> <asp:TextBox runat="server" ID="TxtFechaCaducidad"></asp:TextBox>
<asp:RequiredFieldValidator runat="server" ID="RFVCaducidad" ControlToValidate="TxtFechaCaducidad" Enabled="false" ValidationGroup="GrpIngresar" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Caducidad''</b> es necesario, por favor ingrése una." Display="Dynamic" Text="*"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCECaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaducidad" Width="300px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<div class="row" style="margin-top: 5px;"> <div class="row" style="margin-top: 5px;">
@@ -325,7 +325,7 @@
<asp:BoundField HeaderText="Sección Almacén" DataField="SeccionAlmacen" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField> <asp:BoundField HeaderText="Sección Almacén" DataField="SeccionAlmacen" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField>
<asp:BoundField HeaderText="Serie" DataField="SerieLote" ItemStyle-HorizontalAlign="Left"></asp:BoundField> <asp:BoundField HeaderText="Serie" DataField="SerieLote" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField> <asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField>
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField> <asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" Visible="false"></asp:BoundField>
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"></asp:BoundField> <asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
</Columns> </Columns>
</asp:GridView> </asp:GridView>
@@ -349,7 +349,7 @@
<asp:BoundField HeaderText="Sección Almacén" DataField="SeccionAlmacen" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField> <asp:BoundField HeaderText="Sección Almacén" DataField="SeccionAlmacen" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField>
<asp:BoundField HeaderText="Serie/Lote" DataField="SerieLote" ItemStyle-HorizontalAlign="Left"></asp:BoundField> <asp:BoundField HeaderText="Serie/Lote" DataField="SerieLote" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField> <asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField>
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField> <asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" Visible="false" DataFormatString="{0:d}"></asp:BoundField>
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"></asp:BoundField> <asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>

View File

@@ -88,10 +88,8 @@ Partial Class Inventarios_InventarioFisicoDetalle
#Region " CARGA DATOS " #Region " CARGA DATOS "
Private Sub CargaDatos(CveInventarioFisico As Integer, CveEmpresa As Integer, Optional CveUsuario As Integer = -1) Private Sub CargaDatos(CveInventarioFisico As Integer, CveEmpresa As Integer, Optional CveUsuario As Integer = -1)
Dim ObjInventario As New ClsInventarios Dim ObjInventario As New ClsInventarios
DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
DdlSeccionAlmacen.DataBind()
DdlSeccionAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
If ObjInventario.GetInventarioFisico(CveInventarioFisico, CveEmpresa, -1, -1) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then If ObjInventario.GetInventarioFisico(CveInventarioFisico, CveEmpresa, -1, -1) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
Dim CveEstatus = ObjInventario.DtResultados.FiltroPrimeroValor("CveEstatus") Dim CveEstatus = ObjInventario.DtResultados.FiltroPrimeroValor("CveEstatus")
Select Case CveEstatus Select Case CveEstatus
@@ -230,9 +228,9 @@ Partial Class Inventarios_InventarioFisicoDetalle
Dim Inventario As New ClsInventarios Dim Inventario As New ClsInventarios
If Inventario.GetInventarioFisicoDetalle(CveInventarioFisico, ddlUsuario.SelectedValue.ToString.ToEntero) Then If Inventario.GetInventarioFisicoDetalle(CveInventarioFisico, ddlUsuario.SelectedValue.ToString.ToEntero) Then
If Inventario.DtResultados.Rows.Count > 0 Then If Inventario.DtResultados.Rows.Count > 0 Then
GvIFD.Columns(4).Visible = Inventario.DtResultados.MAX("CveSeccionAlmacen") > 0 GvIFD.Columns(4).Visible = Inventario.DtResultados.MAX("CveSeccionAlmacen", "CveSeccionAlmacen IS NOT NULL").ToEntero > 0
GvIFD.Columns(6).Visible = Inventario.DtResultados.MAX("Lote") <> "" GvIFD.Columns(6).Visible = Inventario.DtResultados.MAX("Lote") <> ""
GvIFD.Columns(7).Visible = Inventario.DtResultados.MAX("FechaCaducidad").ToDate > MinFecha GvIFD.Columns(7).Visible = Inventario.DtResultados.MAX("FechaCaducidad", "FechaCaducidad IS NOT NULL").ToDate > MinFecha
GvIFD.DataSource = Inventario.DtResultados '.AsEnumerable.OrderByDescending(Function(k) k!CveInventarioFisicoDetalle).Take(500).CopyToDataTable GvIFD.DataSource = Inventario.DtResultados '.AsEnumerable.OrderByDescending(Function(k) k!CveInventarioFisicoDetalle).Take(500).CopyToDataTable
Else Else
GvIFD.DataSource = Nothing GvIFD.DataSource = Nothing
@@ -259,48 +257,83 @@ Partial Class Inventarios_InventarioFisicoDetalle
Dim CveUnidadMedida As Integer Dim CveUnidadMedida As Integer
Dim Codigo As String = If(TxtCodigo.Text.Trim <> "", TxtCodigo.Text.Trim, "-1").Replace("'", "''") ' scanner cambian los guiones por apostrofes Dim Codigo As String = If(TxtCodigo.Text.Trim <> "", TxtCodigo.Text.Trim, "-1").Replace("'", "''") ' scanner cambian los guiones por apostrofes
Dim CodigoBarras As String = If(TxtCodigoBarras.Text.Trim <> "", TxtCodigoBarras.Text.Trim, "-1").Replace("'", "''") ' scanner cambian los guiones por apostrofes Dim CodigoBarras As String = If(TxtCodigoBarras.Text.Trim <> "", TxtCodigoBarras.Text.Trim, "-1").Replace("'", "''") ' scanner cambian los guiones por apostrofes
Dim SeccionAlmacen As String = If(DdlSeccionAlmacen.SelectedValue.ToEntero > -1, DdlSeccionAlmacen.SelectedItem.Text, "") Dim Serie As String = TxtCodigoSerie.Text.Trim
Dim CveSeccionAlmacen As Integer = If(DdlSeccionAlmacen.SelectedValue.ToEntero > 0, DdlSeccionAlmacen.SelectedValue.ToEntero, -1)
Dim SerieLote As String = TxtCodigoSerie.Text.Trim
Dim Lote As String = If(TxtLote.Text.Length > 0, TxtLote.Text, "-1") Dim Lote As String = If(TxtLote.Text.Length > 0, TxtLote.Text, "-1")
Dim FechaCaducidad As String = If(TxtFechaCaducidad.Text.Length > 0, TxtFechaCaducidad.Text, MinFecha.ToString) Dim FechaCaducidad As String=MinFecha.ToString
Dim CveMetodoInv As Integer = -1 Dim CveSeccionAlmacen As Integer = -1
Dim Cantidad = TxtCantidadProducto.Text.ToDouble Dim Cantidad = TxtCantidadProducto.Text.ToDouble
Dim dr As DataRow Dim dr As DataRow
dr = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{CodigoBarras}' OR Codigo = '{Codigo}' ") 'dr = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{CodigoBarras}' OR Codigo = '{Codigo}' ")
dr = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{CodigoBarras}' OR Codigo = '{Codigo}'")
If dr IsNot Nothing Then
CveMetodoInv = dr("Inv_CveMetodoInventario").ToString.ToEntero
If dr IsNot Nothing Then
CveProducto = dr("CvePS").ToString.ToEntero CveProducto = dr("CvePS").ToString.ToEntero
CveUnidadMedida = dr("CveUnidadMedida").ToString.ToEntero CveUnidadMedida = dr("CveUnidadMedida").ToString.ToEntero
'Dim AplicaSeccion As Boolean = dr("AplicaSeccion") = "1"
Dim AplicaCaducidad As Boolean = dr("AplicaCaducidad") = "1"
Dim AplicaLote As Boolean = dr("AplicaLote") = "1"
Dim AplicaSerie As Boolean = dr("AplicaSerie") = "1"
'divSeccionAlmacen.Visible = AplicaSeccion
divLote.Visible = AplicaLote
divFechaCaducidad.Visible = AplicaCaducidad
divSerie.Visible = AplicaSerie
UPAgregarPro.Update()
If CveMetodoInv = 5 And SerieLote = "" Then If AplicaSerie And Serie = "" Then
RFVSerie.Enabled = True RFVSerie.Enabled = True
RFVSerie.Visible = True RFVSerie.Visible = True
RFVSerie.SetFocusOnError = True RFVSerie.SetFocusOnError = True
RFVSerie.Validate() RFVSerie.Validate()
RFVSerie.ValidationGroup = " " RFVSerie.ValidationGroup = " "
Exit Sub Exit Sub
End If
If AplicaLote And Lote = "" Then
RFVLote.Enabled = True
RFVLote.Visible = True
RFVLote.SetFocusOnError = True
RFVLote.Validate()
RFVLote.ValidationGroup = " "
Exit Sub
End If End If
If AplicaCaducidad Then
If TxtFechaCaducidad.Text.Trim = "" Then
RFVCaducidad.Enabled = True
RFVCaducidad.Visible = True
RFVCaducidad.SetFocusOnError = True
RFVCaducidad.Validate()
RFVCaducidad.ValidationGroup = " "
Exit Sub
End If
FechaCaducidad = If(TxtFechaCaducidad.Text.Length > 0, TxtFechaCaducidad.Text, MinFecha.ToString)
End If
RFVSerie.ValidationGroup = "GrpIngresar" RFVSerie.ValidationGroup = "GrpIngresar"
RFVSerie.Enabled = False RFVSerie.Enabled = False
RFVLote.ValidationGroup = "GrpIngresar"
'VALIDA QUE LA SERIE NO SEA IGUAL AL CODIGO O CODIGOBARRAS RFVLote.Enabled = False
If SerieLote <> "" And (SerieLote.ToUpper = dr("Codigo").ToString.ToUpper Or SerieLote.ToUpper = dr("CodigoBarras").ToString.ToUpper) Then RFVCaducidad.ValidationGroup = "GrpIngresar"
Alert($"La serie indicada <b>{SerieLote}</b> coincide con el codigo o codigo de barras del producto. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) RFVCaducidad.Enabled = False
'VALIDA QUE LA SERIE NO SEA IGUAL AL CODIGO O CODIGOBARRAS
If Serie <> "" And (Serie.ToUpper = dr("Codigo").ToString.ToUpper Or Serie.ToUpper = dr("CodigoBarras").ToString.ToUpper) Then
Alert($"La serie indicada <b>{Serie}</b> coincide con el codigo o codigo de barras del producto. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
End If End If
Dim Consulto As Boolean = False Dim Consulto As Boolean = False
Using Inventarios As New ClsInventarios Using Inventarios As New ClsInventarios
If Inventarios.AddInventarioFisicoDetalle(CveInventarioFisico, CveProducto, CveUnidadMedida, If(CveMetodoInv = 5, 1, Cantidad), SerieLote, UsuarioActual.CveUsuario, If Inventarios.AddInventarioFisicoDetalle(CveInventarioFisico, CveProducto, CveUnidadMedida, If(AplicaSerie, 1, Cantidad), Serie, UsuarioActual.CveUsuario,
CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote, FechaCaducidad:=FechaCaducidad.ToDate) Then CveSeccionAlmacen:=-1, Lote:=Lote, FechaCaducidad:=FechaCaducidad.ToDate) Then
GvIFDUltimoRegistrado.Columns(4).Visible = CveSeccionAlmacen > 0 GvIFDUltimoRegistrado.Columns(4).Visible = CveSeccionAlmacen > 0
GvIFDUltimoRegistrado.Columns(5).Visible = SerieLote <> "-1" GvIFDUltimoRegistrado.Columns(5).Visible = Serie <> "-1"
GvIFDUltimoRegistrado.Columns(6).Visible = Lote <> "-1" GvIFDUltimoRegistrado.Columns(6).Visible = Lote <> "-1"
GvIFDUltimoRegistrado.Columns(7).Visible = FechaCaducidad <> "01/01/1900" GvIFDUltimoRegistrado.Columns(7).Visible = FechaCaducidad <> "01/01/1900"
@@ -310,7 +343,7 @@ Partial Class Inventarios_InventarioFisicoDetalle
GvIFDUltimoRegistrado.Rows(0).Cells(1).Text = dr("CodigoBarras").ToString GvIFDUltimoRegistrado.Rows(0).Cells(1).Text = dr("CodigoBarras").ToString
GvIFDUltimoRegistrado.Rows(0).Cells(2).Text = dr("Codigo").ToString GvIFDUltimoRegistrado.Rows(0).Cells(2).Text = dr("Codigo").ToString
GvIFDUltimoRegistrado.Rows(0).Cells(3).Text = dr("PS").ToString GvIFDUltimoRegistrado.Rows(0).Cells(3).Text = dr("PS").ToString
GvIFDUltimoRegistrado.Rows(0).Cells(4).Text = SeccionAlmacen GvIFDUltimoRegistrado.Rows(0).Cells(4).Text = ""
GvIFDUltimoRegistrado.Rows(0).Cells(5).Text = TxtCodigoSerie.Text.Trim GvIFDUltimoRegistrado.Rows(0).Cells(5).Text = TxtCodigoSerie.Text.Trim
GvIFDUltimoRegistrado.Rows(0).Cells(6).Text = Lote GvIFDUltimoRegistrado.Rows(0).Cells(6).Text = Lote
GvIFDUltimoRegistrado.Rows(0).Cells(7).Text = FechaCaducidad GvIFDUltimoRegistrado.Rows(0).Cells(7).Text = FechaCaducidad
@@ -332,9 +365,11 @@ Partial Class Inventarios_InventarioFisicoDetalle
TxtCodigoSerie.Text = "" TxtCodigoSerie.Text = ""
TxtCodigo.Text = "" TxtCodigo.Text = ""
TxtCantidadProducto.Text = "1" TxtCantidadProducto.Text = "1"
DdlSeccionAlmacen.SelectedValue = "-1"
TxtLote.Text = "" TxtLote.Text = ""
TxtFechaCaducidad.Text = "" TxtFechaCaducidad.Text = ""
divLote.Visible = False
divFechaCaducidad.Visible = False
divSerie.Visible = False
RegistraScript("playsonidito('beep-07.wav')") RegistraScript("playsonidito('beep-07.wav')")
Else Else
TxtCodigoSerie.Text = "" TxtCodigoSerie.Text = ""
@@ -346,8 +381,10 @@ Partial Class Inventarios_InventarioFisicoDetalle
Else Else
TxtCodigoBarras.Text = "" TxtCodigoBarras.Text = ""
TxtCodigoSerie.Text = "" TxtCodigoSerie.Text = ""
TxtCodigo.Text = "" TxtCodigo.Text = ""
DdlSeccionAlmacen.SelectedValue = "-1" divLote.Visible = False
divFechaCaducidad.Visible = False
divSerie.Visible = False
TxtLote.Text = "" TxtLote.Text = ""
TxtFechaCaducidad.Text = "" TxtFechaCaducidad.Text = ""
Alert("No se encontró el producto, favor de escribirlo correctamente.", TipoMensaje.MsgError) Alert("No se encontró el producto, favor de escribirlo correctamente.", TipoMensaje.MsgError)
@@ -530,7 +567,7 @@ Partial Class Inventarios_InventarioFisicoDetalle
Dim AplicaLote As Boolean = Producto("AplicaLote") = "1" Dim AplicaLote As Boolean = Producto("AplicaLote") = "1"
Dim AplicaSerie As Boolean = Producto("AplicaSerie") = "1" Dim AplicaSerie As Boolean = Producto("AplicaSerie") = "1"
divSeccionAlmacen.Visible = AplicaSeccion 'divSeccionAlmacen.Visible = AplicaSeccion
divLote.Visible = AplicaLote divLote.Visible = AplicaLote
divFechaCaducidad.Visible = AplicaCaducidad divFechaCaducidad.Visible = AplicaCaducidad
divSerie.Visible = AplicaSerie divSerie.Visible = AplicaSerie

View File

@@ -200,7 +200,7 @@
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="FechaCaducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="FechaCaducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" />
<asp:BoundField HeaderText="Existencia" DataField="CantidadAlmacen" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Existencia" DataField="CantidadAlmacen" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Inv. Físico" DataField="CantidadInventarioFisico" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Inv. Físico" DataField="CantidadInventarioFisico" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:#,###.##}" ItemStyle-Font-Bold="true" /> <asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:#,###.##}" ItemStyle-Font-Bold="true" />
@@ -234,7 +234,7 @@
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="FechaCaducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="FechaCaducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" />
<asp:BoundField HeaderText="Existencia" DataField="CantidadAlmacen" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Existencia" DataField="CantidadAlmacen" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Inv. Físico" DataField="CantidadInventarioFisico" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Inv. Físico" DataField="CantidadInventarioFisico" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:#,###.##}" ItemStyle-Font-Bold="true" /> <asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:#,###.##}" ItemStyle-Font-Bold="true" />

View File

@@ -275,7 +275,7 @@ Partial Class Inventarios_RepAnomalias
Private Sub BanderaSerieLoteCad(Gv As GridView, resultado As DataTable) Private Sub BanderaSerieLoteCad(Gv As GridView, resultado As DataTable)
Gv.Columns(4).Visible = resultado.MAX("Serie") <> "" Gv.Columns(4).Visible = resultado.MAX("Serie") <> ""
Gv.Columns(5).Visible = resultado.MAX("Lote") <> "" Gv.Columns(5).Visible = resultado.MAX("Lote") <> ""
Gv.Columns(6).Visible = resultado.MAX("FechaCaducidad") <> "" Gv.Columns(6).Visible = resultado.MAX("FechaCaducidad").ToDate > MinFecha
End Sub End Sub
End Class End Class

View File

@@ -63,8 +63,36 @@ public class TareasJam : IHttpHandler
string RutaClientes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Clientes{DateTime.Now.ToString("yyyyMMdd")}.xlsx"; string RutaClientes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Clientes{DateTime.Now.ToString("yyyyMMdd")}.xlsx";
string RutaAlmacenes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Almacenes{DateTime.Now.ToString("yyyyMMdd")}.xlsx"; string RutaAlmacenes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Almacenes{DateTime.Now.ToString("yyyyMMdd")}.xlsx";
try
{
if (File.Exists(RutaProductos))
{
File.Delete(RutaProductos);
}
//"ftp://us2.hostedftp.com/", "agrojam", "A12345678"; if (File.Exists(RutaVentas))
{
File.Delete(RutaVentas);
}
if (File.Exists(RutaClientes))
{
File.Delete(RutaClientes);
}
if (File.Exists(RutaAlmacenes))
{
File.Delete(RutaAlmacenes);
}
}
catch (Exception ex) {
SBLog.AppendLine("<b>Error al eliminar archivos</b>");
}
////"ftp://us2.hostedftp.com/", "agrojam", "A12345678";
//string FTPServer = "ftp://127.0.0.1/"; //string FTPServer = "ftp://127.0.0.1/";
//string TFPUsr = "Toor"; //string TFPUsr = "Toor";
//string FTPPass = "agj-3500"; //string FTPPass = "agj-3500";
@@ -148,18 +176,27 @@ public class TareasJam : IHttpHandler
DTClientes.Columns[11].ColumnName = "phone.areaCode"; DTClientes.Columns[11].ColumnName = "phone.areaCode";
DTClientes.Columns[12].ColumnName = "phone.number"; DTClientes.Columns[12].ColumnName = "phone.number";
DTClientes.Columns.RemoveAt(12); //DTClientes.Columns.RemoveAt(12);
DTClientes.Columns.RemoveAt(11); //DTClientes.Columns.RemoveAt(11);
DTClientes.Columns.RemoveAt(10); //DTClientes.Columns.RemoveAt(10);
DTClientes.Columns.RemoveAt(8); //DTClientes.Columns.RemoveAt(8);
DTClientes.Columns.RemoveAt(7); //DTClientes.Columns.RemoveAt(7);
DTClientes.AcceptChanges(); DTClientes.AcceptChanges();
DTVentas.Columns.RemoveAt(7); DTVentas.Columns.RemoveAt(7);
DTVentas.Columns.RemoveAt(6); //DTVentas.Columns.RemoveAt(6);
DTVentas.Columns[3].ColumnName = "Sale Date";
DTVentas.Columns[6].ColumnName = "Transaction ID";
DTVentas.AcceptChanges(); DTVentas.AcceptChanges();
DTAlmacenes.Columns[2].ColumnName = "Description";
DTAlmacenes.Columns[3].ColumnName = "Stock Date";
DTAlmacenes.AcceptChanges();
DataTable dtCloned = DTVentas.Clone(); DataTable dtCloned = DTVentas.Clone();
dtCloned.Columns[3].DataType = typeof(string); dtCloned.Columns[3].DataType = typeof(string);

View File

@@ -2451,8 +2451,8 @@ Partial Class Ventas
CargaFletes() CargaFletes()
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyectoHeader, LblSubProyecto) CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyectoHeader, LblSubProyecto, AplicaTodos:="")
CargarCentrosDeCosto(DdlProyectoPyME, DdlSubProyectoPyME, LblProyectoPyME, LblSubProyectoPyME) CargarCentrosDeCosto(DdlProyectoPyME, DdlSubProyectoPyME, LblProyectoPyME, LblSubProyectoPyME, AplicaTodos:="")
BrSubProyecto.Visible = DdlProyecto.Visible BrSubProyecto.Visible = DdlProyecto.Visible
divProyectoPyME.Visible = DdlProyecto.Visible divProyectoPyME.Visible = DdlProyecto.Visible
@@ -14418,8 +14418,8 @@ Partial Class Ventas
DdlSubProyecto.Items.Clear() DdlSubProyecto.Items.Clear()
DdlSubProyecto.DataSource = DTSucursal DdlSubProyecto.DataSource = DTSucursal
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) 'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlSubProyecto.SelectedValue = "-1" 'DdlSubProyecto.SelectedValue = "-1"
DdlSubProyecto.DataBind() DdlSubProyecto.DataBind()
DdlSubProyecto.SelectedValueExist(DdlSubProyectoDatos.SelectedValue) DdlSubProyecto.SelectedValueExist(DdlSubProyectoDatos.SelectedValue)
CambiaSucursal() CambiaSucursal()
@@ -22424,13 +22424,30 @@ Partial Class Ventas
DdlTipoComprobante.SelectedValue = "Egs" DdlTipoComprobante.SelectedValue = "Egs"
Dim AplicaImpuestosLocales As Boolean = False Dim AplicaImpuestosLocales As Boolean = False
Dim ObjCliente As New ClsClientes 'Dim ObjCliente As New ClsClientes
If ObjCliente.GetClienteImpuestosLocales(CveCliente) Then 'If ObjCliente.GetClienteImpuestosLocales(CveCliente) Then
'se cargan impuestos locales ' 'se cargan impuestos locales
Dim DtClienteImpuesto As DataTable = ObjCliente.DtResultados.FiltraParametros("Seleccionado = 1", "Orden") ' Dim DtClienteImpuesto As DataTable = ObjCliente.DtResultados.FiltraParametros("Seleccionado = 1", "Orden")
AplicaImpuestosLocales = (DtClienteImpuesto IsNot Nothing AndAlso DtClienteImpuesto.Rows.Count > 0) ' AplicaImpuestosLocales = (DtClienteImpuesto IsNot Nothing AndAlso DtClienteImpuesto.Rows.Count > 0)
'End If
'ObjCliente.Dispose()
'CARGA IMPUESTOS LOCALES
Dim ObjVentas As New ClsVentas()
If ObjVentas.GetVentaImpuestosLocales(CveVenta) Then
If ObjVentas.DtResultados.Rows.Count > 0 Then
AplicaImpuestosLocales = True
TrOtros.Visible = True
TmpDTImpuestos = ObjVentas.DtResultados
GvImpuestosLocales2.DataSource = ObjVentas.DtResultados
GvImpuestosLocales2.DataBind()
GvImpuestosLocales2.Enabled = False
GvImpuestosLocales2.Visible = True
End If
End If End If
ObjCliente.Dispose() ObjVentas.Dispose()
AplicarNC(DdlNCPS.SelectedValue.ToEntero(), EsNCAmortizacion:=ChkAplicaNCAnticipo.Checked, AplicaImpuestosLocales:=AplicaImpuestosLocales, AplicaNuevoDocumento:=AplicaNuevoDocumento) AplicarNC(DdlNCPS.SelectedValue.ToEntero(), EsNCAmortizacion:=ChkAplicaNCAnticipo.Checked, AplicaImpuestosLocales:=AplicaImpuestosLocales, AplicaNuevoDocumento:=AplicaNuevoDocumento)