OC Es Temporal, PS Actualziar Utimo Costo
This commit is contained in:
@@ -1675,7 +1675,7 @@ Public Class ClsOC
|
|||||||
CveEmpresa As Integer, CvePS As Integer, Optional PendientePorSurtir As Boolean = False, Optional CveCliente As Integer = -1, Optional Guia As String = "-1",
|
CveEmpresa As Integer, CvePS As Integer, Optional PendientePorSurtir As Boolean = False, Optional CveCliente As Integer = -1, Optional Guia As String = "-1",
|
||||||
Optional CveActivoFijo As Integer = -1, Optional SoloSubProyectosConPermiso As Boolean = False, Optional CveUsuarioAutorizo As Integer = -1,
|
Optional CveActivoFijo As Integer = -1, Optional SoloSubProyectosConPermiso As Boolean = False, Optional CveUsuarioAutorizo As Integer = -1,
|
||||||
Optional CveUsuarioAsignado As Integer = -1, Optional EntregaDirecta As Integer = -1, Optional TopSelect As Integer = 10000, Optional CveMoneda As Integer = -1,
|
Optional CveUsuarioAsignado As Integer = -1, Optional EntregaDirecta As Integer = -1, Optional TopSelect As Integer = 10000, Optional CveMoneda As Integer = -1,
|
||||||
Optional MetodoPago As Integer = -1, Optional Serie As String = "-1", Optional TieneAnticipo As Integer = -1) As Boolean
|
Optional MetodoPago As Integer = -1, Optional Serie As String = "-1", Optional TieneAnticipo As Integer = -1, Optional EsTemporal As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_OC_OrdenesCompraRep")
|
DataAdapter("PA_OC_OrdenesCompraRep")
|
||||||
@@ -1708,6 +1708,8 @@ Public Class ClsOC
|
|||||||
.Add("@MetodoPago", SqlDbType.Int).Value = MetodoPago
|
.Add("@MetodoPago", SqlDbType.Int).Value = MetodoPago
|
||||||
.Add("@Serie", SqlDbType.VarChar).Value = Serie
|
.Add("@Serie", SqlDbType.VarChar).Value = Serie
|
||||||
.Add("@TieneAnticipo", SqlDbType.Int).Value = TieneAnticipo
|
.Add("@TieneAnticipo", SqlDbType.Int).Value = TieneAnticipo
|
||||||
|
.Add("@EsTemporal", SqlDbType.Int).Value = EsTemporal
|
||||||
|
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
@@ -1846,7 +1848,8 @@ Public Class ClsOC
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetOrdenesPendientes(pTipo As String, pTipoBusqueda As Integer, pCveEmpresa As Integer, pCveProyecto As Integer, pCveSubProyecto As Integer, pCveEstatusCompra As Integer,
|
Public Function GetOrdenesPendientes(pTipo As String, pTipoBusqueda As Integer, pCveEmpresa As Integer, pCveProyecto As Integer, pCveSubProyecto As Integer, pCveEstatusCompra As Integer,
|
||||||
pCveUsuario As Integer, CveCliente As Integer, Optional SoloSubProyectosConPermiso As Boolean = False, Optional CveUsuarioAsignado As Integer = -1, Optional EntregaDirecta As Integer = -1) As Boolean
|
pCveUsuario As Integer, CveCliente As Integer, Optional SoloSubProyectosConPermiso As Boolean = False, Optional CveUsuarioAsignado As Integer = -1, Optional EntregaDirecta As Integer = -1,
|
||||||
|
Optional TieneAnticipo As Integer = -1, Optional EsTemporal As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_OC_OrdenesCompraPendientes")
|
DataAdapter("PA_OC_OrdenesCompraPendientes")
|
||||||
@@ -1863,6 +1866,8 @@ Public Class ClsOC
|
|||||||
.Add("@SoloSubProyectosConPermiso", SqlDbType.Bit).Value = SoloSubProyectosConPermiso
|
.Add("@SoloSubProyectosConPermiso", SqlDbType.Bit).Value = SoloSubProyectosConPermiso
|
||||||
.Add("@CveUsuarioAsignado", SqlDbType.Int).Value = CveUsuarioAsignado
|
.Add("@CveUsuarioAsignado", SqlDbType.Int).Value = CveUsuarioAsignado
|
||||||
.Add("@EntregaDirecta", SqlDbType.Int).Value = EntregaDirecta
|
.Add("@EntregaDirecta", SqlDbType.Int).Value = EntregaDirecta
|
||||||
|
.Add("@TieneAnticipo", SqlDbType.Int).Value = TieneAnticipo
|
||||||
|
.Add("@EsTemporal", SqlDbType.Int).Value = EsTemporal
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -2545,6 +2545,29 @@ Public Class ClsProductosServicios
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Public Function UpdateUltimoCosto(CvePS As Integer, UltimoCosto As Decimal, CveUsuarioModifico As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_ProductosServiciosUpdateUltimoCostoUpdate")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
|
.Add("@UltimoCosto", SqlDbType.Money).Value = UltimoCosto
|
||||||
|
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al actualizar el ultimo Costo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
#Region " P S C O M P L E M E N T O S"
|
#Region " P S C O M P L E M E N T O S"
|
||||||
|
|
||||||
Public Function GetProductosServiciosComplementos(CvePS As Integer) As Boolean
|
Public Function GetProductosServiciosComplementos(CvePS As Integer) As Boolean
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:HyperLink ID="ImgDownPDF" runat="server" Visible="false" Target="_blank"><i class="fa fa-ad-pdf"></i> Imprimir PDF</asp:HyperLink>
|
<asp:HyperLink ID="ImgDownPDF" runat="server" Visible="false" Target="_blank"><i class="fa fa-ad-pdf"></i> Imprimir PDF</asp:HyperLink>
|
||||||
|
<asp:LinkButton ID="LnkGenrarPDF" runat="server" OnClick="LnkGenrarPDF_Click" Visible="false"><i class="fa fa-ad-pdf"></i>Generar PDF PDF</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:HyperLink ID="ImgImprimirAlmacen" Target="_blank" Visible="False" CssClass="Texto" runat="server"><i class="fa fa-truck"></i> Ver Almacen</asp:HyperLink>
|
<asp:HyperLink ID="ImgImprimirAlmacen" Target="_blank" Visible="False" CssClass="Texto" runat="server"><i class="fa fa-truck"></i> Ver Almacen</asp:HyperLink>
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ Imports MoreLinq
|
|||||||
Imports System.Data.SqlClient
|
Imports System.Data.SqlClient
|
||||||
Imports ClsPaginas
|
Imports ClsPaginas
|
||||||
Imports Microsoft.Owin.Security.Provider
|
Imports Microsoft.Owin.Security.Provider
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
Partial Class Compras_Compras
|
Partial Class Compras_Compras
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -794,6 +795,35 @@ Partial Class Compras_Compras
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Private Property ProveedorDireccion As String
|
||||||
|
Get
|
||||||
|
Return IfNull(ViewState("ProveedorDireccion"), "").ToString
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("ProveedorDireccion") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Private Property ProveedorCodigoRegimenFiscal As String
|
||||||
|
Get
|
||||||
|
Return IfNull(ViewState("ProveedorCodigoRegimenFiscal"), "").ToString
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("ProveedorCodigoRegimenFiscal") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Property ProveedorCP As String
|
||||||
|
Get
|
||||||
|
Return IfNull(ViewState("ProveedorCP"), "").ToString
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("ProveedorCP") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private Property CveRegimenFiscalProveedor As Integer
|
Private Property CveRegimenFiscalProveedor As Integer
|
||||||
Get
|
Get
|
||||||
Return IfNull(ViewState("CveRegimenFiscalProveedor"), -1).ToString.ToEntero
|
Return IfNull(ViewState("CveRegimenFiscalProveedor"), -1).ToString.ToEntero
|
||||||
@@ -2860,6 +2890,8 @@ Partial Class Compras_Compras
|
|||||||
If dr("CveFactura").ToString.ToEntero > 0 Then
|
If dr("CveFactura").ToString.ToEntero > 0 Then
|
||||||
ImgDownXML.Visible = True : ImgDownXML.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=Fact&EXT=xml&CveFactura={0}&RFC={1}", dr("CveFactura"), dr("RFC").ToString.Replace("&", "%26%"))))
|
ImgDownXML.Visible = True : ImgDownXML.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=Fact&EXT=xml&CveFactura={0}&RFC={1}", dr("CveFactura"), dr("RFC").ToString.Replace("&", "%26%"))))
|
||||||
ImgDownPDF.Visible = True : ImgDownPDF.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=Fact&EXT=pdf&CveFactura={0}&RFC={1}", dr("CveFactura"), dr("RFC").ToString.Replace("&", "%26%"))))
|
ImgDownPDF.Visible = True : ImgDownPDF.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=Fact&EXT=pdf&CveFactura={0}&RFC={1}", dr("CveFactura"), dr("RFC").ToString.Replace("&", "%26%"))))
|
||||||
|
Else
|
||||||
|
LnkGenrarPDF.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
TxtRembolsoNumero.Enabled = If(IdPoliza > 0, False, True)
|
TxtRembolsoNumero.Enabled = If(IdPoliza > 0, False, True)
|
||||||
@@ -3503,6 +3535,10 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
If RecargaCombo Then DdlProveedor.DataSource = ObjProveedor.DtResultados : DdlProveedor.DataBind()
|
If RecargaCombo Then DdlProveedor.DataSource = ObjProveedor.DtResultados : DdlProveedor.DataBind()
|
||||||
|
|
||||||
|
ProveedorDireccion = ObjProveedor.Direccion
|
||||||
|
ProveedorCP = ObjProveedor.CP.ToString
|
||||||
|
ProveedorCodigoRegimenFiscal = ObjProveedor.DtResultados.Rows(0)("CodigoRegimenFiscal").ToString
|
||||||
|
|
||||||
ChkConsignacion.Enabled = True
|
ChkConsignacion.Enabled = True
|
||||||
|
|
||||||
'MONEDA PREFERENTE
|
'MONEDA PREFERENTE
|
||||||
@@ -17412,6 +17448,7 @@ Partial Class Compras_Compras
|
|||||||
TxtRetIVAModal.Enabled = True
|
TxtRetIVAModal.Enabled = True
|
||||||
TxtRetISRModal.Enabled = True
|
TxtRetISRModal.Enabled = True
|
||||||
TxtIEPSModal.Enabled = True
|
TxtIEPSModal.Enabled = True
|
||||||
|
UpPSS.Update()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -17432,6 +17469,12 @@ Partial Class Compras_Compras
|
|||||||
divImporteImportacion.Visible = False
|
divImporteImportacion.Visible = False
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If TxtRetISR.Text.ToDecimal > 0 And CveCompra <= 0 And CveFactura > 0 Then
|
||||||
|
TxtRetISRModal.Enabled = True
|
||||||
|
UpPSS.Update()
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub LimpiaAgregar()
|
Private Sub LimpiaAgregar()
|
||||||
|
|
||||||
@@ -17492,10 +17535,9 @@ Partial Class Compras_Compras
|
|||||||
End Sub
|
End Sub
|
||||||
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Con = GvRow.DataKey("Consec").ToEntero
|
Con = GvRow.DataKey("Consec").ToEntero
|
||||||
Index = Con
|
Index = Con
|
||||||
|
|
||||||
@@ -21940,6 +21982,139 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub LnkGenrarPDF_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
Dim tmpFolio As String = If(TxtSerie.Text.Trim.Length > 0, $"{TxtSerie.Text}-{TxtFolio.Text}", TxtFolio.Text)
|
||||||
|
|
||||||
|
GeneraPDFNew($"{CveCompra.ToString}.pdf", "", TxtSubTotal.Text, TxtDescuento.Text, TxtTotal.Text, TxtIVA.Text, DdlMoneda.SelectedItem.Text, "", "", MinFecha, "", New DataTable, "",
|
||||||
|
"", "", tmpFolio, TipoComprobante, "", UsuarioActual.Empresa.RFC, UsuarioActual.Empresa.Empresa, ProveedorDireccion, "", "", "", ProveedorCP, "", "", ProveedorCodigoRegimenFiscal, "", LblMetodoPago.Text,
|
||||||
|
"", TxtFecha.Text.ToDate, "", "", "", "", "", "", "", HplProveedor.Text, RFCProveedor)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub GeneraPDFNew(NombreArchivo As String, FolioFiscal As String, SubTotal As String, Descuento As String, Total As String, IVA As String,
|
||||||
|
Moneda As String, FormaDePago As String, NoSerieCertificado As String, FechaCertificacion As DateTime, NoSerieCertificadoContribuyente As String, DTConceptos As DataTable,
|
||||||
|
SelloCFDi As String, SelloSAT As String, CBB As String, Folio As String, TipodeComprobante As String, CadenaOriginalCFD As String,
|
||||||
|
RFC As String, Cliente As String, Direccion As String, Colonia As String, NoExt As String, NoInt As String,
|
||||||
|
CP As String, Ciudad As String, Estado As String, Regimen As String, CondicionPago As String, MetodoPago As String,
|
||||||
|
NumCtaPago As String, fecha As System.DateTime, DomFisCalle As String, DomFisNoExt As String, DomFisCol As String, DomFisCP As String, DomFisMun As String,
|
||||||
|
DomFisEst As String, DomFisPais As String, EmiNombre As String, EmiRFC As String)
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
Dim CadenaOriginal As String = (Convert.ToString((Convert.ToString((Convert.ToString("||1.0|") & FolioFiscal) + "|" + FechaCertificacion.ToString("yyyy-MM-dd") + "T" + FechaCertificacion.ToString("HH:mm:ss") + "|") & SelloCFDi) + "|") & NoSerieCertificado) + "||"
|
||||||
|
Dim RutaFormato As String = String.Format("{0}Empresas\Grales\Formatos\CFDI.rdlc", ModExtensiones.DirectorioBaseEmpresas)
|
||||||
|
'Dim ArchivoTempXLS As String = String.Format("{0}\GenSis{1}-{2}", Path.GetDirectoryName(ArchivoBaseXLS), NowADS().Ticks, Path.GetFileName(ArchivoBaseXLS))
|
||||||
|
|
||||||
|
Dim Fiscal As String = String.Format("Domicilio Fiscal {0}{1} {2}{0}Col.{3}{0}CP. {4} {5},{6},{7}", vbCr, DomFisCalle, DomFisNoExt, DomFisCol, DomFisCP,
|
||||||
|
DomFisMun, DomFisEst, DomFisPais)
|
||||||
|
Try
|
||||||
|
Dim parametros As New List(Of ReportParameter)()
|
||||||
|
'params.Add(New ReportParameter("ArchivoBaseXLS", ArchivoBaseXLS))
|
||||||
|
'params.Add(New ReportParameter("TmpArchivoPDF", TmpArchivoPDF))
|
||||||
|
parametros.Add(New ReportParameter("FolioFiscal", FolioFiscal))
|
||||||
|
parametros.Add(New ReportParameter("SubTotal", SubTotal.FormatoNumero()))
|
||||||
|
parametros.Add(New ReportParameter("Descuento", Descuento.FormatoNumero()))
|
||||||
|
parametros.Add(New ReportParameter("Total", Total.FormatoNumero()))
|
||||||
|
parametros.Add(New ReportParameter("IVA", IVA.FormatoNumero()))
|
||||||
|
parametros.Add(New ReportParameter("Moneda", Moneda))
|
||||||
|
parametros.Add(New ReportParameter("FormaDePago", FormaDePago))
|
||||||
|
parametros.Add(New ReportParameter("NoSerieCertificado", NoSerieCertificado))
|
||||||
|
parametros.Add(New ReportParameter("FechaCertificacion", FechaCertificacion.ToString("yyyy-MM-dd") + "T" + FechaCertificacion.ToString("HH:mm:ss")))
|
||||||
|
parametros.Add(New ReportParameter("NoSerieCertificadoContribuyente", NoSerieCertificadoContribuyente))
|
||||||
|
parametros.Add(New ReportParameter("SelloCFDi", SelloCFDi))
|
||||||
|
parametros.Add(New ReportParameter("SelloSAT", SelloSAT))
|
||||||
|
parametros.Add(New ReportParameter("CBB", String.Format("file:///{0}", CBB)))
|
||||||
|
parametros.Add(New ReportParameter("Folio", Folio))
|
||||||
|
parametros.Add(New ReportParameter("TipodeComprobante", TipodeComprobante.ToUpper()))
|
||||||
|
parametros.Add(New ReportParameter("CadenaOriginalCFD", CadenaOriginalCFD))
|
||||||
|
parametros.Add(New ReportParameter("RFC", RFC))
|
||||||
|
parametros.Add(New ReportParameter("Cliente", Cliente))
|
||||||
|
parametros.Add(New ReportParameter("Direccion", Direccion))
|
||||||
|
parametros.Add(New ReportParameter("Colonia", Colonia))
|
||||||
|
parametros.Add(New ReportParameter("NoExt", NoExt))
|
||||||
|
parametros.Add(New ReportParameter("NoInt", NoInt))
|
||||||
|
parametros.Add(New ReportParameter("CP", CP))
|
||||||
|
parametros.Add(New ReportParameter("Ciudad", Ciudad))
|
||||||
|
parametros.Add(New ReportParameter("Estado", Estado))
|
||||||
|
parametros.Add(New ReportParameter("Regimen", Regimen))
|
||||||
|
parametros.Add(New ReportParameter("CondicionPago", CondicionPago))
|
||||||
|
parametros.Add(New ReportParameter("MetodoPago", MetodoPago))
|
||||||
|
parametros.Add(New ReportParameter("NumCtaPago", NumCtaPago))
|
||||||
|
parametros.Add(New ReportParameter("fecha", fecha.ToString("yyyy-MM-dd") + "T" + fecha.ToString("HH:mm:ss")))
|
||||||
|
parametros.Add(New ReportParameter("Fiscal", Fiscal))
|
||||||
|
parametros.Add(New ReportParameter("EmiNombre", EmiNombre))
|
||||||
|
parametros.Add(New ReportParameter("EmiRFC", EmiRFC))
|
||||||
|
parametros.Add(New ReportParameter("NoSerieCertificado", NoSerieCertificado))
|
||||||
|
parametros.Add(New ReportParameter("TotalLetra", Total.ToDecimal.Texto2Letras(CveMoneda:=If(Moneda = "MXN", 1, If(Moneda = "USD", 2, 3)))))
|
||||||
|
parametros.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||||
|
|
||||||
|
'params.Add(New ReportParameter("DTConceptos", DTConceptos))
|
||||||
|
|
||||||
|
Dim rds As New ReportDataSource()
|
||||||
|
rds.Name = "DsOC"
|
||||||
|
rds.Value = DTConceptos
|
||||||
|
Dim Archivo As New System.IO.FileInfo(RutaFormato)
|
||||||
|
|
||||||
|
If Archivo.Exists Then
|
||||||
|
'Dim MR As New ReportViewer()
|
||||||
|
'MR.LocalReport.DataSources.Add(rds)
|
||||||
|
'MR.LocalReport.ReportPath = RutaFormato
|
||||||
|
'MR.ProcessingMode = ProcessingMode.Local
|
||||||
|
'MR.LocalReport.EnableExternalImages = True
|
||||||
|
'MR.LocalReport.SetParameters(parametros)
|
||||||
|
'MR.LocalReport.Refresh()
|
||||||
|
|
||||||
|
|
||||||
|
'Dim warnings As Warning() = Nothing
|
||||||
|
'Dim streamids As String() = Nothing
|
||||||
|
'Dim mimeType As String = Nothing
|
||||||
|
'Dim encoding As String = Nothing
|
||||||
|
'Dim extension As String = Nothing
|
||||||
|
'Dim bytes As Byte() = Nothing
|
||||||
|
'bytes = MR.LocalReport.Render("PDF", Nothing, mimeType, encoding, extension, streamids,
|
||||||
|
'warnings)
|
||||||
|
|
||||||
|
'Using fs As New FileStream(NombreArchivo, FileMode.Create)
|
||||||
|
' fs.Write(bytes, 0, bytes.Length)
|
||||||
|
' fs.Close()
|
||||||
|
'End Using
|
||||||
|
|
||||||
|
Dim MR As New ReportViewer()
|
||||||
|
MR.LocalReport.DataSources.Add(rds)
|
||||||
|
MR.LocalReport.ReportPath = RutaFormato
|
||||||
|
MR.ProcessingMode = ProcessingMode.Local
|
||||||
|
MR.LocalReport.EnableExternalImages = True
|
||||||
|
MR.LocalReport.SetParameters(parametros)
|
||||||
|
MR.LocalReport.Refresh()
|
||||||
|
|
||||||
|
Dim warnings As Warning() = Nothing
|
||||||
|
Dim streamids As String() = Nothing
|
||||||
|
Dim mimeType As String = Nothing
|
||||||
|
Dim encoding As String = Nothing
|
||||||
|
Dim extension As String = Nothing
|
||||||
|
|
||||||
|
Dim bytes As Byte() = MR.LocalReport.Render("PDF", Nothing, mimeType, encoding, extension, streamids, warnings)
|
||||||
|
|
||||||
|
' En lugar de guardarlo en el servidor, se envía directamente al navegador
|
||||||
|
Response.Clear()
|
||||||
|
Response.ContentType = "application/pdf"
|
||||||
|
Response.AddHeader("content-disposition", "attachment; filename=" & NombreArchivo & ".pdf")
|
||||||
|
Response.BinaryWrite(bytes)
|
||||||
|
Response.End()
|
||||||
|
|
||||||
|
Retorno = True
|
||||||
|
Else
|
||||||
|
ModExtensiones.GuardaLog(String.Format("No existe formato Base"))
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
ModExtensiones.GuardaLog(String.Format("Ocurrio un Error al generar el reporte RLDC"))
|
||||||
|
Retorno = False
|
||||||
|
End Try
|
||||||
|
|
||||||
|
'Return Retorno
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
10
OC/OC.aspx
10
OC/OC.aspx
@@ -511,8 +511,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr id="TrBotonesInvTemporal" runat="server" visible="false">
|
<tr id="TrBotonesInvTemporal" runat="server" visible="false">
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><asp:Button runat="server" ID="BtnInvTempEntrada" Text="Entrada" CssClass="btn btn-primary" OnClick="BtnInvTempEntrada_Click" /> </td>
|
<td><asp:Button runat="server" ID="BtnInvTempEntrada" Text="Entrada" CssClass="btn btn-primary" OnClick="BtnInvTempEntrada_Click" Visible="false" /> </td>
|
||||||
<td><asp:Button runat="server" ID="BtnInvTempSalida" Text="Salida" CssClass="btn btn-primary" OnClick="BtnInvTempSalida_Click" /> </td>
|
<td><asp:Button runat="server" ID="BtnInvTempSalida" Text="Salida" CssClass="btn btn-primary" OnClick="BtnInvTempSalida_Click" Visible="false" /> </td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@@ -1561,7 +1561,9 @@
|
|||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:UpdatePanel ID="UpAlmacen" UpdateMode="Conditional" runat="server">
|
<asp:UpdatePanel ID="UpAlmacen" UpdateMode="Conditional" runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView runat="server" ID="GVInv" AutoGenerateColumns="false" EmptyDataText="Aun no hay registros." ShowHeaderWhenEmpty="True" Width="100%" CssClass="table table-striped table-hover" GridLines="None">
|
<asp:GridView runat="server" ID="GVInv" AutoGenerateColumns="false" EmptyDataText="Aun no hay registros." ShowHeaderWhenEmpty="True" Width="100%" CssClass="table table-striped table-hover" GridLines="None"
|
||||||
|
DataKeyNames="CveConcepto"
|
||||||
|
>
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,##0.##}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
|
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,##0.##}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
|
||||||
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="15%" />
|
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="15%" />
|
||||||
@@ -1766,6 +1768,8 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="VCEGrid" runat="server" HighlightCssClass="vco" TargetControlID="RFVGrid" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCEGrid" runat="server" HighlightCssClass="vco" TargetControlID="RFVGrid" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
<asp:CheckBox runat="server" ID="ChkEsTemporalRegistro" Text="Registrar Temporal" Visible="false" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ Option Strict On
|
|||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.Data.SqlClient
|
Imports System.Data.SqlClient
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
|
Imports DocumentFormat.OpenXml.Drawing.Diagrams
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports GemBox.Spreadsheet
|
Imports GemBox.Spreadsheet
|
||||||
Imports Newtonsoft.Json
|
Imports Newtonsoft.Json
|
||||||
@@ -1056,6 +1057,12 @@ Partial Class OC_OC
|
|||||||
TrDescuentoEscalonado.Visible = True
|
TrDescuentoEscalonado.Visible = True
|
||||||
TrDescuentoProntoPago.Visible = True
|
TrDescuentoProntoPago.Visible = True
|
||||||
TrBotonesInvTemporal.Visible = True
|
TrBotonesInvTemporal.Visible = True
|
||||||
|
|
||||||
|
If TipoOC = "OC" AndAlso UsuarioActual.TienePermisoProceso(401) AndAlso EsNuevo Then
|
||||||
|
ChkEsTemporalRegistro.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.CveEmpresa = 189 AndAlso CveOrdenCompra <> Nothing AndAlso CveOrdenCompra > 0 Then
|
If UsuarioActual.Empresa.CveEmpresa = 189 AndAlso CveOrdenCompra <> Nothing AndAlso CveOrdenCompra > 0 Then
|
||||||
@@ -1550,7 +1557,7 @@ Partial Class OC_OC
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ChkEsTemporal.Checked = Boolean.Parse(objOC.DtResultados.Rows(0)("EsTemporal").ToString)
|
||||||
|
|
||||||
'PROMOCIONES
|
'PROMOCIONES
|
||||||
TxtPromocion.Text = objOC.Promocion
|
TxtPromocion.Text = objOC.Promocion
|
||||||
@@ -2055,6 +2062,35 @@ Partial Class OC_OC
|
|||||||
InicializaMovtosAlmacen()
|
InicializaMovtosAlmacen()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If EsGrupoDiaz And TipoOC = "OC" And ChkEsTemporal.Checked Then
|
||||||
|
|
||||||
|
Dim TieneEntrada As Boolean = False
|
||||||
|
Dim TieneSalida As Boolean = False
|
||||||
|
|
||||||
|
For Each gvRow As GridViewRow In GVInv.Rows
|
||||||
|
If gvRow.DataKey("CveConcepto").ToEntero = 33 Then
|
||||||
|
TieneEntrada = True
|
||||||
|
End If
|
||||||
|
If gvRow.DataKey("CveConcepto").ToEntero = 35 Then
|
||||||
|
TieneSalida = True
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
If UsuarioActual.TienePermisoProceso(401) Then
|
||||||
|
If Not TieneEntrada Then
|
||||||
|
BtnInvTempEntrada.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If TieneEntrada AndAlso Not TieneSalida Then
|
||||||
|
BtnInvTempSalida.Visible = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(565) = "1" And pCveOrdenCompra > 0 And TipoOC.ToUpper() = "REQ" Then
|
If UsuarioActual.Empresa.Funcionalidad(565) = "1" And pCveOrdenCompra > 0 And TipoOC.ToUpper() = "REQ" Then
|
||||||
'LAS COTIZACIONES RAPIDAS SOLO DEBE APARECER SI EL PROVEEDOR ES DEDICADO
|
'LAS COTIZACIONES RAPIDAS SOLO DEBE APARECER SI EL PROVEEDOR ES DEDICADO
|
||||||
If CveConfianzaProveedor = 1 Then
|
If CveConfianzaProveedor = 1 Then
|
||||||
@@ -3072,14 +3108,18 @@ Partial Class OC_OC
|
|||||||
|
|
||||||
|
|
||||||
If Not TieneError AndAlso TipoOC = "OC" Then
|
If Not TieneError AndAlso TipoOC = "OC" Then
|
||||||
|
|
||||||
If Not GeneraPrePolizaPresupuesto(CveOrdenCompra, OC.IniciaTransacSQL) Then
|
If Not GeneraPrePolizaPresupuesto(CveOrdenCompra, OC.IniciaTransacSQL) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If EsGrupoDiaz AndAlso EsNuevo AndAlso CveOrdenCompra > 0 AndAlso TipoOC = "OC" AndAlso ChkEsTemporalRegistro.Checked Then
|
||||||
|
If Not RegistroInventarioTemporal(OC.IniciaTransacSQL, CveOrdenCompra, 1, False) Then
|
||||||
|
TieneError = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
If Conta IsNot Nothing Then Conta.Commit()
|
If Conta IsNot Nothing Then Conta.Commit()
|
||||||
@@ -9727,9 +9767,9 @@ Partial Class OC_OC
|
|||||||
FileExcel.Save(Response, $"OC_{CveOrdenCompra}.xlsx", SaveOptions.XlsxDefault)
|
FileExcel.Save(Response, $"OC_{CveOrdenCompra}.xlsx", SaveOptions.XlsxDefault)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Function RegistroInventarioTemporal(ByRef transaccion As SqlTransaction, CveOCInv As Integer, CveConceptoInv As Integer) As Boolean
|
Function RegistroInventarioTemporal(ByRef transaccion As SqlTransaction, CveOCInv As Integer, OpcionOrigen As Integer, Recargar As Boolean) As Boolean
|
||||||
|
|
||||||
|
|
||||||
|
Dim CveConceptoInv As Integer = If(OpcionOrigen = 1, 33, 35) 'Conceptos 33 Entrada Manual 35 Salida Manual
|
||||||
|
|
||||||
Dim Respuesta As Boolean = True
|
Dim Respuesta As Boolean = True
|
||||||
|
|
||||||
@@ -9781,6 +9821,7 @@ Partial Class OC_OC
|
|||||||
If CveMovimiento <= 0 OrElse CvePrePoliza <= 0 Then
|
If CveMovimiento <= 0 OrElse CvePrePoliza <= 0 Then
|
||||||
Alert("No se pudo almacenar el movimiento correctamente", TipoMensaje.MsgError)
|
Alert("No se pudo almacenar el movimiento correctamente", TipoMensaje.MsgError)
|
||||||
ObjInventario.RollBack() 'deshace lo insertado
|
ObjInventario.RollBack() 'deshace lo insertado
|
||||||
|
Respuesta = False
|
||||||
Else
|
Else
|
||||||
|
|
||||||
Dim Mensaje As String = ""
|
Dim Mensaje As String = ""
|
||||||
@@ -9927,7 +9968,12 @@ Partial Class OC_OC
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If Respuesta Then
|
If Respuesta Then
|
||||||
Alert($"Movimiento Guardado Correctamente Folio:{FolioMto} CveMovmiento: {CveMovimiento}")
|
If Recargar Then
|
||||||
|
Alert($"Movimiento Guardado Correctamente Folio:{FolioMto} CveMovmiento: {CveMovimiento}", TipoMensaje.MsgInformacion, "window.location.reload();")
|
||||||
|
Else
|
||||||
|
Alert($"Movimiento Guardado Correctamente Folio:{FolioMto} CveMovmiento: {CveMovimiento}", TipoMensaje.MsgInformacion)
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return Respuesta
|
Return Respuesta
|
||||||
@@ -9940,7 +9986,7 @@ Partial Class OC_OC
|
|||||||
Dim ObjOC As New ClsOC
|
Dim ObjOC As New ClsOC
|
||||||
|
|
||||||
Try
|
Try
|
||||||
If RegistroInventarioTemporal(ObjOC.IniciaTransacSQL(), CveOrdenCompra, 2) Then
|
If RegistroInventarioTemporal(ObjOC.IniciaTransacSQL(), CveOrdenCompra, 1, True) Then
|
||||||
ObjOC.Commit()
|
ObjOC.Commit()
|
||||||
Else
|
Else
|
||||||
ObjOC.RollBack()
|
ObjOC.RollBack()
|
||||||
@@ -9956,7 +10002,7 @@ Partial Class OC_OC
|
|||||||
Protected Sub BtnInvTempSalida_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnInvTempSalida_Click(sender As Object, e As EventArgs)
|
||||||
Dim ObjOC As New ClsOC
|
Dim ObjOC As New ClsOC
|
||||||
Try
|
Try
|
||||||
If RegistroInventarioTemporal(ObjOC.IniciaTransacSQL(), CveOrdenCompra, 3) Then
|
If RegistroInventarioTemporal(ObjOC.IniciaTransacSQL(), CveOrdenCompra, 0, True) Then
|
||||||
ObjOC.Commit()
|
ObjOC.Commit()
|
||||||
Else
|
Else
|
||||||
ObjOC.RollBack()
|
ObjOC.RollBack()
|
||||||
|
|||||||
@@ -201,6 +201,9 @@
|
|||||||
<asp:DropDownList ID="DdlMoneda" runat="server" CssClass="form-control input-sm select2me" DataTextField="Moneda" DataValueField="CveMoneda" Style="width: 95px; height: 30px; display: inline-block;">
|
<asp:DropDownList ID="DdlMoneda" runat="server" CssClass="form-control input-sm select2me" DataTextField="Moneda" DataValueField="CveMoneda" Style="width: 95px; height: 30px; display: inline-block;">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="colf-1" runat="server" id="DVEsTemporal" visible="false">
|
||||||
|
<asp:CheckBox runat="server" ID="ChkEsTempral" Text="Es Temporal" />
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row rownomargin">
|
<div class="row rownomargin">
|
||||||
@@ -251,6 +254,8 @@
|
|||||||
<asp:ListItem Text="No" Value="0"/>
|
<asp:ListItem Text="No" Value="0"/>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row rownomargin">
|
<div class="row rownomargin">
|
||||||
<label class="colf-1 truncate">Proveedor</label>
|
<label class="colf-1 truncate">Proveedor</label>
|
||||||
|
|||||||
@@ -81,7 +81,9 @@ Partial Class RepOC
|
|||||||
txtFechaISemanal.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
txtFechaISemanal.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||||
txtFechaFSemanal.Text = NowADS().ToShortDateString
|
txtFechaFSemanal.Text = NowADS().ToShortDateString
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||||
|
DVEsTemporal.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -220,10 +222,12 @@ Partial Class RepOC
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaPendientes()
|
Private Sub CargaPendientes()
|
||||||
|
|
||||||
|
Dim EsTemporal As Integer = If(ChkEsTempral.Checked, 1, -1)
|
||||||
|
|
||||||
Dim OC As New ClsOC
|
Dim OC As New ClsOC
|
||||||
If OC.GetOrdenesPendientes(DdlTipo.SelectedValue.ToString, 0, UsuarioActual.CveEmpresa, DdlProyectos.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero,
|
If OC.GetOrdenesPendientes(DdlTipo.SelectedValue.ToString, 0, UsuarioActual.CveEmpresa, DdlProyectos.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero,
|
||||||
DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveUsuario, ddlcliente.SelectedValue.ToEntero, SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False),
|
DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveUsuario, ddlcliente.SelectedValue.ToEntero, SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False),
|
||||||
CveUsuarioAsignado:=DdlUsuarioAsignado.SelectedValue.ToEntero(), EntregaDirecta:=DdlEntregaDirecta.SelectedValue.ToEntero()) Then
|
CveUsuarioAsignado:=DdlUsuarioAsignado.SelectedValue.ToEntero(), EntregaDirecta:=DdlEntregaDirecta.SelectedValue.ToEntero(), TieneAnticipo:=DdlTieneAnticipo.SelectedValue.ToEntero, EsTemporal:=EsTemporal) Then
|
||||||
|
|
||||||
DtPorAtender = OC.DtResultados
|
DtPorAtender = OC.DtResultados
|
||||||
GvPorAtender.DataSource = DtPorAtender 'OC.DtResultados
|
GvPorAtender.DataSource = DtPorAtender 'OC.DtResultados
|
||||||
@@ -252,7 +256,7 @@ Partial Class RepOC
|
|||||||
|
|
||||||
If OC.GetOrdenesPendientes(DdlTipo.SelectedValue.ToString, 1, UsuarioActual.CveEmpresa, DdlProyectos.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero,
|
If OC.GetOrdenesPendientes(DdlTipo.SelectedValue.ToString, 1, UsuarioActual.CveEmpresa, DdlProyectos.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero,
|
||||||
DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveUsuario, ddlcliente.SelectedValue.ToEntero, SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False),
|
DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveUsuario, ddlcliente.SelectedValue.ToEntero, SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False),
|
||||||
CveUsuarioAsignado:=DdlUsuarioAsignado.SelectedValue.ToEntero(), EntregaDirecta:=DdlEntregaDirecta.SelectedValue.ToEntero()) Then
|
CveUsuarioAsignado:=DdlUsuarioAsignado.SelectedValue.ToEntero(), EntregaDirecta:=DdlEntregaDirecta.SelectedValue.ToEntero(), TieneAnticipo:=DdlTieneAnticipo.SelectedValue.ToEntero, EsTemporal:=EsTemporal) Then
|
||||||
GvPendientes.DataSource = OC.DtResultados
|
GvPendientes.DataSource = OC.DtResultados
|
||||||
DtPendiente = OC.DtResultados
|
DtPendiente = OC.DtResultados
|
||||||
GvPendientes.DataBind()
|
GvPendientes.DataBind()
|
||||||
@@ -368,6 +372,10 @@ Partial Class RepOC
|
|||||||
|
|
||||||
#Region " CONSULTAR "
|
#Region " CONSULTAR "
|
||||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles btnConsultar.Click
|
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles btnConsultar.Click
|
||||||
|
|
||||||
|
|
||||||
|
Dim EsTemporal As Integer = If(ChkEsTempral.Checked, 1, -1)
|
||||||
|
|
||||||
LbPorAtenderPDF.Visible = False
|
LbPorAtenderPDF.Visible = False
|
||||||
LbPorAtender.Visible = False
|
LbPorAtender.Visible = False
|
||||||
LbPendientes.Visible = False
|
LbPendientes.Visible = False
|
||||||
@@ -388,7 +396,7 @@ Partial Class RepOC
|
|||||||
If(CheckNoCompleta.Checked, -1, UsuarioActual.CveUsuario), UsuarioActual.Empresa.CveEmpresa, If(DDlPS.SelectedValue = "", -1, DDlPS.SelectedValue.ToEntero), If(CheckNoCompleta.Checked, True, False),
|
If(CheckNoCompleta.Checked, -1, UsuarioActual.CveUsuario), UsuarioActual.Empresa.CveEmpresa, If(DDlPS.SelectedValue = "", -1, DDlPS.SelectedValue.ToEntero), If(CheckNoCompleta.Checked, True, False),
|
||||||
ddlcliente.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False),
|
ddlcliente.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False),
|
||||||
CveUsuarioAutorizo:=DdlUsuarioAutorizo.SelectedValue.ToEntero(), CveUsuarioAsignado:=DdlUsuarioAsignado.SelectedValue.ToEntero(), EntregaDirecta:=DdlEntregaDirecta.SelectedValue.ToEntero(),
|
CveUsuarioAutorizo:=DdlUsuarioAutorizo.SelectedValue.ToEntero(), CveUsuarioAsignado:=DdlUsuarioAsignado.SelectedValue.ToEntero(), EntregaDirecta:=DdlEntregaDirecta.SelectedValue.ToEntero(),
|
||||||
CveMoneda:=DdlMoneda.SelectedValue.ToEntero(), MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero, TieneAnticipo:=DdlTieneAnticipo.SelectedValue.ToEntero) Then
|
CveMoneda:=DdlMoneda.SelectedValue.ToEntero(), MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero, TieneAnticipo:=DdlTieneAnticipo.SelectedValue.ToEntero, EsTemporal:=EsTemporal) Then
|
||||||
|
|
||||||
GvConsultar.DataSource = OC.DtResultados
|
GvConsultar.DataSource = OC.DtResultados
|
||||||
DtOC = OC.DtResultados
|
DtOC = OC.DtResultados
|
||||||
@@ -545,8 +553,7 @@ Partial Class RepOC
|
|||||||
Dim Completa As String = If(CheckNoCompleta.Checked = False, "", $" , <b>No completa</b> ")
|
Dim Completa As String = If(CheckNoCompleta.Checked = False, "", $" , <b>No completa</b> ")
|
||||||
Dim Proveedor = If(DdlProveedores.SelectedValue = "-1", "", $" <b>Proveedor:</b> {DdlProveedores.txtText.Value }")
|
Dim Proveedor = If(DdlProveedores.SelectedValue = "-1", "", $" <b>Proveedor:</b> {DdlProveedores.txtText.Value }")
|
||||||
Dim Cliente = If(ddlcliente.SelectedValue = "-1", "", $" <b>Cliente:</b> {ddlcliente.SelectedItem.Text}")
|
Dim Cliente = If(ddlcliente.SelectedValue = "-1", "", $" <b>Cliente:</b> {ddlcliente.SelectedItem.Text}")
|
||||||
|
Dim TieneAnticipo As String = If(DdlTieneAnticipo.SelectedValue.ToEntero = -1, "", $" <b>Anticpo:</b> {DdlTieneAnticipo.SelectedItem.Text}")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -561,7 +568,7 @@ Partial Class RepOC
|
|||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||||
params.Add(New ReportParameter("AgrupadoPor", $"{Folio}{Tipo}{Proyecto}{SubProyecto}{Estatus}{AF}{Usuario}{FI}{FF}{Clasificacion}{Producto}{Completa}{Proveedor}{Cliente}"))
|
params.Add(New ReportParameter("AgrupadoPor", $"{Folio}{Tipo}{Proyecto}{SubProyecto}{Estatus}{AF}{Usuario}{FI}{FF}{Clasificacion}{Producto}{Completa}{Proveedor}{Cliente}{TieneAnticipo}"))
|
||||||
params.Add(New ReportParameter("SubProyectoHeader", LblSubProyecto.Text))
|
params.Add(New ReportParameter("SubProyectoHeader", LblSubProyecto.Text))
|
||||||
params.Add(New ReportParameter("Titulo", "REPORTE DE ORDENES DE COMPRA POR ATENDER"))
|
params.Add(New ReportParameter("Titulo", "REPORTE DE ORDENES DE COMPRA POR ATENDER"))
|
||||||
|
|
||||||
|
|||||||
@@ -1203,9 +1203,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row" style="margin-top: 5px;">
|
<div class="row" style="margin-top: 5px;">
|
||||||
<label class="col-md-6 truncate">Ultimo Costo</label>
|
<label class="col-md-6 truncate">Ultimo Costo</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-1">
|
||||||
<asp:Label ID="LblUltimoCosto" runat="server"></asp:Label>
|
<asp:Label ID="LblUltimoCosto" runat="server"></asp:Label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-5" runat="server" id="DVEditaUltimoCosto" visible="false" style="text-align:left">
|
||||||
|
<asp:LinkButton ID="LnkEditarUltimoCostoMostrarModal" runat="server" CssClass="btn btn-circle btn-sm green" OnClick="LnkEditarUltimoCostoMostrarModal_Click" Text="<i class='fa fa-pencil'></i>" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" style="margin-top: 5px;">
|
<div class="row" style="margin-top: 5px;">
|
||||||
<label class="col-md-6 truncate">Costo Promedio</label>
|
<label class="col-md-6 truncate">Costo Promedio</label>
|
||||||
@@ -2523,6 +2526,69 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
<%-- <asp:UpdatePanel runat="server" ID="UpUltimoCostoModal" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div id="" class="modal fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
|
||||||
|
<!-- Modal content-->
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header-warning">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">
|
||||||
|
<asp:Label ID="Label1" runat="server" ClientIDMode="Static" Text=""></asp:Label></h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>--%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="DVUltimoCostoModal" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<asp:UpdatePanel ID="UpUltimoCostoModal" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<h4 class="modal-title">Actualizar Ultimo Costo</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="form-group form-md-line-input input-iconright" style="width:100px">
|
||||||
|
<asp:TextBox ID="TxtUltimoCostoModal" runat="server" Width="100px" CausesValidation="true" CssClass="form-control" onkeyup="FormatoMoneda(this)" ></asp:TextBox>
|
||||||
|
<label for="<%= TxtUltimoCostoModal.ClientID.ToString()%>">Ultimo Costo:</label>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvTxtUltimoCostoModal" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtUltimoCostoModal" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ultimo Costo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUltimoCostoModal"></asp:RequiredFieldValidator>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer" style="display: block">
|
||||||
|
<asp:UpdatePanel ID="UpdatePanel4" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:Button ID="BtnGuardarUltimoCostoModal" runat="server" Text="Guardar" CssClass="btn btn-sm blue" OnClick="BtnGuardarUltimoCostoModal_Click" ValidationGroup="GrpUltimoCostoModal" />
|
||||||
|
<asp:Button ID="Button2" runat="server" Text="Cancelar" CssClass="btn btn-sm default" data-dismiss="modal" />
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -364,6 +364,9 @@ Partial Class ProductosyServicios
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If CvePS > 0 And UsuarioActual.TienePermisoProceso(402) Then
|
||||||
|
DVEditaUltimoCosto.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -3843,4 +3846,31 @@ Partial Class ProductosyServicios
|
|||||||
|
|
||||||
Ps.Dispose()
|
Ps.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LnkEditarUltimoCostoMostrarModal_Click(sender As Object, e As EventArgs)
|
||||||
|
TxtUltimoCostoModal.Text = LblUltimoCosto.Text
|
||||||
|
UpUltimoCostoModal.Update()
|
||||||
|
RegistraScript("$('#DVUltimoCostoModal').modal('show');")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnGuardarUltimoCostoModal_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
Dim ProcesoOK As Boolean = False
|
||||||
|
|
||||||
|
Dim objPS As New ClsProductosServicios
|
||||||
|
|
||||||
|
If objPS.UpdateUltimoCosto(CvePS, TxtUltimoCostoModal.Text.ToDecimal, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
|
ProcesoOK = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
objPS.Dispose()
|
||||||
|
|
||||||
|
|
||||||
|
If ProcesoOK Then
|
||||||
|
RegistraScript("$('#DVUltimoCostoModal').modal('hide');")
|
||||||
|
Alert("Ultimo Costo guardado correctamente", TipoMensaje.MsgInformacion, "window.location.reload();")
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -260,8 +260,12 @@ Partial Class Ventas_RepVentas
|
|||||||
Dim Sucursales As String = If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM)
|
Dim Sucursales As String = If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM)
|
||||||
Dim Estatus As String = If(DdlEstatus.GetSelectedValuesM = "", "-1", DdlEstatus.GetSelectedValuesM)
|
Dim Estatus As String = If(DdlEstatus.GetSelectedValuesM = "", "-1", DdlEstatus.GetSelectedValuesM)
|
||||||
Dim Vendedores As String = If(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM)
|
Dim Vendedores As String = If(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM)
|
||||||
Dim CveCliente As Integer = If(DdlClientes.SelectedValue = "", -1, DdlClientes.SelectedValue.ToEntero)
|
Dim CveCliente As Integer = If(DdlClientes.SelectedValue = "", -1, DdlClientes.SelectedValue.ToEntero)
|
||||||
|
|
||||||
|
If TipoComprobante.Contiene("Rem") And Not Estatus.Contiene("11") Then
|
||||||
|
Estatus = Estatus & ",11"
|
||||||
|
End If
|
||||||
|
|
||||||
If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then
|
If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then
|
||||||
TCEspecifico = TxtEspecifico.Text.ToDecimal
|
TCEspecifico = TxtEspecifico.Text.ToDecimal
|
||||||
Else
|
Else
|
||||||
@@ -340,7 +344,19 @@ Partial Class Ventas_RepVentas
|
|||||||
DdlEstatus.DataSource = GlobalDTEstatusFactura
|
DdlEstatus.DataSource = GlobalDTEstatusFactura
|
||||||
End If
|
End If
|
||||||
'DdlEstatus.Items.Add(New ListItem("Todos", "-1"))
|
'DdlEstatus.Items.Add(New ListItem("Todos", "-1"))
|
||||||
DdlEstatus.DataBind()
|
DdlEstatus.DataBind()
|
||||||
|
|
||||||
|
If DdlTipoComprobante.GetSelectedValuesM(True).Contains("Rem") Then
|
||||||
|
For Each item As ListItem In DdlEstatus.Items
|
||||||
|
If item.Value = "11" Then
|
||||||
|
DdlEstatus.Items.Remove(item)
|
||||||
|
DdlEstatus.Items.Insert(0, New ListItem("Registrada", "2"))
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub RblTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipoCambio.SelectedIndexChanged
|
Private Sub RblTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipoCambio.SelectedIndexChanged
|
||||||
|
|||||||
@@ -362,6 +362,17 @@ Partial Class RepVentasDetalle
|
|||||||
End If
|
End If
|
||||||
' DdlEstatus.Items.Add(New ListItem("Todos", "-1"))
|
' DdlEstatus.Items.Add(New ListItem("Todos", "-1"))
|
||||||
DdlEstatus.DataBind()
|
DdlEstatus.DataBind()
|
||||||
|
|
||||||
|
If DdlTipoComprobante.GetSelectedValuesM(True).Contains("Rem") Then
|
||||||
|
For Each item As ListItem In DdlEstatus.Items
|
||||||
|
If item.Value = "11" Then
|
||||||
|
DdlEstatus.Items.Remove(item)
|
||||||
|
DdlEstatus.Items.Insert(0, New ListItem("Registrada", "2"))
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
@@ -430,6 +441,10 @@ Partial Class RepVentasDetalle
|
|||||||
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim.ToDate, MinFecha)
|
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim.ToDate, MinFecha)
|
||||||
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim.ToDate, MaxFecha)
|
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim.ToDate, MaxFecha)
|
||||||
|
|
||||||
|
If TipoComprobante.Contiene("Rem") And Not Estatus.Contiene("11") Then
|
||||||
|
Estatus = Estatus & ",11"
|
||||||
|
End If
|
||||||
|
|
||||||
Dim ModalidadContable As Boolean = CBool(If(Request("ModalidadContable") IsNot Nothing, Request("ModalidadContable").ToEntero(), 0))
|
Dim ModalidadContable As Boolean = CBool(If(Request("ModalidadContable") IsNot Nothing, Request("ModalidadContable").ToEntero(), 0))
|
||||||
|
|
||||||
ChkLecturaAdmin.Checked = Not ModalidadContable
|
ChkLecturaAdmin.Checked = Not ModalidadContable
|
||||||
|
|||||||
Reference in New Issue
Block a user