This commit is contained in:
@@ -1498,9 +1498,11 @@ Partial Class Inventarios_EntradasSalidas
|
||||
'Registro la prepóliza
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
Dim tValorInventario As Decimal = ObjInventario.DtResultados.SUM("Total", "").ToDecimal.RoundSQL()
|
||||
Dim tValorOtro As Decimal = tValorInventario
|
||||
Dim idCtaContable As Integer = 0
|
||||
Dim IdCtaContableOtro As Integer = UsuarioActual.Empresa.IdCuentaOtrosIngresos
|
||||
Dim TipoMovtoAlmacen As Boolean = False
|
||||
Dim TipoMovtoOtro As Boolean = True
|
||||
Dim tCveSubProyecto As Integer = -1
|
||||
|
||||
Dim drA2 As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveAlmacen = {0}", DdlAlmacen.SelectedValue))
|
||||
@@ -1530,6 +1532,8 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
Case 13, 29
|
||||
CveConceptoContable = 69
|
||||
TipoMovtoOtro = True
|
||||
tValorOtro = -tValorOtro
|
||||
Dim drr As DataRow = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimero("")
|
||||
If drr IsNot Nothing Then
|
||||
CveClasificacion = drr("CveClasificacion").ToString.ToEntero
|
||||
@@ -1556,7 +1560,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
' End If
|
||||
'Next
|
||||
'Case Else
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoAlmacen, tValorInventario, TxtObservaciones.Text.Trim, CveConceptoContable, TxtObservaciones.Text.Trim, TxtFecha.Text.ToDate, IdCtaContableOtro, -1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=tValorInventario, CveSubProyecto:=tCveSubProyecto, CveClasificacion:=CveClasificacion) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOtro, tValorOtro, TxtObservaciones.Text.Trim, CveConceptoContable, TxtObservaciones.Text.Trim, TxtFecha.Text.ToDate, IdCtaContableOtro, -1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=tValorOtro, CveSubProyecto:=tCveSubProyecto, CveClasificacion:=CveClasificacion) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
'End Select
|
||||
@@ -3253,10 +3257,10 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
|
||||
Dim DTOCs As DataTable = DtCostos.FiltraParametros("", "", {"CveOrdenCompraDetalle"})
|
||||
Dim IdCtaContable As Integer = 0
|
||||
Dim ConceptoPoliza As String = String.Format("{0}-{1}", DdlConcepto.SelectedItem.Text, TxtFolio.Text)
|
||||
Dim ConceptoPoliza As String = String.Format("{0}-{1}", DdlConcepto.SelectedItem.Text, If(DdlConcepto.SelectedValue.ToEntero.Contiene(3), HplVenta.Text, TxtFolio.Text))
|
||||
|
||||
If tmpCostos.Rows.Count > 0 Then
|
||||
Dim Concepto As String = $" {TxtObservaciones.Text}"
|
||||
Dim Concepto As String = If(TxtObservaciones.Text = "", ConceptoPoliza, $" {TxtObservaciones.Text}")
|
||||
Dim CvePrePoliza = ObjConta.AddPrePolizas("Inv_EntradaSalida", 74, DtCostos.SUM("Total"), DtCostos.SUM("Total"), 1, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If HdnCveOrdenCompra.Value.ToEntero > 0 Then
|
||||
|
||||
@@ -1896,6 +1896,87 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function GeneraPrePolizaSalidaEntregaDirecta(CveMovimiento As Integer, ByRef ObjInventario As ClsInventarios, ByRef ObjConta As ClsContabilidad, ByRef ObjContaContPAQ As ClsContPAQi) As Boolean
|
||||
Dim DtCostos As DataTable = Nothing
|
||||
Dim ValorInventario As Decimal = 0
|
||||
Dim ValorInventarioME As Decimal = 0
|
||||
Dim CveConcepto As Integer = 3
|
||||
Dim Retorno As Boolean = True
|
||||
|
||||
ObjInventario.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa)
|
||||
Dim CveVenta As Integer = ObjInventario.CveVenta
|
||||
Dim CveAlmacen As Integer = ObjInventario.CveAlmacen
|
||||
Dim SerieFolio As String = ObjInventario.DtResultados.Rows(0)("SerieFolioVenta").ToString
|
||||
Dim MovAlmacen As Boolean = True
|
||||
|
||||
Dim OrigenMov As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", "CveConcepto = " & CveConcepto).ToEntero
|
||||
If OrigenMov = 1 Then MovAlmacen = False Else MovAlmacen = True
|
||||
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
DtCostos = ObjInventario.DtResultados
|
||||
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
|
||||
Dim IdCtaContable As Integer = 0
|
||||
Dim ConceptoPoliza As String = String.Format("{0}-{1}", "Salida de Almacen", SerieFolio)
|
||||
|
||||
If tmpCostos.Rows.Count > 0 Then
|
||||
Dim Concepto As String = ConceptoPoliza
|
||||
Dim CvePrePoliza = ObjConta.AddPrePolizas("Inv_EntradaSalida", 74, DtCostos.SUM("Total"), DtCostos.SUM("Total"), 1, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
|
||||
Dim tCveConcepto As Integer = 69
|
||||
|
||||
For Each RowInv As DataRow In tmpCostos.Rows
|
||||
ValorInventario = DtCostos.SUM("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal.RoundSQL
|
||||
If tCveConcepto = 69 Then
|
||||
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ValorInventario, Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ValorInventario, CveSubProyecto:=tCveSubProyecto) Then
|
||||
Retorno = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacen}").ToEntero
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUMD("Total").RoundSQL) Then
|
||||
Retorno = False
|
||||
End If
|
||||
|
||||
|
||||
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Inventarios/RecepcionAlmacen-PPCompOC | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
Retorno = False
|
||||
End If
|
||||
End If
|
||||
|
||||
'CONTABILIZAR - SIMPLIFICAR
|
||||
If Retorno Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
||||
If Not ObjConta.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||
Retorno = False
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||
If ObjContaContPAQ Is Nothing Then
|
||||
ObjContaContPAQ = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjContaContPAQ.IniciaTransacSQL()
|
||||
End If
|
||||
|
||||
If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContaContPAQ) Then
|
||||
Retorno = False
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Private Sub GuardaCompraOC()
|
||||
Dim CveMovimiento As Integer
|
||||
Dim InvFolio As String = ""
|
||||
@@ -2054,6 +2135,12 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
If Not GeneraPrePolizaSalidaEntregaDirecta(CveMovtoSalidaDirecta, ObjInventario, ObjConta, ObjContaContPAQ) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -2109,8 +2196,10 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim TotalPorDevengar = 0.0
|
||||
TotalPorDevengar += GvInv.Rows.Cast(Of GridViewRow)().Sum(Function(Gvr) Math.Round(Gvr.DataKey("PU").ToString.ToDouble, 4) * Math.Round(Gvr.DataKey("CantidadF").ToString.ToDouble, 4))
|
||||
TotalPorDevengar = Math.Round(TotalPorDevengar, 4)
|
||||
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjContaAC.IniciaTransacSQL()
|
||||
If ObjContaContPAQ Is Nothing Then
|
||||
ObjContaContPAQ = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjContaContPAQ.IniciaTransacSQL()
|
||||
End If
|
||||
|
||||
IDPoliza = ObjContaAC.AddPoliza(4, "Devengado", TotalPorDevengar * 2, TotalPorDevengar * 2, UsuarioActual.CveUsuario, FechaMovto)
|
||||
If IDPoliza > 0 AndAlso ObjContaAC.GetCuentas(-1, "-1", -1) Then
|
||||
@@ -2365,8 +2454,10 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||
ObjContaContPAQ = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjContaContPAQ.IniciaTransacSQL()
|
||||
If ObjContaContPAQ Is Nothing Then
|
||||
ObjContaContPAQ = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjContaContPAQ.IniciaTransacSQL()
|
||||
End If
|
||||
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContaContPAQ) Then
|
||||
MensajeContabilidad = $"<br>Movimiento contabilizado en el folio: <b><a class='Texto' href = '/Contabilidad/RegPoliza.aspx?IdPoliza={ObjConta.ContaIdPoliza}'>{ObjConta.ContaFolio}</a></b><br>"
|
||||
Else
|
||||
|
||||
110
Inventarios/RepTraspasoEmitido.aspx
Normal file
110
Inventarios/RepTraspasoEmitido.aspx
Normal file
@@ -0,0 +1,110 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepTraspasoEmitido.aspx.cs" Inherits="Inventarios_RepTraspasoEmitido" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Traspasos Emitidos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<label class="col-md-1 ">Almacen:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlAlmacen" runat="server" AppendDataBoundItems="true" DataTextField="Almacen" DataValueField="CveAlmacen" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 ">Fecha Inicial:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<label class="col-md-1 ">Fecha Final:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
<label class="col-md-1 ">Estatus:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEstatus" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Emitido" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Cancelado" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GvDatos" runat="server" GridLines="None" ShowHeaderWhenEmpty="true" EmptyDataText="No se han encontrado datos con los filtros seleccionados"
|
||||
OnRowDataBound="GvDatos_RowDataBound" DataKeyNames="CveMovimiento,FolioFiscal"
|
||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" Width="100%" data-sort="true" AutoGenerateColumns="False">
|
||||
<Columns>
|
||||
<asp:HyperLinkField HeaderText="Folio" DataTextField="Folio" DataNavigateUrlFields="CveMovimiento" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" Target="_blank" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="FechaMovto" ItemStyle-Width="15%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="Almacen" ItemStyle-HorizontalAlign="Left" HeaderText="Almacen" />
|
||||
<asp:BoundField DataField="Estatus" ItemStyle-HorizontalAlign="Left" HeaderText="Estatus" />
|
||||
<asp:BoundField DataField="FolioFiscal" ItemStyle-HorizontalAlign="Left" HeaderText="Folio Fiscal" />
|
||||
<asp:BoundField DataField="FechaCancelacion" ItemStyle-HorizontalAlign="Left" HeaderText="Fecha Cancelación" />
|
||||
<asp:BoundField HeaderText="XML" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="PDF" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText="Cancelación">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkCancelarTraspaso" runat="server" OnClick="LnkCancelarTraspaso_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el traspaso?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
83
Inventarios/RepTraspasoEmitido.aspx.cs
Normal file
83
Inventarios/RepTraspasoEmitido.aspx.cs
Normal file
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using static Extensiones.ModExtensiones;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
|
||||
public partial class Inventarios_RepTraspasoEmitido : ClsPaginas
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
InicializaValores();
|
||||
}
|
||||
}
|
||||
|
||||
private void InicializaValores()
|
||||
{
|
||||
DdlAlmacen.DataSource = get_GlobalDTAlmacen(UsuarioActual.CveEmpresa);
|
||||
DdlAlmacen.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
DdlAlmacen.DataBind();
|
||||
txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString();
|
||||
txtFechaF.Text = DateTime.Now.ToShortDateString();
|
||||
}
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
private void CargaDatos()
|
||||
{
|
||||
ClsInventarios ObjInv = new ClsInventarios();
|
||||
if (ObjInv.GetRepTraspasosEmitidos(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), DdlEstatus.SelectedValue.ToEntero(),
|
||||
txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate()))
|
||||
{
|
||||
GvDatos.DataSource = ObjInv.DtResultados;
|
||||
}
|
||||
ObjInv.Dispose();
|
||||
GvDatos.DataBind();
|
||||
UpDatos.Update();
|
||||
}
|
||||
|
||||
protected void GvDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
e.Row.Cells[6].Text = String.Format("<a class=\"texto\" href=\"/Compras/PopUpVerFactura.aspx?P={0}\" target=\"_blank\"><i class=\"fa fa-ad-excel\"></i></a>", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", e.Row.DBCampo("CveMovimiento"), "XML",$"Tra-{e.Row.DBCampo("Folio")}","Tra")));
|
||||
e.Row.Cells[7].Text = String.Format("<a class=\"texto\" href=\"/Compras/PopUpVerFactura.aspx?P={0}\" target=\"_blank\"><i class=\"fa fa-ad-pdf\"></i></a>", Encripta(String.Format("OP=DesPdfTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", e.Row.DBCampo("CveMovimiento"), "PDF", $"Tra-{e.Row.DBCampo("Folio")}", "Tra")));
|
||||
if (e.Row.DBCampo("CveEstatusTimbrado").ToEntero()==2)
|
||||
{
|
||||
e.Row.Cells[8].Text = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkCancelarTraspaso_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow Gvr = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
Timbrado ObjCancelacion = new Timbrado();
|
||||
DateTime CancelacionFecha=MinFecha;
|
||||
int CveEstatusTimbrado = 0;
|
||||
string FolioFiscal = Gvr.DataKey("FolioFiscal").ToString(),SelloCancelacion ="";
|
||||
int CveMovimiento = Gvr.DataKey("CveMovimiento").ToEntero();
|
||||
if (ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, 0, "XAXX010101000", UsuarioActual.Empresa.RFC, 2,false))
|
||||
{
|
||||
CancelacionFecha = ObjCancelacion.CancelacionFecha;
|
||||
SelloCancelacion = ObjCancelacion.CancelacionAcuse;
|
||||
CveEstatusTimbrado = 2;
|
||||
}else
|
||||
{
|
||||
Alert("La factura no se pudo cancelar ante el SAT", TipoMensaje.MsgError);
|
||||
}
|
||||
if (CveEstatusTimbrado > 0)
|
||||
{
|
||||
ClsInventarios ObjInv = new ClsInventarios();
|
||||
if (ObjInv.UpdateMovimientoTimbrado(CveMovimiento, CveEstatusTimbrado, FolioFiscal, CancelacionFecha, SelloCancelacion))
|
||||
{
|
||||
Alert("El traspaso se cancelo correctamente.", TipoMensaje.MsgInformacion);
|
||||
@@ -203,6 +203,76 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div id="DivDocChofer" class="col-md-4" style="display: none;">
|
||||
|
||||
<asp:UpdatePanel ID="UpDocChofer" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="portlet light xspadding traspasorow bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">DOCUMENTACIÓN DEL CHOFER</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body ">
|
||||
<div class="rowpadding">
|
||||
<div class="row">
|
||||
<label class="col-md-5">Responsable cargó:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:TextBox runat="server" Text="" ID="TxtResponsableCarga" Width="150px" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-5">Responsable recibió:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:TextBox runat="server" Text="" ID="TxtResponsableRecibio" Width="150px" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-5">Identificación:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:TextBox runat="server" Text="" ID="TxtIdentificacion" Width="150px" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-5">Domicilio:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:TextBox runat="server" Text="" ID="TxtDomicilio" Width="150px" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-5">Teléfono:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:TextBox runat="server" Text="" ID="TxtTelefono" Width="150px" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-5">Ciudad:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:TextBox runat="server" Text="" ID="TxtCiudad" Width="150px" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-5">Licencia:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:TextBox runat="server" Text="" ID="TxtLicencia" Width="150px" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -256,145 +326,150 @@
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row" runat="server" id="DivCodigoSeriePS">
|
||||
<div class="col-md-4 pull-right">
|
||||
<table style="float: right;">
|
||||
<tr>
|
||||
<td><i class="fa fa-barcode" style="font-size: 1.8em; margin-top: 8px;" aria-hidden="true" data-toggle="tooltip" title="Código Barras"></i></td>
|
||||
<td>
|
||||
<asp:Panel ID="PanelCodigo" runat="server" DefaultButton="BtnCodigoPS">
|
||||
<asp:TextBox ID="TxtCodigoPS" CssClass="form-control input-sm" ClientIDMode="Static" Text="" runat="server" />
|
||||
<asp:Button Text="" ID="BtnCodigoPS" OnClick="BtnCodigoPS_Click" Style="display: none" runat="server" />
|
||||
</asp:Panel>
|
||||
</td>
|
||||
<td runat="server" visible="false" id="TdSeriePS">
|
||||
<asp:Panel ID="PanelSerie" runat="server" DefaultButton="BtnSeriePS">
|
||||
<asp:TextBox ID="TxtSeriePS" Text="" runat="server" />
|
||||
<asp:Button Text="" ID="BtnSeriePS" OnClick="BtnSeriePS_Click" Style="display: none" runat="server" />
|
||||
</asp:Panel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row" runat="server" id="DivCodigoSeriePS">
|
||||
<div class="col-md-4 pull-right">
|
||||
<table style="float: right;">
|
||||
<tr>
|
||||
<td><i class="fa fa-barcode" style="font-size: 1.8em; margin-top: 8px;" aria-hidden="true" data-toggle="tooltip" title="Código Barras"></i></td>
|
||||
<td>
|
||||
<asp:Panel ID="PanelCodigo" runat="server" DefaultButton="BtnCodigoPS">
|
||||
<asp:TextBox ID="TxtCodigoPS" CssClass="form-control input-sm" ClientIDMode="Static" Text="" runat="server" />
|
||||
<asp:Button Text="" ID="BtnCodigoPS" OnClick="BtnCodigoPS_Click" Style="display: none" runat="server" />
|
||||
</asp:Panel>
|
||||
</td>
|
||||
<td runat="server" visible="false" id="TdSeriePS">
|
||||
<asp:Panel ID="PanelSerie" runat="server" DefaultButton="BtnSeriePS">
|
||||
<asp:TextBox ID="TxtSeriePS" Text="" runat="server" />
|
||||
<asp:Button Text="" ID="BtnSeriePS" OnClick="BtnSeriePS_Click" Style="display: none" runat="server" />
|
||||
</asp:Panel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<table border="0" cellpadding="0" class="Widthall grides" cellspacing="0">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="25px">#</th>
|
||||
<th width="100px">Cantidad</th>
|
||||
<th width="90px">Unidad</th>
|
||||
<th width="500px">Clasificación
|
||||
<table border="0" cellpadding="0" class="Widthall grides" cellspacing="0">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="25px">#</th>
|
||||
<th width="100px">Cantidad</th>
|
||||
<th width="90px">Unidad</th>
|
||||
<th width="500px">Clasificación
|
||||
<br />
|
||||
Producto
|
||||
</th>
|
||||
<th style="width: 88px" runat="server" id="ThSerieLote" visible="false">Serie - Lote </th>
|
||||
<th style="width: 88px" runat="server" id="ThLote" visible="false">Lote</th>
|
||||
<th style="width: 88px" runat="server" id="ThBatch" visible="false">Batch</th>
|
||||
<th style="width: 88px" runat="server" id="ThSeccionAlmacen" visible="false">Sección Almacen</th>
|
||||
<th width="160px">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td align="center">
|
||||
<asp:TextBox ID="txtCantidad" Width="50px" MaxLength="7" runat="server" TabIndex="1"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="ftbeCant" runat="server" TargetControlID="txtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator runat="server" ID="RFVCantidad" ControlToValidate="txtCantidad" ValidationGroup="GrpAgregar" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario por favor introdúzcalo." Display="Dynamic" Text="*"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCantidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RangeValidator ID="RVCantidad" runat="server" ControlToValidate="txtCantidad" Display="None" Type="Double" MinimumValue="0.1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor introdúzcalo." ValidationGroup="GrpAgregar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="RVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlUnidad" runat="server" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" CssClass="form-control input-sm select2me" Style="width: 85px !important;"></asp:DropDownList>
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="psagregar">
|
||||
<div class="comboxes">
|
||||
<asp:DropDownList ID="DdlClasificacion" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<br />
|
||||
<ADS:Dropdownlost runat="server" ID="DdlProducto2" CssStyle="width: 100%;" IncluyeTodos="false" CssClassDdl="select2me" TabIndex="2" DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
Producto
|
||||
</th>
|
||||
<th width="100px">Observaciones</th>
|
||||
<th style="width: 88px" runat="server" id="ThSerieLote" visible="false">Serie - Lote </th>
|
||||
<th style="width: 88px" runat="server" id="ThLote" visible="false">Lote</th>
|
||||
<th style="width: 88px" runat="server" id="ThBatch" visible="false">Batch</th>
|
||||
<th style="width: 88px" runat="server" id="ThSeccionAlmacen" visible="false">Sección Almacen</th>
|
||||
<th width="160px">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td align="center">
|
||||
<asp:TextBox ID="txtCantidad" Width="50px" MaxLength="7" runat="server" TabIndex="1"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="ftbeCant" runat="server" TargetControlID="txtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator runat="server" ID="RFVCantidad" ControlToValidate="txtCantidad" ValidationGroup="GrpAgregar" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario por favor introdúzcalo." Display="Dynamic" Text="*"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCantidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RangeValidator ID="RVCantidad" runat="server" ControlToValidate="txtCantidad" Display="None" Type="Double" MinimumValue="0.1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor introdúzcalo." ValidationGroup="GrpAgregar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="RVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlUnidad" runat="server" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" CssClass="form-control input-sm select2me" Style="width: 85px !important;"></asp:DropDownList>
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="psagregar">
|
||||
<div class="comboxes">
|
||||
<asp:DropDownList ID="DdlClasificacion" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<br />
|
||||
<ADS:Dropdownlost runat="server" ID="DdlProducto2" CssStyle="width: 100%;" IncluyeTodos="false" CssClassDdl="select2me" TabIndex="2" DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
<td runat="server" id="TdSerieLote" visible="false">
|
||||
<asp:Panel runat="server" DefaultButton="BtnSerieAddNew">
|
||||
<asp:TextBox ID="TxtnSerieLote" Visible="false" runat="server" Width="80px"></asp:TextBox>
|
||||
<asp:Button Text="" ID="BtnSerieAddNew" OnClick="BtnSerieAddNew_Click" Style="display: none" runat="server" />
|
||||
</asp:Panel>
|
||||
</td>
|
||||
<td runat="server" id="TdLote" visible="false">
|
||||
<asp:TextBox ID="TxtnLote" CssClass="form-control input-sm" runat="server" Width="80px" Visible="false"></asp:TextBox>
|
||||
</td>
|
||||
<td runat="server" id="TdBatch" visible="false">
|
||||
<asp:TextBox ID="TxtnBatch" CssClass="form-control input-sm" runat="server" Width="80px" Visible="false"></asp:TextBox>
|
||||
</td>
|
||||
<td align="center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CssClass="Texto" ValidationGroup="GrpAgregar" TabIndex="3" Text="Agregar" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtnObservaciones" CssClass="form-control input-sm" runat="server" Width="100px"></asp:TextBox>
|
||||
</td>
|
||||
<td runat="server" id="TdSerieLote" visible="false">
|
||||
<asp:Panel runat="server" DefaultButton="BtnSerieAddNew">
|
||||
<asp:TextBox ID="TxtnSerieLote" Visible="false" runat="server" Width="80px"></asp:TextBox>
|
||||
<asp:Button Text="" ID="BtnSerieAddNew" OnClick="BtnSerieAddNew_Click" Style="display: none" runat="server" />
|
||||
</asp:Panel>
|
||||
</td>
|
||||
<td runat="server" id="TdLote" visible="false">
|
||||
<asp:TextBox ID="TxtnLote" CssClass="form-control input-sm" runat="server" Width="80px" Visible="false"></asp:TextBox>
|
||||
</td>
|
||||
<td runat="server" id="TdBatch" visible="false">
|
||||
<asp:TextBox ID="TxtnBatch" CssClass="form-control input-sm" runat="server" Width="80px" Visible="false"></asp:TextBox>
|
||||
</td>
|
||||
<td align="center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CssClass="Texto" ValidationGroup="GrpAgregar" TabIndex="3" Text="Agregar" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<div style="max-height: 300px; overflow-y: auto;">
|
||||
<asp:GridView ID="GvDatos" DataKeyNames="No,PS,CvePS,CveUM,SerieLote,Cantidad" runat="server" ShowHeader="false" AutoGenerateColumns="False" EmptyDataText="" ToolTip="Listado de Movimientos" CssClass="Widthall table table-striped table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="#" DataField="No" ItemStyle-Width="23px" />
|
||||
<asp:TemplateField ItemStyle-Width="93px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Cantidad") %>' ID="ltlCantidad"></asp:Literal>
|
||||
<asp:TextBox runat="server" ID="TxtCantidad2" Text='<%# Eval("Cantidad", "{0:###,###,###,##0.##}") %>' Width="50px" Visible="false"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumerosCantidadF" runat="server" TargetControlID="TxtCantidad2" FilterType="Numbers,custom" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- <asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-Width="100px" />--%>
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="86px" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-Width="500px" />
|
||||
<asp:BoundField HeaderText="SerieLote" DataField="SerieLote" ItemStyle-Width="90px" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="90px" />
|
||||
<asp:BoundField HeaderText="Batch" DataField="Batch" ItemStyle-Width="90px" />
|
||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton data-toggle="tooltip" title="Sección Almacen" ID="LnkSeccionAlmacen" OnClick="LnkSeccionAlmacen_Click" CssClass="btn btn-circle btn-xs green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lnkRemove" runat="server" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" CommandName="Delete" CommandArgument='<%# Eval("No")%>' data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar el concepto?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="160px" HorizontalAlign="Center"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row" style="text-align: center;">
|
||||
<div class="col-md-12">
|
||||
<asp:Button Text="Realizar Traspaso" CssClass="btn btn-primary" ValidationGroup="GrpGuardar" ID="BtnGuardar" runat="server" />
|
||||
<asp:Button Text="Nuevo" CssClass="btn btn-success" ID="BtnNuevo" OnClick="BtnNuevo_Click" runat="server" />
|
||||
<div style="max-height: 300px; overflow-y: auto;">
|
||||
<asp:GridView ID="GvDatos" DataKeyNames="No,PS,CvePS,CveUM,SerieLote,Cantidad" runat="server" ShowHeader="false" AutoGenerateColumns="False" EmptyDataText="" ToolTip="Listado de Movimientos" CssClass="Widthall table table-striped table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="#" DataField="No" ItemStyle-Width="23px" />
|
||||
<asp:TemplateField ItemStyle-Width="93px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Cantidad") %>' ID="ltlCantidad"></asp:Literal>
|
||||
<asp:TextBox runat="server" ID="TxtCantidad2" Text='<%# Eval("Cantidad", "{0:###,###,###,##0.##}") %>' Width="50px" Visible="false"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumerosCantidadF" runat="server" TargetControlID="TxtCantidad2" FilterType="Numbers,custom" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- <asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-Width="100px" />--%>
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="86px" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-Width="500px" />
|
||||
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="SerieLote" DataField="SerieLote" ItemStyle-Width="90px" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="90px" />
|
||||
<asp:BoundField HeaderText="Batch" DataField="Batch" ItemStyle-Width="90px" />
|
||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton data-toggle="tooltip" title="Sección Almacen" ID="LnkSeccionAlmacen" OnClick="LnkSeccionAlmacen_Click" CssClass="btn btn-circle btn-xs green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lnkRemove" runat="server" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" CommandName="Delete" CommandArgument='<%# Eval("No")%>' data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar el concepto?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="160px" HorizontalAlign="Center"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row" style="text-align: center;">
|
||||
<div class="col-md-12">
|
||||
<asp:Button Text="Realizar Traspaso" CssClass="btn btn-primary" ValidationGroup="GrpGuardar" ID="BtnGuardar" runat="server" />
|
||||
<asp:Button Text="Nuevo" CssClass="btn btn-success" ID="BtnNuevo" OnClick="BtnNuevo_Click" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Else
|
||||
DivCodigoSeriePS.Visible = False
|
||||
End If
|
||||
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(0);$('#DivGastoIndirecto').show(0);")
|
||||
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(0);$('#DivGastoIndirecto').show(0);$('#DivDocChofer').show(0);")
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 119) Then DivEmiirTimbrado.Visible = True
|
||||
|
||||
@@ -212,7 +212,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
TipoSeccionAlmacen = 0
|
||||
|
||||
Else
|
||||
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(0);$('#DivGastoIndirecto').show(0);")
|
||||
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(0);$('#DivGastoIndirecto').show(0);$('#DivDocChofer').show(0);")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -240,6 +240,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
dt.Columns.Add("CvePS", Type.GetType("System.Int32"))
|
||||
dt.Columns.Add("CveAF", Type.GetType("System.Int32"))
|
||||
dt.Columns.Add("PS")
|
||||
dt.Columns.Add("Observaciones")
|
||||
dt.Columns.Add("SerieLote")
|
||||
dt.Columns.Add("Lote")
|
||||
dt.Columns.Add("Batch")
|
||||
@@ -512,7 +513,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim Valido = ValidaExistencia(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, If(TxtnSerieLote.Visible, TxtnSerieLote.Text, "-1"), If(TxtnLote.Visible, TxtnLote.Text, "-1"), If(TxtnBatch.Visible, TxtnBatch.Text, "-1"))
|
||||
|
||||
If Valido Then
|
||||
AgregarPS(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, If(TxtnSerieLote.Visible, TxtnSerieLote.Text, ""), If(TxtnLote.Visible, TxtnLote.Text, ""), If(TxtnBatch.Visible, TxtnBatch.Text, ""), FuncionalidadSinSerie)
|
||||
AgregarPS(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, TxtnObservaciones.Text, If(TxtnSerieLote.Visible, TxtnSerieLote.Text, ""), If(TxtnLote.Visible, TxtnLote.Text, ""), If(TxtnBatch.Visible, TxtnBatch.Text, ""), FuncionalidadSinSerie)
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -537,7 +538,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Private Sub AgregarPS(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, Optional SerieLote As String = "", Optional Lote As String = "", Optional Batch As String = "", Optional Limpia As Boolean = True)
|
||||
Private Sub AgregarPS(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, Optional Observaciones As String = "", Optional SerieLote As String = "", Optional Lote As String = "", Optional Batch As String = "", Optional Limpia As Boolean = True)
|
||||
If Cantidad <= 0 Then
|
||||
Alert("La cantidad debe ser mayor a cero (0). Por favor verifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
@@ -557,6 +558,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
registro.Item("UnidadMedida") = DrUM("UnidadMedida")
|
||||
registro.Item("CvePS") = CvePS
|
||||
registro.Item("PS") = DrPS("PSCodigo")
|
||||
registro.Item("Observaciones") = Observaciones
|
||||
registro.Item("SerieLote") = SerieLote
|
||||
registro.Item("Lote") = Lote
|
||||
registro.Item("Batch") = Batch
|
||||
@@ -593,6 +595,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
DdlClasificacion.SelectedValue = "-1"
|
||||
DdlClasificacion_SelectedIndexChanged(DdlClasificacion, EventArgs.Empty)
|
||||
txtCantidad.Text = ""
|
||||
TxtnObservaciones.Text = ""
|
||||
TxtnSerieLote.Text = ""
|
||||
TxtnSerieLote.Visible = False
|
||||
TxtnLote.Text = ""
|
||||
@@ -750,7 +753,9 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(DdlAlmacenOrigen.SelectedValue.ToEntero, TipoMovimientoSalida, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
|
||||
Observaciones:=TxtObservaciones.Text.Trim, Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, "-1"),
|
||||
CveAlmacenDestino:=DdlAlmacenDestino.SelectedValue.ToEntero, GastoIndirecto:=If(ChkTransitorio.Checked And TxtGastoIndirecto.Text.ToDouble > 0, TxtGastoIndirecto.Text, "-1").ToDouble,
|
||||
CveChofer:=If(ChkTransitorio.Checked, DldChofer.SelectedValue.ToEntero, -1), Placa:=If(ChkTransitorio.Checked, TxtPlaca.Text.Trim, "-1"), FechaEntrega:=If(ChkTransitorio.Checked, TxtFechaEntrega.Text.Trim.ToDateTime.ToString("dd/MM/yyyy"), "-1"), EspecifUnidad:=If(ChkTransitorio.Checked, TxtEspecifUnidad.Text.Trim, "-1"))
|
||||
CveChofer:=If(ChkTransitorio.Checked, DldChofer.SelectedValue.ToEntero, -1), Placa:=If(ChkTransitorio.Checked, TxtPlaca.Text.Trim, "-1"), FechaEntrega:=If(ChkTransitorio.Checked, TxtFechaEntrega.Text.Trim.ToDateTime.ToString("dd/MM/yyyy"), "-1"), EspecifUnidad:=If(ChkTransitorio.Checked, TxtEspecifUnidad.Text.Trim, "-1"),
|
||||
ResponsableCarga:=If(ChkTransitorio.Checked, TxtResponsableCarga.Text.Trim, "-1"), ResponsableRecibio:=If(ChkTransitorio.Checked, TxtResponsableRecibio.Text.Trim, "-1"), Identificacion:=If(ChkTransitorio.Checked, TxtIdentificacion.Text.Trim, "-1"), Domicilio:=If(ChkTransitorio.Checked, TxtDomicilio.Text.Trim, "-1"),
|
||||
Telefono:=If(ChkTransitorio.Checked, TxtTelefono.Text.Trim, "-1"), Ciudad:=If(ChkTransitorio.Checked, TxtCiudad.Text.Trim, "-1"), Licencia:=If(ChkTransitorio.Checked, TxtLicencia.Text.Trim, "-1"))
|
||||
FolioSalida = ObjInventario.Folio
|
||||
Folio = ObjInventario.Folio
|
||||
If CveMovimientoSalida <= 0 Then
|
||||
@@ -759,7 +764,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Else
|
||||
Dim Cont As Integer = 0
|
||||
For Each Dr As DataRow In DtMovimientos.Rows
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, Observaciones:=Dr("Observaciones").ToString) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
||||
Exit For
|
||||
@@ -794,7 +799,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
Dim Cont As Integer = 0
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, Observaciones:=Dr("Observaciones").ToString) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al guardar los movimientos de entrada"
|
||||
Exit For
|
||||
@@ -988,6 +993,13 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
TxtPlaca.Text = ""
|
||||
TxtEspecifUnidad.Text = ""
|
||||
DtSeccionAlmacen.Rows.Clear()
|
||||
TxtResponsableCarga.Text = ""
|
||||
TxtResponsableRecibio.Text = ""
|
||||
TxtIdentificacion.Text = ""
|
||||
TxtDomicilio.Text = ""
|
||||
TxtTelefono.Text = ""
|
||||
TxtCiudad.Text = ""
|
||||
TxtLicencia.Text = ""
|
||||
|
||||
DivMov.Visible = False
|
||||
CargadoDeMov = False
|
||||
@@ -1089,34 +1101,34 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
TxtnSerieLote.Visible = False
|
||||
ThSerieLote.Visible = False
|
||||
TdSerieLote.Visible = False
|
||||
GvDatos.Columns(4).Visible = False
|
||||
GvDatos.Columns(5).Visible = False
|
||||
|
||||
TxtnLote.Visible = False
|
||||
ThLote.Visible = False
|
||||
TdLote.Visible = False
|
||||
GvDatos.Columns(5).Visible = False
|
||||
GvDatos.Columns(6).Visible = False
|
||||
|
||||
TxtnBatch.Visible = False
|
||||
ThBatch.Visible = False
|
||||
TdBatch.Visible = False
|
||||
GvDatos.Columns(6).Visible = False
|
||||
GvDatos.Columns(7).Visible = False
|
||||
|
||||
If DtTemp.MAX("SerieLote").ToString <> "" Then
|
||||
TxtnSerieLote.Visible = True
|
||||
ThSerieLote.Visible = True
|
||||
TdSerieLote.Visible = True
|
||||
GvDatos.Columns(4).Visible = True
|
||||
GvDatos.Columns(5).Visible = True
|
||||
End If
|
||||
If DtTemp.MAX("Lote").ToString <> "" Then
|
||||
TxtnLote.Visible = True
|
||||
ThLote.Visible = True
|
||||
TdLote.Visible = True
|
||||
GvDatos.Columns(5).Visible = True
|
||||
GvDatos.Columns(6).Visible = True
|
||||
|
||||
TxtnBatch.Visible = True
|
||||
ThBatch.Visible = True
|
||||
TdBatch.Visible = True
|
||||
GvDatos.Columns(6).Visible = True
|
||||
GvDatos.Columns(7).Visible = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1261,9 +1273,9 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
'DdlResponsable.SelectedValue = "-1"
|
||||
TxtResponsable.Text = ""
|
||||
TxtGastoIndirecto.Text = ""
|
||||
RegistraScript("$('#DivTransitorio').show(200);$('#DivGastoIndirecto').show(100);")
|
||||
RegistraScript("$('#DivTransitorio').show(200);$('#DivGastoIndirecto').show(100);$('#DivDocChofer').show(100);")
|
||||
Else
|
||||
RegistraScript("$('#DivTransitorio').hide(500);$('#DivGastoIndirecto').hide(500);")
|
||||
RegistraScript("$('#DivTransitorio').hide(500);$('#DivGastoIndirecto').hide(500);$('#DivDocChofer').hide(500);")
|
||||
End If
|
||||
|
||||
UpModalSeccionAlmacen.Update()
|
||||
|
||||
Reference in New Issue
Block a user