Recepcion Almacen Bitacora recarga despues de guaraddo parcial
This commit is contained in:
@@ -19,14 +19,25 @@
|
||||
<li>
|
||||
<a target="_blank" class="ayuda" href="../Documentacion/DocumentacionInventarios.aspx#RecepcionAlmacen"> </a>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="HlAgregarExcel" NavigateUrl="#" Visible="true" data-toggle="modal" data-target="#DivCargaExcel" runat="server"><i class='fa fa-server'></i> Cargar Excel</asp:HyperLink>
|
||||
</li>
|
||||
|
||||
<%--
|
||||
<li>
|
||||
<asp:HyperLink ID="HlAgregarExcel" NavigateUrl="#" Visible="true" data-toggle="modal" data-target="#DivCargaExcel" runat="server"><i class='fa fa-server'></i> Cargar Excel</asp:HyperLink>
|
||||
</li>
|
||||
--%>
|
||||
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAgregarExcel" Visible="true" OnClick="LnkAgregarExcel_Click" runat="server"><i class='fa fa-server'></i> Cargar Excel</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="uppCargaBitacora" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="HplCargaBitacora" runat="server" Visible="false" OnClick="HplCargaBitacora_Click" Style="color: #686868;"><i class="fa fa-file-load-o" style="color: #686868;"></i> Cargar Bitácora</asp:LinkButton>
|
||||
<asp:LinkButton ID="HplCargaBitacora" runat="server" Visible="false" OnClick="HplCargaBitacora_Click" Style="color: #686868;"><i class="fa fa-book" aria-hidden="true"></i> Cargar Bitácora</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -7,6 +7,7 @@ Imports System.Text
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports Org.BouncyCastle.Asn1.X509
|
||||
|
||||
Partial Class Inventarios_RecepcionAlmacen
|
||||
Inherits ClsPaginas
|
||||
@@ -154,12 +155,21 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
ViewState("PUSerie") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveConsecSerie As Integer
|
||||
'Private Property CveConsecSerie As Integer
|
||||
' Get
|
||||
' Return CType(ViewState("CveConsecSerie"), Integer)
|
||||
' End Get
|
||||
' Set(value As Integer)
|
||||
' ViewState("CveConsecSerie") = value
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
Private Property CveCompraDetalle As Integer
|
||||
Get
|
||||
Return CType(ViewState("CveConsecSerie"), Integer)
|
||||
Return CType(ViewState("CveCompraDetalle"), Integer)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveConsecSerie") = value
|
||||
ViewState("CveCompraDetalle") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalGV As Decimal
|
||||
@@ -412,6 +422,11 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End Property
|
||||
Private Property ArchivoBitacora As String
|
||||
Get
|
||||
|
||||
If ViewState("ArchivoBitacora") Is Nothing Then
|
||||
ViewState("ArchivoBitacora") = ""
|
||||
End If
|
||||
|
||||
Return CType(ViewState("ArchivoBitacora"), String)
|
||||
End Get
|
||||
Set(value As String)
|
||||
@@ -420,6 +435,10 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End Property
|
||||
Private Property ArchivoBitacoraDetalle As String
|
||||
Get
|
||||
If ViewState("ArchivoBitacoraDetalle") Is Nothing Then
|
||||
ViewState("ArchivoBitacoraDetalle") = ""
|
||||
End If
|
||||
|
||||
Return CType(ViewState("ArchivoBitacoraDetalle"), String)
|
||||
End Get
|
||||
Set(value As String)
|
||||
@@ -1461,11 +1480,12 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
'If e.Row.DBCampo("CveMetodoInventario").ToString = "5" Then
|
||||
e.Row.FCButton("BtnSerie").Visible = True
|
||||
e.Row.FCButton("BtnSerie").CommandArgument = String.Format("{0}°{1}°{2}°{3}°{4}°{5}", e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveUM"), e.Row.DBCampo("PU"), e.Row.DBCampo("PS"), e.Row.DBCampo("CantidadF"), e.Row.DBCampo("Consec"))
|
||||
e.Row.FCButton("BtnSerie").CommandArgument = String.Format("{0}°{1}°{2}°{3}°{4}°{5}°{6}", e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveUM"), e.Row.DBCampo("PU"), e.Row.DBCampo("PS"), e.Row.DBCampo("CantidadF"), e.Row.DBCampo("Consec"), e.Row.DBCampo("CveCompraDetalle"))
|
||||
|
||||
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
||||
e.Row.FCCheckBox("cbInv").Enabled = False
|
||||
Dim Contador As Integer = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", e.Row.DataKey("Consec"))).Rows.Count
|
||||
'Dim Contador As Integer = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", e.Row.DataKey("Consec"))).Rows.Count
|
||||
Dim Contador As Integer = DtDatosDetalle.FiltraParametros(String.Format("CveCompraDetalle = {0}", e.Row.DataKey("CveCompraDetalle"))).Rows.Count
|
||||
e.Row.FCTextBox("TbCantidadF").Text = Contador.ToString
|
||||
|
||||
'' Empresa Acumuladores
|
||||
@@ -1617,7 +1637,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
TdSeriePS.Visible = True
|
||||
TxtSeriePS.Focus()
|
||||
|
||||
CveConsecSerie = Gvr.DataKey("Consec").ToEntero
|
||||
'CveConsecSerie = Gvr.DataKey("Consec").ToEntero
|
||||
CveCompraDetalle = Gvr.DataKey("CveCompraDetalle").ToEntero
|
||||
CvePSSerie = Gvr.DataKey("CvePS").ToEntero
|
||||
CveUMSerie = Gvr.DataKey("CveUM").ToEntero
|
||||
Exit Sub
|
||||
@@ -1717,7 +1738,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
CvePSSerie = Argumentos(0).ToEntero
|
||||
CveUMSerie = Argumentos(1).ToEntero
|
||||
PUSerie = Argumentos(2).ToDecimal
|
||||
CveConsecSerie = Argumentos(5).ToEntero
|
||||
'CveConsecSerie = Argumentos(5).ToEntero
|
||||
CveCompraDetalle = Argumentos(6).ToEntero
|
||||
|
||||
CargaSerie(1)
|
||||
|
||||
@@ -1732,6 +1754,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
DtDatosDetalle.Columns.Add("PU", GetType(Decimal))
|
||||
DtDatosDetalle.Columns.Add("Serie", GetType(String))
|
||||
DtDatosDetalle.Columns.Add("FechaCaducidad", GetType(String))
|
||||
DtDatosDetalle.Columns.Add("CveCompraDetalle", GetType(Integer))
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1747,11 +1771,13 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
'RegistraScript("document.getElementById(""TxtSerie"").focus();")
|
||||
RegistraScript("$('#DivSerie').modal();", "ModalLote")
|
||||
|
||||
GvSerie.DataSource = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie), "Consec DESC")
|
||||
'GvSerie.DataSource = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie), "Consec DESC")
|
||||
GvSerie.DataSource = DtDatosDetalle.FiltraParametros(String.Format("CveCompraDetalle = {0}", CveCompraDetalle), "Consec DESC")
|
||||
GvSerie.DataBind()
|
||||
|
||||
'VALIDA QUE SIGA AGREGANDO
|
||||
If Not DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie)).Rows.Count < LbCantidad.Text.ToEntero Then
|
||||
'If Not DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie)).Rows.Count < LbCantidad.Text.ToEntero Then
|
||||
If Not DtDatosDetalle.FiltraParametros(String.Format("CveCompraDetalle = {0}", CveCompraDetalle)).Rows.Count < LbCantidad.Text.ToEntero Then
|
||||
BtnAgregarPS.Enabled = True
|
||||
If CerrarCompletado Then
|
||||
RegistraScript("$('#DivSerie').modal('hide');")
|
||||
@@ -1764,7 +1790,9 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim Contador As Integer = 0
|
||||
For Each Gvr As GridViewRow In GvInv.Rows
|
||||
If Gvr.DataKey("CvePS").ToEntero = CvePSSerie Then
|
||||
Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec"))).Rows.Count
|
||||
'Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec"))).Rows.Count
|
||||
Contador = DtDatosDetalle.FiltraParametros(String.Format("CveCompraDetalle = {0}", Gvr.DataKey("CveCompraDetalle"))).Rows.Count
|
||||
|
||||
Gvr.FCCheckBox("cbInv").Enabled = False
|
||||
Gvr.FCTextBox("TbCantidadF").Enabled = False
|
||||
If DtDatosDetalle IsNot Nothing AndAlso Contador > 0 Then
|
||||
@@ -1776,7 +1804,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim Dr As DataRow = DtInv.Select($"Consec = {Gvr.DataKey("Consec")}")(0)
|
||||
'Dim Dr As DataRow = DtInv.Select($"Consec = {Gvr.DataKey("Consec")}")(0)
|
||||
Dim Dr As DataRow = DtInv.Select($"CveCompraDetalle = {Gvr.DataKey("CveCompraDetalle")}")(0)
|
||||
Dr("CantidadSurtidaPantalla") = Gvr.FCTextBox("TbCantidadF").Text.ToDecimal
|
||||
DtInv.AcceptChanges()
|
||||
Next
|
||||
@@ -1810,7 +1839,10 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltroPrimero("", "PS")
|
||||
|
||||
For Each Serie In SeriesArreglo
|
||||
DtDuplicado = DtDatosDetalle.FiltraParametros($"ConsecId = {CveConsecSerie} AND Serie = '{Serie}'")
|
||||
'DtDuplicado = DtDatosDetalle.FiltraParametros($"ConsecId = {CveConsecSerie} AND Serie = '{Serie}'")
|
||||
DtDuplicado = DtDatosDetalle.FiltraParametros($"CveCompraDetalle = {CveCompraDetalle} AND Serie = '{Serie}'")
|
||||
|
||||
|
||||
If DtDuplicado IsNot Nothing AndAlso DtDuplicado.Rows.Count > 0 Then
|
||||
MensajeAlert.Append($"<br/> El numero de Serie <b>""{Serie}""</b> proporcionado ya se encuentra ingresado.")
|
||||
TxtSerie.Text = ""
|
||||
@@ -1836,7 +1868,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim Index As Integer = 0
|
||||
Dim Cantidad As Integer = LbCantidad.Text.ToEntero
|
||||
|
||||
If CargaMasivaSeries Then Cantidad = DtInv.FiltroPrimeroValor("CantidadF", "Consec = " & CveConsecSerie).ToEntero
|
||||
'If CargaMasivaSeries Then Cantidad = DtInv.FiltroPrimeroValor("CantidadF", "Consec = " & CveConsecSerie).ToEntero
|
||||
If CargaMasivaSeries Then Cantidad = DtInv.FiltroPrimeroValor("CantidadF", "CveCompraDetalle = " & CveCompraDetalle).ToEntero
|
||||
'DtInv
|
||||
|
||||
For Each Serie In SeriesArreglo
|
||||
@@ -1847,7 +1880,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
If Index > Cantidad Then Exit For
|
||||
|
||||
'VALIDA QUE SIGA AGREGANDO
|
||||
If Not DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie)).Rows.Count < Cantidad Then
|
||||
'If Not DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie)).Rows.Count < Cantidad Then
|
||||
If Not DtDatosDetalle.FiltraParametros(String.Format("CveCompraDetalle = {0}", CveCompraDetalle)).Rows.Count < Cantidad Then
|
||||
MensajeAlert.Append("series cargadas en su totalidad") : Exit For
|
||||
End If
|
||||
|
||||
@@ -1867,7 +1901,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
End If
|
||||
|
||||
Row("ConsecId") = CveConsecSerie
|
||||
'Row("ConsecId") = CveConsecSerie
|
||||
Row("CveCompraDetalle") = CveCompraDetalle
|
||||
Row("Consec") = DtDatosDetalle.Rows.Count + 1
|
||||
Row("CvePS") = CvePSSerie
|
||||
Row("CveUM") = CveUMSerie
|
||||
@@ -1922,6 +1957,10 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim dtt As New DataTable
|
||||
dtt.ReadXml(ArchivoBitacoraDetalle)
|
||||
DtDatosDetalle = dtt
|
||||
If Not DtDatosDetalle.Columns.Contains("CveCompraDetalle") Then
|
||||
DtDatosDetalle.Columns.Add("CveCompraDetalle", GetType(Integer))
|
||||
DtDatosDetalle.AcceptChanges()
|
||||
End If
|
||||
Alert("Registro(s) Recuperados", TipoMensaje.ToastInformacion)
|
||||
End If
|
||||
CargaGVInv()
|
||||
@@ -1975,18 +2014,21 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
CvePSSerie = Argumentos(0).ToEntero
|
||||
CveUMSerie = Argumentos(1).ToEntero
|
||||
PUSerie = Argumentos(2).ToDecimal
|
||||
CveConsecSerie = Argumentos(5).ToEntero
|
||||
'CveConsecSerie = Argumentos(5).ToEntero
|
||||
CveCompraDetalle = Argumentos(6).ToEntero
|
||||
|
||||
CargaLote(1)
|
||||
End Sub
|
||||
Private Sub CargaLote(Tipo As Integer, Optional CerrarCompletado As Boolean = False)
|
||||
RegistraScript("$('#DivLote').modal();", "ModalLote")
|
||||
GvLote.Columns(2).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
GvLote.DataSource = DtDatosLoteDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie), "Consec DESC")
|
||||
'GvLote.DataSource = DtDatosLoteDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie), "Consec DESC")
|
||||
GvLote.DataSource = DtDatosLoteDetalle.FiltraParametros(String.Format("CveCompraDetalle = {0}", CveCompraDetalle), "Consec DESC")
|
||||
GvLote.DataBind()
|
||||
|
||||
'VALIDA QUE SIGA AGREGANDO
|
||||
If Not DtDatosLoteDetalle.SUM("Cantidad", String.Format("ConsecId = {0}", CveConsecSerie)) < LbLoteCantidad2.Text.ToDecimal Then
|
||||
'If Not DtDatosLoteDetalle.SUM("Cantidad", String.Format("ConsecId = {0}", CveConsecSerie)) < LbLoteCantidad2.Text.ToDecimal Then
|
||||
If Not DtDatosLoteDetalle.SUM("Cantidad", String.Format("CveCompraDetalle = {0}", CveCompraDetalle)) < LbLoteCantidad2.Text.ToDecimal Then
|
||||
BtnAddPSLote.Enabled = False
|
||||
If CerrarCompletado Then
|
||||
RegistraScript("$('#DivLote').modal('hide');")
|
||||
@@ -1999,7 +2041,9 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim Contador As Decimal = 0
|
||||
For Each Gvr As GridViewRow In GvInv.Rows
|
||||
If Gvr.DataKey("CvePS").ToEntero = CvePSSerie Then
|
||||
Contador = DtDatosLoteDetalle.SUMD("Cantidad", String.Format("ConsecId = {0}", Gvr.DataKey("Consec")))
|
||||
'Contador = DtDatosLoteDetalle.SUMD("Cantidad", String.Format("ConsecId = {0}", Gvr.DataKey("Consec")))
|
||||
Contador = DtDatosLoteDetalle.SUMD("Cantidad", String.Format("CveCompraDetalle = {0}", Gvr.DataKey("CveCompraDetalle")))
|
||||
|
||||
Gvr.FCCheckBox("cbInv").Enabled = False
|
||||
Gvr.FCTextBox("TbCantidadF").Enabled = False
|
||||
If DtDatosLoteDetalle IsNot Nothing AndAlso Contador > 0 Then
|
||||
@@ -2049,7 +2093,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim DtSeriesNuevas As New DataTable
|
||||
DtSeriesNuevas.Columns.Add("Serie", GetType(String))
|
||||
|
||||
DtDuplicado = DtDatosLoteDetalle.FiltraParametros($"ConsecId = {CveConsecSerie} AND Lote = '{Lote}' ")
|
||||
'DtDuplicado = DtDatosLoteDetalle.FiltraParametros($"ConsecId = {CveConsecSerie} AND Lote = '{Lote}' ")
|
||||
DtDuplicado = DtDatosLoteDetalle.FiltraParametros($"CveCompraDetalle = {CveCompraDetalle} AND Lote = '{Lote}' ")
|
||||
If DtDuplicado IsNot Nothing AndAlso DtDuplicado.Rows.Count > 0 Then
|
||||
Alert($"<br/> El numero de Lote <b>""{Lote}""</b> proporcionado ya se encuentra ingresado.", TipoMensaje.MsgAdvertencia)
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
@@ -2078,7 +2123,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
End If
|
||||
|
||||
Row("ConsecId") = CveConsecSerie
|
||||
'Row("ConsecId") = CveConsecSerie
|
||||
Row("CveCompraDetalle") = CveCompraDetalle
|
||||
Row("Consec") = DtDatosDetalle.Rows.Count + 1
|
||||
Row("Cantidad") = CantidadLote
|
||||
Row("CvePS") = CvePSSerie
|
||||
@@ -2716,8 +2762,12 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
PUExtranjero = DtInv.Rows(gvr.RowIndex)("PUExtranjero").ToString.ToDecimal
|
||||
|
||||
'SI FUE POR SERIE LOTE
|
||||
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec").ToEntero))
|
||||
DtDetalleLote = DtDatosLoteDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec").ToEntero))
|
||||
'DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec").ToEntero))
|
||||
'DtDetalleLote = DtDatosLoteDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec").ToEntero))
|
||||
|
||||
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("CveCompraDetalle = {0}", gvr.DataKey("CveCompraDetalle").ToEntero))
|
||||
DtDetalleLote = DtDatosLoteDetalle.FiltraParametros(String.Format("CveCompraDetalle = {0}", gvr.DataKey("CveCompraDetalle").ToEntero))
|
||||
|
||||
If DtDetalle.Rows.Count > 0 Then
|
||||
Dim ContDt As Integer = 0
|
||||
' por redondeo
|
||||
@@ -3655,7 +3705,9 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
ErrorMovInv = True
|
||||
End Try
|
||||
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
RenombrarBitacoras()
|
||||
End If
|
||||
|
||||
'FINAL
|
||||
If Not ErrorMovInv Then
|
||||
@@ -3759,6 +3811,26 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
If ObjContaAC IsNot Nothing Then ObjContaAC.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub RenombrarBitacoras()
|
||||
|
||||
|
||||
Dim fechaActual As String = DateTime.Now.ToString("yyyyMMddHHmmss")
|
||||
|
||||
Dim fib As New FileInfo(ArchivoBitacora)
|
||||
Dim fibd As New FileInfo(ArchivoBitacoraDetalle)
|
||||
|
||||
If fib.Exists() Then
|
||||
Dim nuevoNombre As String = Path.Combine(fib.DirectoryName, Path.GetFileNameWithoutExtension(fib.Name) & "_" & fechaActual & ".xml")
|
||||
fib.MoveTo(nuevoNombre)
|
||||
End If
|
||||
|
||||
If fibd.Exists() Then
|
||||
Dim nuevoNombreDetalle As String = Path.Combine(fibd.DirectoryName, Path.GetFileNameWithoutExtension(fibd.Name) & "_" & fechaActual & ".xml")
|
||||
fibd.MoveTo(nuevoNombreDetalle)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function GenerarMovimientoAlmacenVenta(CveAlmacen As Integer, CveConceptoAlmacen As Integer, CveVenta As Integer, CveMovimientoRelacionado As Integer, DtDetalle As DataTable, ObjInventario As ClsInventarios, ObjConta As ClsContabilidad, EsContabilizable As Boolean, Modulo As String) As MMovimientoAlmacen
|
||||
Dim ErrorMovInv As Boolean = False
|
||||
Dim Retorno As New MMovimientoAlmacen
|
||||
@@ -4816,7 +4888,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Alert("El nombre de la segunda columna debe ser 'Codigo'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
If Not dt.Columns(2).ColumnName = "Producto" Then
|
||||
If Not (dt.Columns(2).ColumnName = "Producto" Or dt.Columns(2).ColumnName = "Producto/Servicio") Then
|
||||
Alert("El nombre de la tercera columna debe ser 'Producto'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
@@ -4851,7 +4923,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim CveProducto As Integer = RowPS("CvePS").ToString().ToEntero()
|
||||
Dim CveUnidadMedida As Integer = RowPS("CveUM").ToString().ToEntero()
|
||||
CvePSSerie = CveProducto
|
||||
CveConsecSerie = DtInv.FiltroPrimeroValor("Consec", "CvePS=" & CvePSSerie).ToEntero
|
||||
'CveConsecSerie = DtInv.FiltroPrimeroValor("Consec", "CvePS=" & CvePSSerie).ToEntero
|
||||
CveCompraDetalle = DtInv.FiltroPrimeroValor("CveCompraDetalle", "CvePS=" & CvePSSerie).ToEntero
|
||||
|
||||
Dim Cantidad As Double = RowExcel("Cantidad").ToString().ToDecimal()
|
||||
Dim Serie As String = RowExcel("Serie").ToString()
|
||||
@@ -4875,7 +4948,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
|
||||
If Valido Then
|
||||
CveConsecSerie = RowPS("Consec").ToString.ToEntero
|
||||
'CveConsecSerie = RowPS("Consec").ToString.ToEntero
|
||||
CveCompraDetalle = RowPS("CveCompraDetalle").ToString.ToEntero
|
||||
AgregaSerie(RowExcel("Serie").ToString, 1, False)
|
||||
|
||||
'AgregarPS(Cantidad, CveProducto, CveUnidadMedida, Observaciones, CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(Not String.IsNullOrEmpty(Serie), Serie, ""), Lote:=Lote, FechaCaducidad:=FechaCaducidad, Limpia:=False)
|
||||
@@ -4887,7 +4961,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
Else
|
||||
RowsNoCargados = RowsNoCargados + 1
|
||||
ProductosNoCargados.AppendFormat("{0},", RowExcel("Producto").ToString())
|
||||
ProductosNoCargados.AppendFormat("{0},", RowExcel("Producto/Servicio").ToString())
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
@@ -4896,12 +4970,20 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Finally
|
||||
|
||||
Dim MensajeFinal As New StringBuilder()
|
||||
|
||||
If RowsNoCargados = 0 AndAlso RowsCargados > 0 Then
|
||||
MensajeFinal.Append("Los productos se cargaron correctamente. <br/><br/>")
|
||||
End If
|
||||
|
||||
If RowsCargados > 0 Then
|
||||
MensajeFinal.Append("Se cargaron <b>" & RowsCargados & "</b> productos correctamente.")
|
||||
|
||||
TxtExcel.Text = "[]"
|
||||
UpConcepto.Update()
|
||||
RegistraScript("$('#DivCargaExcel').modal('hide');")
|
||||
|
||||
End If
|
||||
|
||||
If RowsNoCargados > 0 Then
|
||||
MensajeFinal.Append("No se pudieron cargar <b>" & RowsNoCargados & "</b> productos. <br/>Los siguientes productos no se pudieron cargar: " & ProductosNoCargados.ToString())
|
||||
End If
|
||||
@@ -4922,32 +5004,67 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End Sub
|
||||
|
||||
Public Sub DescargarFormato()
|
||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\Formatos\FormatoRecepcionAlmacen.xlsx"
|
||||
Dim dtt As New DataTable
|
||||
dtt = DtInv.Copy()
|
||||
dtt.Columns.Remove("Cantidad")
|
||||
dtt.Columns("CantidadF").ColumnName = "Cantidad"
|
||||
dtt.Columns("PS").ColumnName = "Producto"
|
||||
dtt.Columns("Codigo").ColumnName = "Código"
|
||||
Dim PathArchivo As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\Formatos\FormatoRecepcionAlmacen.xlsx"
|
||||
|
||||
Dim existingcol As New List(Of String) '= {"Cantidad", "Producto", "Código"}
|
||||
If System.IO.File.Exists(PathArchivo) Then
|
||||
|
||||
For Each col As DataColumn In dtt.Columns
|
||||
If Not col.ColumnName.Contiene("Cantidad", "Producto", "Código") Then
|
||||
existingcol.Add(col.ColumnName)
|
||||
End If
|
||||
Next
|
||||
Response.Clear()
|
||||
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
||||
Response.AddHeader("Content-Disposition", "attachment; filename=FormatoRecepcionAlmacen.xlsx")
|
||||
Response.TransmitFile(Directorio)
|
||||
Response.End()
|
||||
|
||||
For Each colName As String In existingcol
|
||||
dtt.Columns.Remove(colName)
|
||||
Next
|
||||
End If
|
||||
|
||||
dtt.Columns("Cantidad").SetOrdinal(0)
|
||||
dtt.Columns("Código").SetOrdinal(1)
|
||||
dtt.Columns("Producto").SetOrdinal(2)
|
||||
|
||||
dtt.Columns.Add("Serie", GetType(String))
|
||||
dtt.ExportToExcel("FormatoRecepcionAlmacen.xlsx")
|
||||
'Dim dtt As New DataTable
|
||||
'dtt = DtInv.Copy()
|
||||
|
||||
'If dtt.Columns.Contains("Cantidad") Then
|
||||
' dtt.Columns.Remove("Cantidad")
|
||||
'End If
|
||||
|
||||
'If dtt.Columns.Contains("CantidadF") Then
|
||||
' dtt.Columns("CantidadF").ColumnName = "Cantidad"
|
||||
'End If
|
||||
|
||||
'If dtt.Columns.Contains("PS") Then
|
||||
' dtt.Columns("PS").ColumnName = "Producto"
|
||||
'End If
|
||||
|
||||
'If dtt.Columns.Contains("Codigo") Then
|
||||
' dtt.Columns("Codigo").ColumnName = "Código"
|
||||
'End If
|
||||
|
||||
|
||||
'Dim existingcol As New List(Of String) '= {"Cantidad", "Producto", "Código"}
|
||||
|
||||
'For Each col As DataColumn In dtt.Columns
|
||||
' If Not col.ColumnName.Contiene("Cantidad", "Producto", "Código") Then
|
||||
' existingcol.Add(col.ColumnName)
|
||||
' End If
|
||||
'Next
|
||||
|
||||
'For Each colName As String In existingcol
|
||||
' dtt.Columns.Remove(colName)
|
||||
'Next
|
||||
|
||||
'Try
|
||||
' dtt.Columns("Cantidad").SetOrdinal(0)
|
||||
' dtt.Columns("Código").SetOrdinal(1)
|
||||
' dtt.Columns("Producto").SetOrdinal(2)
|
||||
'Catch ex As Exception
|
||||
|
||||
'End Try
|
||||
|
||||
|
||||
'If Not dtt.Columns.Contains("PS") Then
|
||||
' dtt.Columns.Add("Serie", GetType(String))
|
||||
'End If
|
||||
|
||||
|
||||
|
||||
'dtt.ExportToExcel("FormatoRecepcionAlmacen.xlsx")
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -4957,7 +5074,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
'Create a DataTable.
|
||||
Dim dt As New DataTable()
|
||||
|
||||
dt.Columns.AddRange(New DataColumn(9) {New DataColumn("CodBarra", GetType(String)),
|
||||
dt.Columns.AddRange(New DataColumn(10) {New DataColumn("CodBarra", GetType(String)),
|
||||
New DataColumn("OVenta", GetType(String)),
|
||||
New DataColumn("Factura", GetType(String)),
|
||||
New DataColumn("FechaFac", GetType(String)),
|
||||
@@ -4966,7 +5083,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
New DataColumn("Producto", GetType(String)),
|
||||
New DataColumn("Serie", GetType(String)),'CodigoUnico
|
||||
New DataColumn("Cantidad", GetType(Integer)),
|
||||
New DataColumn("Código", GetType(String))})
|
||||
New DataColumn("Código", GetType(String)),
|
||||
New DataColumn("CveCompraDetalle", GetType(Integer))})
|
||||
FolioFactura = FolioFactura.Replace("-", "")
|
||||
|
||||
'Read the contents of CSV file.
|
||||
@@ -5049,5 +5167,10 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End Class
|
||||
|
||||
|
||||
Protected Sub LnkAgregarExcel_Click(sender As Object, e As EventArgs)
|
||||
TxtExcel.Text = "[]"
|
||||
UpConcepto.Update()
|
||||
RegistraScript("$('#DivCargaExcel').modal('show');")
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -56,6 +56,9 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server">Ver Grafica</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkModalPorcentajes" OnClick="LnkModalPorcentajes_Click" runat="server" Visible="false"><i class="fa fa-list" aria-hidden="true"></i> Consultar porcentajes</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<li>
|
||||
@@ -275,6 +278,106 @@
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="DivModalPorcetajes" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UpModalPorcentajes" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content" style="width:700px!important">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="LblModalTituloPorcentajes" runat="server" ClientIDMode="Static" Text="">Consulta Porcentajes</asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;">
|
||||
<label for="<%= TxtModalFechaInicio.ClientID.ToString()%>" style="color: #888888;">Fecha Inicio: </label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtModalFechaInicio" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkTxtModalFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="METxtModalFechaInicio" runat="server" TargetControlID="TxtModalFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CETxtModalFechaInicio" TargetControlID="TxtModalFechaInicio" PopupButtonID="LnkTxtModalFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtModalFechaInicio" CssClass="help-block errorimput" runat="server" ControlToValidate="TxtModalFechaInicio" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalPorcentaje"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;">
|
||||
<label for="<%= TxtModalFechaFin.ClientID.ToString()%>" style="color: #888888;">Fecha Fin: </label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtModalFechaFin" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkTxtModalFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="METxtModalFechaFin" runat="server" TargetControlID="TxtModalFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CETxtModalFechaFin" TargetControlID="TxtModalFechaFin" PopupButtonID="LnkTxtModalFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RfvLnkTxtModalFechaFin" CssClass="help-block errorimput" runat="server" ControlToValidate="TxtModalFechaFin" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalPorcentaje"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtModalPorcentaje" runat="server" CausesValidation="true" CssClass="form-control" MaxLength="13" Text="5" Enabled="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtModalPorcentaje" CssClass="help-block errorimput" runat="server" ControlToValidate="TxtModalPorcentaje" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Porcentaje''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalPorcentaje"></asp:RequiredFieldValidator>
|
||||
<ajax:FilteredTextBoxExtender ID="FIETTxtModalPorcentaje" TargetControlID="TxtModalPorcentaje" FilterType="Numbers,Custom" ValidChars="-" runat="server" />
|
||||
<label for="<%= TxtModalPorcentaje.ClientID.ToString()%>">Porcentaje Menor a:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:Button runat="server" ID="BtnModalConsultaPorcentaje" CssClass="btn btn-primary" Text="Consultar" CausesValidation="true" ValidationGroup="GrpModalPorcentaje" OnClick="BtnModalConsultaPorcentaje_Click" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="height:10px!important"></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvPorcentajes" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas Utilidad con los filtros especificados"
|
||||
CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None" OnRowDataBound="GvPorcentajes_RowDataBound" >
|
||||
<Columns>
|
||||
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Left" HeaderText="SubProyecto" DataField="SubProyecto" ItemStyle-Width="200px" />
|
||||
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Center" HeaderText="Serie Folio" DataTextField="SerieFolio" DataTextFormatString="{0}" Target="_blank"
|
||||
DataNavigateUrlFields="CveVenta"
|
||||
DataNavigateUrlFormatString="Ventas.aspx?CveVenta={0}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Center" HeaderText="Fecha" DataField="FechaVenta" DataFormatString="{0:d}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:N}" ItemStyle-Width="100px" />
|
||||
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Costo" DataField="Costo" DataFormatString="{0:N}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="% Neto" DataField="PorNeto" DataFormatString="{0:N}" ItemStyle-Width="100px" />
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div id="DivModalGrafica" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UPModalProd" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -288,18 +391,20 @@
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
|
||||
<label class="col-md-1 truncate">Ver:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlVer" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlVer_SelectedIndexChanged" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Neto" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Rentabilidad" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Ver:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlVer" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlVer_SelectedIndexChanged" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Neto" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Rentabilidad" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<br />
|
||||
|
||||
<br />
|
||||
<div id="chartdiv"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
@@ -307,6 +412,10 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
||||
|
||||
@@ -32,19 +32,37 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
'If UsuarioActual.Empresa.Funcionalidad(382) <> "1" Then
|
||||
' GvDatos.Columns(3).Visible = False
|
||||
' GvDatos.Columns(5).Visible = False
|
||||
'End If
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
LnkModalPorcentajes.Visible = True
|
||||
End If
|
||||
|
||||
CargaCombos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Property SubProyectoConf As String
|
||||
Get
|
||||
If ViewState("SubProyectoConf") Is Nothing Then
|
||||
ViewState("SubProyectoConf") = ""
|
||||
End If
|
||||
Return ViewState("SubProyectoConf").ToString
|
||||
End Get
|
||||
|
||||
Set(value As String)
|
||||
ViewState("SubProyectoConf") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " INICIALIZA VALORES "
|
||||
Private Sub CargaCombos()
|
||||
|
||||
TxtModalFechaInicio.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||
TxtModalFechaFin.Text = NowADS().LastDayOfMonth.ToShortDateString
|
||||
|
||||
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString
|
||||
|
||||
@@ -108,6 +126,12 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
|
||||
LblNeto.Text = "0"
|
||||
LblPorNeto.Text = "0"
|
||||
|
||||
|
||||
Dim LblSubProyectoConf As New Label
|
||||
CargarCentrosDeCosto(Nothing, Nothing, Nothing, LblSubProyectoConf)
|
||||
SubProyectoConf = LblSubProyectoConf.Text
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlCategoria_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
@@ -315,4 +339,42 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub LnkModalPorcentajes_Click(sender As Object, e As EventArgs)
|
||||
|
||||
GvPorcentajes.DataSource = Nothing
|
||||
GvPorcentajes.DataBind()
|
||||
UpModalPorcentajes.Update()
|
||||
RegistraScript("$('#DivModalPorcetajes').modal(`show`);")
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnModalConsultaPorcentaje_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
Dim FechaI As Date = TxtModalFechaInicio.Text.ToDate
|
||||
Dim FechaF As Date = TxtModalFechaFin.Text.ToDate
|
||||
If TxtModalFechaInicio.Text = "" Then FechaI = MinFecha
|
||||
If TxtModalFechaFin.Text = "" Then FechaF = MaxFecha
|
||||
|
||||
If ObjVentas.GetReporteVentasUtilidad("-1", -1, "-1", FechaI, FechaF, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1) Then
|
||||
GvPorcentajes.DataSource = ObjVentas.DtResultados.FiltraParametros($" CveVenta > 0 AND PorNeto <= {TxtModalPorcentaje.Text.ToDecimal} AND TipoDocto = 'Ing' AND CveEstatusFactura IN(2,3) ")
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
GvPorcentajes.DataBind()
|
||||
|
||||
ObjVentas.Dispose()
|
||||
UpModalPorcentajes.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvPorcentajes_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
e.Row.Cells(0).Text = SubProyectoConf
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user