Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1521,7 +1521,7 @@
|
||||
|
||||
<asp:GridView runat="server" ID="GvOC1" AutoGenerateColumns="false"
|
||||
GridLines="None" UseAccessibleHeader="true" EmptyDataText="No se encontraron registros." CssClass="table table-striped table-hover Widthall Sortable" RowStyle-HorizontalAlign="Center"
|
||||
DataKeyNames="CantidadF,FolioREQ,CveProveedorSucursal,PS,CantidadPendienteVincular,IEPSPS,IVA,RetIVA,RetISR,Descuento,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,IEPSPSIVAPorcentaje,Cantidad,CveProveedorOC">
|
||||
DataKeyNames="CantidadF,FolioREQ,CveProveedorSucursal,CveTipoPS,PS,CantidadPendienteVincular,IEPSPS,IVA,RetIVA,RetISR,Descuento,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,IEPSPSIVAPorcentaje,Cantidad,CveProveedorOC,Importe">
|
||||
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Folio" ItemStyle-Width="10%" Visible="false">
|
||||
@@ -1762,7 +1762,7 @@
|
||||
<asp:UpdatePanel runat="server" ID="UpGvOC2" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivDatosCompra" style="height: 250px; overflow-y: auto;">
|
||||
<asp:GridView AutoGenerateColumns="false" runat="server" ID="GvOC2" GridLines="None" EmptyDataText="No se encontraron registros." CssClass="table table-striped table-hover gridconheader Widthall" RowStyle-HorizontalAlign="Center">
|
||||
<asp:GridView AutoGenerateColumns="false" runat="server" ID="GvOC2" GridLines="None" EmptyDataText="No se encontraron registros." CssClass="table table-striped table-hover gridconheader Widthall" RowStyle-HorizontalAlign="Center" DataKeyNames="Cantidad,UM,PS,SATClaveProductoServicio,PU,Total,Descuento">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="#" DataField="Consec" ItemStyle-Width="20px" />
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,##0.00####}" ItemStyle-Width="40px" />
|
||||
|
||||
@@ -15489,6 +15489,12 @@ Partial Class Compras_Compras
|
||||
'If DdlOCVinculaInv.SelectedValue.ToEntero = 237 And Not CveFlete > 0 Then Alert("Necesita vincular un flete si selecciona Factura de Flete", TipoMensaje.MsgAdvertencia) : Exit Sub
|
||||
'If DdlOCVinculaInv.SelectedValue.ToEntero = 240 And Not CveImportacion > 0 Then Alert("Necesita vincular una Importación si selecciona Factura de Importación", TipoMensaje.MsgAdvertencia) : Exit Sub
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 And DdlTipoComprobante.SelectedValue = "Fac" Then
|
||||
If Not VerificarProductosCompraConOC() Then
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim SubTotalGV = 0.0D
|
||||
Dim Amortizacion As Decimal = TmpDT.SUMD("Total")
|
||||
If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 Then
|
||||
@@ -20300,10 +20306,71 @@ Partial Class Compras_Compras
|
||||
' Return False
|
||||
'End If
|
||||
|
||||
' Return True
|
||||
'Return True
|
||||
|
||||
'End Function
|
||||
|
||||
Private Function VerificarProductosCompraConOC() As Boolean
|
||||
|
||||
|
||||
Dim ProductosNoValidados As New StringBuilder()
|
||||
|
||||
Dim DtCompras As New DataTable()
|
||||
DtCompras.Columns.Add("Cantidad", GetType(String))
|
||||
DtCompras.Columns.Add("UM", GetType(String))
|
||||
DtCompras.Columns.Add("PS", GetType(String))
|
||||
DtCompras.Columns.Add("SATClaveProductoServicio", GetType(String))
|
||||
DtCompras.Columns.Add("PU", GetType(String))
|
||||
DtCompras.Columns.Add("Total", GetType(String))
|
||||
|
||||
For Each GvOC2Row As GridViewRow In GvOC2.Rows
|
||||
Dim Cantidad As String = GvOC2Row.DataKey("Cantidad")
|
||||
Dim UM As String = GvOC2Row.DataKey("UM")
|
||||
Dim PS As String = GvOC2Row.DataKey("PS")
|
||||
Dim SATClaveProductoServicio As String = GvOC2Row.DataKey("SATClaveProductoServicio")
|
||||
Dim PU As String = (GvOC2Row.DataKey("Total").ToEntero / GvOC2Row.DataKey("Cantidad").ToEntero).ToString
|
||||
Dim Total As String = GvOC2Row.DataKey("Total")
|
||||
DtCompras.Rows.Add(Cantidad, UM, PS, SATClaveProductoServicio, PU, Total)
|
||||
Next
|
||||
|
||||
For Each GvOCRow As GridViewRow In GvOC1.Rows
|
||||
|
||||
Dim TipoPS As String = GvOCRow.DataKey("CveTipoPS")
|
||||
|
||||
If TipoPS = "2" Then
|
||||
Dim ProductoAisloadoString As String = GvOCRow.DataKey("PS").Split("-"c)(1).Trim()
|
||||
Dim PSOC As String = ProductoAisloadoString
|
||||
Dim CantidadOC As String = GvOCRow.DataKey("CantidadF")
|
||||
Dim PrecioUnitarioOC As String = GvOCRow.DataKey("Importe")
|
||||
|
||||
Dim Filtro As String = String.Format("Cantidad = {0} AND PS = '{1}' AND PU = {2}", CantidadOC, PSOC, PrecioUnitarioOC)
|
||||
|
||||
Dim RenglonCompras As DataRow = DtCompras.FiltroPrimero(Filtro)
|
||||
|
||||
If RenglonCompras Is Nothing Then
|
||||
Dim FiltroCantidad As String = String.Format("Cantidad = {0} AND PS = '{1}'", CantidadOC, PSOC)
|
||||
Dim RenglonFiltroCantidad As DataRow = DtCompras.FiltroPrimero(FiltroCantidad)
|
||||
If RenglonFiltroCantidad Is Nothing Then
|
||||
ProductosNoValidados.AppendFormat("La Cantidad del producto '{0}' no coincide<br/>", PSOC)
|
||||
End If
|
||||
|
||||
Dim FiltroPU As String = String.Format("PS = '{0}' AND PU = {1}", PSOC, PrecioUnitarioOC)
|
||||
Dim RenglonFiltroPU As DataRow = DtCompras.FiltroPrimero(FiltroPU)
|
||||
If RenglonFiltroPU Is Nothing Then
|
||||
ProductosNoValidados.AppendFormat("El Precio Unitario del producto '{0}' no coincide<br/>", PSOC)
|
||||
End If
|
||||
|
||||
ProductosNoValidados.Append("<br/>")
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
If ProductosNoValidados.ToString().Length() > 0 Then
|
||||
Dim AlertProductosNoValidados As String = String.Format("Los siguientes productos no se encuentran en la factura: <br/><br/>{0}", ProductosNoValidados.ToString)
|
||||
Alert(AlertProductosNoValidados, TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Public Class MMensajeDevolucion
|
||||
|
||||
@@ -1275,10 +1275,23 @@ Partial Class PopUpVerFactura
|
||||
Dim FechaMovimiento As Date = ObjInventarios.FechaRegistro
|
||||
|
||||
Dim CveMovimientoRelacionado As Integer = -1
|
||||
Dim FolioRelacionado As String = ""
|
||||
Dim CveConceptoMovtoRelacionado As Integer = -1
|
||||
|
||||
'VERIFICA SI TIENE MOVIMIENTO VIRTUAL RELACIONADO
|
||||
If UsuarioActual.CveEmpresa = 140 AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
CveMovimientoRelacionado = ObjInventarios.DtResultados.Rows(0)("CveMtoRel").ToString().ToEntero()
|
||||
End If
|
||||
|
||||
If CveConcepto.Contiene(3, 26) AndAlso ObjInventarios.DtResultados.FiltroPrimeroValor("CveMovimientoVirtual").ToEntero() > 0 Then
|
||||
FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioVirtual")
|
||||
CveConceptoMovtoRelacionado = 37
|
||||
ElseIf CveConcepto = 37 Then
|
||||
FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioRelacionado")
|
||||
CveConceptoMovtoRelacionado = 3
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim CantidadProductos As Decimal = 0
|
||||
Dim CantidadUsados As Decimal = 0
|
||||
|
||||
@@ -1345,7 +1358,8 @@ Partial Class PopUpVerFactura
|
||||
EstadoOrigen, PaisOrigen, CPOrigen, CalleDestino, NoExtDestino, ColoniaDestino, LocalidadDestino,
|
||||
MunicipioDestino, EstadoDestino, PaisDestino, CPDestino, FechaMovimiento, NombreCapturo, PuestoRecibio,
|
||||
PuestoEnrego, RazonSocial, ResponsableCarga, ResponsableRecibio, NombreCliente,
|
||||
CantidadProductos:=CantidadProductos, CantidadUsados:=CantidadUsados, CveTipoAlmacen:=CveTipoAlmacen, NombreEntrego:=NombreEntrego)
|
||||
CantidadProductos:=CantidadProductos, CantidadUsados:=CantidadUsados, CveTipoAlmacen:=CveTipoAlmacen, NombreEntrego:=NombreEntrego,
|
||||
CveConceptoMovRelacionado:=CveConceptoMovtoRelacionado, FolioRelacionado:=FolioRelacionado)
|
||||
|
||||
End Sub
|
||||
Private Sub PUanacExtr(CveMoneda As Integer) 'preciounitario a moneda nacional o extranjera
|
||||
@@ -1362,7 +1376,8 @@ Partial Class PopUpVerFactura
|
||||
Remision As String, Proveedor As String, CalleOrigen As String, NoExtOrigen As String, ColoniaOrigen As String, LocalidadOrigen As String, MunicipioOrigen As String,
|
||||
EstadoOrigen As String, PaisOrigen As String, CPOrigen As String, CalleDestino As String, NoExtDestino As String, ColoniaDestino As String, LocalidadDestino As String, MunicipioDestino As String,
|
||||
EstadoDestino As String, PaisDestino As String, CPDestino As String, FechaMovimiento As Date, NombreCapturo As String, PuestoRecibio As String, PuestoEntrego As String,
|
||||
RazonSocial As String, ResponsableCarga As String, ResponsableRecibio As String, NombreCliente As String, Optional CantidadProductos As Decimal = 0, Optional CantidadUsados As Decimal = 0, Optional CveTipoAlmacen As Integer = -1, Optional NombreEntrego As String = "")
|
||||
RazonSocial As String, ResponsableCarga As String, ResponsableRecibio As String, NombreCliente As String, Optional CantidadProductos As Decimal = 0, Optional CantidadUsados As Decimal = 0,
|
||||
Optional CveTipoAlmacen As Integer = -1, Optional NombreEntrego As String = "", Optional CveConceptoMovRelacionado As Integer = -1, Optional FolioRelacionado As String = "")
|
||||
|
||||
|
||||
Select Case CveConcepto
|
||||
@@ -1542,7 +1557,7 @@ Partial Class PopUpVerFactura
|
||||
ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
End If
|
||||
|
||||
Case 3, 16 ' S A L I D A S
|
||||
Case 3, 16, 37 ' S A L I D A S
|
||||
'Dim Archivo As New System.IO.FileInfo(String.Format("Empresas/{0}/Formatos/Salidas.rdlc", 72))
|
||||
'Dim Imagen As New System.IO.FileInfo(String.Format("Empresas/{0}/Logo.png", 72))
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/Salidas.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
@@ -1552,6 +1567,8 @@ Partial Class PopUpVerFactura
|
||||
Dim concepto As String = ""
|
||||
If CveConcepto = 3 Then
|
||||
concepto = "SALIDA DE ALMACÉN"
|
||||
ElseIf CveConcepto = 37 Then
|
||||
concepto = "SALIDA VIRTUAL"
|
||||
Else
|
||||
concepto = "SALIDA DE ALMACÉN POR RECONSTRUCCIÓN"
|
||||
End If
|
||||
@@ -1688,6 +1705,34 @@ Partial Class PopUpVerFactura
|
||||
|
||||
'ImprimirPDF(String.Format("Empresas/{0}/Formatos/Salidas.rdlc", 72), DtMovimientos, params, "ReporteSalidas", RDSName:="DsInventarios")
|
||||
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
ElseIf UsuarioActual.CveEmpresa = 140 Then
|
||||
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("Concepto", concepto))
|
||||
params.Add(New ReportParameter("Almacen", Almacen))
|
||||
params.Add(New ReportParameter("Fecha", Fecha))
|
||||
params.Add(New ReportParameter("FacturaProveedor", FolioVenta))
|
||||
params.Add(New ReportParameter("FacturadoA", If(DtMovimientos(0)("Nombre").ToString <> "", DtMovimientos(0)("Nombre").ToString, NombreCliente)))
|
||||
params.Add(New ReportParameter("Observaciones", Observaciones))
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("Folio", Folio))
|
||||
params.Add(New ReportParameter("Descuentos", ""))
|
||||
params.Add(New ReportParameter("IVA", ""))
|
||||
params.Add(New ReportParameter("Total", ""))
|
||||
'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
params.Add(New ReportParameter("NombreRecibio", Recibio))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString()))
|
||||
params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado))
|
||||
|
||||
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
Else
|
||||
params.Add(New ReportParameter("Folio", Folio))
|
||||
params.Add(New ReportParameter("Fecha", Fecha))
|
||||
@@ -2124,7 +2169,9 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("CantidadProductos", CantidadProductos.ToString()))
|
||||
params.Add(New ReportParameter("CantidadUsados", CantidadUsados.ToString()))
|
||||
params.Add(New ReportParameter("CantidadUsados", CantidadUsados.ToString()))
|
||||
params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString()))
|
||||
params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado))
|
||||
Else
|
||||
params.Add(New ReportParameter("Observaciones", Observaciones)) 'TxtObservaciones.Text
|
||||
params.Add(New ReportParameter("CveAlmacen", DtMovimientos(0)("CveTipoAlmacen").ToString))
|
||||
@@ -2469,19 +2516,19 @@ Partial Class PopUpVerFactura
|
||||
If (UsuarioActual.CveEmpresa = 72) Then
|
||||
params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
|
||||
End If
|
||||
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/SalidasGarantia.rdlc", DtMovimientos, params, String.Format("SalidaGarantia{0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
'Else
|
||||
' params.Add(New ReportParameter("Folio", Folio))
|
||||
' params.Add(New ReportParameter("Fecha", Fecha))
|
||||
' params.Add(New ReportParameter("Almacen", Almacen))
|
||||
' params.Add(New ReportParameter("SubProyecto", SubProyecto))
|
||||
' params.Add(New ReportParameter("Observaciones", Observaciones))
|
||||
' params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
||||
' ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
'End If
|
||||
|
||||
|
||||
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/SalidasGarantia.rdlc", DtMovimientos, params, String.Format("SalidaGarantia{0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
'Else
|
||||
' params.Add(New ReportParameter("Folio", Folio))
|
||||
' params.Add(New ReportParameter("Fecha", Fecha))
|
||||
' params.Add(New ReportParameter("Almacen", Almacen))
|
||||
' params.Add(New ReportParameter("SubProyecto", SubProyecto))
|
||||
' params.Add(New ReportParameter("Observaciones", Observaciones))
|
||||
' params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
||||
' ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
'End If
|
||||
|
||||
|
||||
Case 18 'D E V O L U C I O N D E L C L I E N T E
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/DevolucionCliente.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
@@ -2658,36 +2705,36 @@ Partial Class PopUpVerFactura
|
||||
ImprimirPDF(Archivo, DtMovimientos, params, String.Format("Salida por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
ElseIf CveConcepto = 22 Then
|
||||
ImprimirPDF(Archivo, DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
End If
|
||||
|
||||
'Case 22 'ENTRADA POR PRESTAMO
|
||||
' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
' Dim params As New List(Of ReportParameter)
|
||||
|
||||
' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
' If Imagen.Exists Then
|
||||
' params.Add(New ReportParameter("LogoPath", logouri))
|
||||
' Else
|
||||
' params.Add(New ReportParameter("LogoPath", ""))
|
||||
' End If
|
||||
|
||||
' params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
' params.Add(New ReportParameter("Concepto", "Entrada por Prestamo"))
|
||||
' params.Add(New ReportParameter("Almacen", Almacen))
|
||||
' params.Add(New ReportParameter("Fecha", Fecha))
|
||||
' params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
' params.Add(New ReportParameter("Folio", Folio))
|
||||
' params.Add(New ReportParameter("Descuentos", ""))
|
||||
' params.Add(New ReportParameter("IVA", ""))
|
||||
' params.Add(New ReportParameter("Total", ""))
|
||||
' 'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
||||
' params.Add(New ReportParameter("FacturadoA", NombreCliente))
|
||||
' If (UsuarioActual.CveEmpresa = 72) Then
|
||||
' params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
|
||||
' End If
|
||||
' ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
|
||||
End If
|
||||
|
||||
'Case 22 'ENTRADA POR PRESTAMO
|
||||
' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
' Dim params As New List(Of ReportParameter)
|
||||
|
||||
' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
' If Imagen.Exists Then
|
||||
' params.Add(New ReportParameter("LogoPath", logouri))
|
||||
' Else
|
||||
' params.Add(New ReportParameter("LogoPath", ""))
|
||||
' End If
|
||||
|
||||
' params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
' params.Add(New ReportParameter("Concepto", "Entrada por Prestamo"))
|
||||
' params.Add(New ReportParameter("Almacen", Almacen))
|
||||
' params.Add(New ReportParameter("Fecha", Fecha))
|
||||
' params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
' params.Add(New ReportParameter("Folio", Folio))
|
||||
' params.Add(New ReportParameter("Descuentos", ""))
|
||||
' params.Add(New ReportParameter("IVA", ""))
|
||||
' params.Add(New ReportParameter("Total", ""))
|
||||
' 'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
||||
' params.Add(New ReportParameter("FacturadoA", NombreCliente))
|
||||
' If (UsuarioActual.CveEmpresa = 72) Then
|
||||
' params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
|
||||
' End If
|
||||
' ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
|
||||
Case 24 'SALIDA POR RESGUARDO
|
||||
If DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 20 Or DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 19 Then
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
@@ -3170,11 +3217,11 @@ Partial Class PopUpVerFactura
|
||||
If CveConcepto = 2 Then
|
||||
ElseIf CveConcepto = 3 Then
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'OC' - IMPRIME PDF OC"
|
||||
Private Sub ImprimePDFOC(CveOrdenCompra As Integer)
|
||||
Dim reporte As Byte() = NewGeneraBytesOC(CveOrdenCompra, ConBitacora:=(UsuarioActual.Empresa.Funcionalidad(119) = "1"))
|
||||
|
||||
1358
Empresas/140/Formatos/Salidas.rdlc
Normal file
1358
Empresas/140/Formatos/Salidas.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -904,6 +904,76 @@
|
||||
</Border>
|
||||
</Style>
|
||||
</Image>
|
||||
<Textbox Name="Textbox41">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!FolioRelacionado.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox4</rd:DefaultName>
|
||||
<Top>1.94386cm</Top>
|
||||
<Left>17.07518cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>1.2347cm</Width>
|
||||
<ZIndex>9</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=IIF(Parameters!FolioRelacionado.Value = "",true,false)</Hidden>
|
||||
</Visibility>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox42">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=IIF(Parameters!CveConceptoMovRelacionado.Value = 37,"Folio Virtual:","Folio Relacionado:")</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Top>1.34386cm</Top>
|
||||
<Left>17.07518cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>2.07667cm</Width>
|
||||
<ZIndex>10</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=IIF(Parameters!FolioRelacionado.Value = "",true,false)</Hidden>
|
||||
</Visibility>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<VerticalAlign>Bottom</VerticalAlign>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -1692,6 +1762,17 @@
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="FolioRelacionado">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="CveConceptoMovRelacionado">
|
||||
<DataType>Integer</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<EmbeddedImages>
|
||||
<EmbeddedImage Name="compuproveedores">
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -386,6 +386,15 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property RealizarMovimientoVirtual As Boolean
|
||||
Get
|
||||
Return If(IsNothing(ViewState("RealizarMovimientoVirtual")), False, CBool(ViewState("RealizarMovimientoVirtual")))
|
||||
End Get
|
||||
Set
|
||||
ViewState("RealizarMovimientoVirtual") = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
@@ -837,6 +846,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
CveAlmacenApartado = -1
|
||||
CveAlmacenDevolucionProveedor = -1
|
||||
RealizarTraspasoAlmacenDevolucion = False
|
||||
RealizarMovimientoVirtual = False
|
||||
BtnGuardar.Enabled = True
|
||||
CargaAlmacenes(-1)
|
||||
|
||||
@@ -889,6 +899,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
'CargaAlmacenes(-1)
|
||||
|
||||
RealizarTraspasoAlmacenDevolucion = False
|
||||
RealizarMovimientoVirtual = False
|
||||
CveAlmacenDevolucionProveedor = -1
|
||||
|
||||
Dim ObjCompras As New ClsCompras
|
||||
@@ -960,6 +971,12 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
CveAlmacenDevolucionProveedor = DtRecepcion.Rows(0)("CveAlmacenDevolucionProveedor").ToString.ToEntero
|
||||
|
||||
'SI ES MOTOBATERIA NO GENERA MOVIMIENTO VIRTUAL
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" AndAlso (DtRecepcion.COUNT("CveTamaño", "CveTamaño > 0 AND CveTamaño <> 16") > 0 OrElse CargaSoloUsados) Then
|
||||
RealizarMovimientoVirtual = True
|
||||
DivVirtualAdvertencia.Visible = True
|
||||
End If
|
||||
|
||||
If TipoMovimiento = 2 AndAlso CveAlmacenDevolucionProveedor > 0 Then
|
||||
RealizarTraspasoAlmacenDevolucion = True
|
||||
|
||||
@@ -1077,10 +1094,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
DivCodigoSeriePS.Visible = False
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
DivVirtualAdvertencia.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
BtnGuardar.Visible = False
|
||||
@@ -2657,7 +2670,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
|
||||
'VIRTUAL
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
If RealizarMovimientoVirtual Then
|
||||
|
||||
Dim DtPSVirtual As New DataTable("DtTamanios")
|
||||
|
||||
@@ -2772,7 +2785,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Else
|
||||
|
||||
'VIRTUAL
|
||||
If CveTipoCompra = 9 And UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
If CveTipoCompra = 9 And RealizarMovimientoVirtual Then
|
||||
|
||||
Dim DtPSVirtual As New DataTable("DtTamanios")
|
||||
DtPSVirtual.Columns.Add(New DataColumn("CvePS", GetType(Integer)))
|
||||
|
||||
@@ -771,6 +771,11 @@ Partial Class Clientes
|
||||
VerificaVinculacion()
|
||||
UpAccionesCRM.Update()
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(309) Then
|
||||
DeshabilitarDatosClienteCajas()
|
||||
End If
|
||||
|
||||
End If
|
||||
'End If
|
||||
HlEvento.Visible = True
|
||||
@@ -901,17 +906,33 @@ Partial Class Clientes
|
||||
End Function
|
||||
Private Function PermiteEliminar() As Boolean
|
||||
Return UsuarioActual.TienePermisoProceso(194)
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub DeshabilitarDatosClienteCajas()
|
||||
DdlSubProyecto.Enabled = False
|
||||
DdlPrecioLista.Enabled = False
|
||||
DdlClasificacion.Enabled = False
|
||||
DdlVendedor.Enabled = False
|
||||
DdlCorporativo.Enabled = False
|
||||
ChkRequiereOC.Enabled = False
|
||||
ChkEsDistribuidor.Enabled = False
|
||||
DdlTipoCliente.Enabled = False
|
||||
TxtCorreoEntregaCompras.Enabled = False
|
||||
TxtCorreoEntregaAlmacen.Enabled = False
|
||||
ChkCargoUsado.Enabled = False
|
||||
ChkBonificacionUsado.Enabled = False
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "C A R G A S"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub CreaDtPago()
|
||||
DtPagos = New DataTable
|
||||
DtPagos.Columns.Add("CveTipoMovimiento", GetType(String))
|
||||
|
||||
@@ -412,7 +412,7 @@
|
||||
<td>
|
||||
<asp:UpdatePanel ID="UPPVentas" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:DropDownList ID="DropDownList1" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="100%">
|
||||
<asp:DropDownList ID="DdlVendedor" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="100%">
|
||||
<asp:ListItem Selected="true" Text="Sin asignar" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</ContentTemplate>
|
||||
@@ -557,7 +557,7 @@
|
||||
<tr align="left">
|
||||
<td><b>Vendedor:</b> </td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlVendedor" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="150px">
|
||||
<asp:DropDownList ID="DdlVendedorEstatus" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="150px">
|
||||
<asp:ListItem Selected="true" Text="Sin asignar" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
|
||||
@@ -3668,6 +3668,73 @@ Partial Class PV
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(1) Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPorcentajeProductos(CveCliente) Then
|
||||
Dim PrecioAplicado = ObjPS.DtResultados.FiltraParametros($"CvePS = {CvePSParametro}").FiltroPrimeroValor("PrecioA").ToDouble
|
||||
If PrecioAplicado > 0 Then
|
||||
PrecioSugerido = PrecioAplicado
|
||||
End If
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(404).ToEntero > 0 Then 'cuando el valor es 10.- secuencia Cliente/Sucursal, 20 - sucursal/cliente
|
||||
Dim TipoPrecioLista As Integer = UsuarioActual.Empresa.Funcionalidad(404).ToEntero
|
||||
' si es 10. primero el cliente
|
||||
Dim CvePrecioListaPS As Integer
|
||||
Dim PorcentajePrecio As Double = 0
|
||||
|
||||
If TipoPrecioLista = 10 Then
|
||||
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
||||
If CvePrecioListaPS <= 0 Then
|
||||
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
|
||||
End If
|
||||
Else
|
||||
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
|
||||
If CvePrecioListaPS <= 0 Then
|
||||
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
||||
End If
|
||||
End If
|
||||
|
||||
If CvePrecioListaPS > 0 Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
||||
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDouble
|
||||
PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDouble
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
End If
|
||||
|
||||
If PrecioSugerido = 0 Then
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
||||
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
||||
If CostoPS = 0 Then CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
||||
ObjInventarios.Dispose()
|
||||
If CostoPS > 0 And PorcentajePrecio > 0 Then
|
||||
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
|
||||
End If
|
||||
End If
|
||||
'CvePrecioLista = CvePrecioListaPS
|
||||
End If
|
||||
|
||||
|
||||
'Dim ObjClasificaciones As New ClsClasificaciones
|
||||
'If ObjClasificaciones.GetClasificaciones() Then
|
||||
' PrecioBaseCosto = ObjClasificaciones.DtResultados.FiltroPrimeroValor("PrecioBaseCosto", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveClasificacion = {drPS("CveClasificacion")}").ToDecimal
|
||||
'End If
|
||||
|
||||
If PrecioSugerido > 0 Then
|
||||
Dim PrecioBaseCosto As Decimal = 0
|
||||
PrecioBaseCosto = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=drPS("CveClasificacion").ToString().ToEntero()).FiltroPrimeroValor("PrecioBaseCosto", "").ToDecimal
|
||||
|
||||
If PrecioBaseCosto > 0 Then
|
||||
PrecioSugerido = PrecioSugerido * ((PrecioBaseCosto / 100) + 1)
|
||||
End If
|
||||
End If
|
||||
|
||||
If PrecioSugerido > 0 Then
|
||||
TxtPrecio.Text = PrecioSugerido.FormatoNumero()
|
||||
RegistraScript("$get('LblPrecio1').innerText = formato_numero(" + PrecioSugerido.ToString + ", 2, '.', ',');")
|
||||
@@ -5591,13 +5658,13 @@ Partial Class PV
|
||||
|
||||
Private Sub BtnAgregarCliente_Click(sender As Object, e As EventArgs) Handles BtnAgregarCliente.Click
|
||||
Dim CvePrecioLista As Integer = -1
|
||||
If DdlSubProyectoDatos.SelectedValue.ToEntero > 0 Then
|
||||
Dim Dr As DataRow = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa).Rows(0)
|
||||
If Dr IsNot Nothing Then
|
||||
If Dr("CvePrecioLista").ToString.ToEntero > 0 Then
|
||||
CvePrecioLista = Dr("CvePrecioLista").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
If DdlSubProyectoDatos.SelectedValue.ToEntero > 0 Then
|
||||
Dim Dr As DataRow = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa).Rows(0)
|
||||
If Dr IsNot Nothing Then
|
||||
If Dr("CvePrecioLista").ToString.ToEntero > 0 Then
|
||||
CvePrecioLista = Dr("CvePrecioLista").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim ObjCliente As New ClsClientes
|
||||
@@ -5803,18 +5870,18 @@ Partial Class PV
|
||||
'ObjPS.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub RecargaGlobalCliente()
|
||||
'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDTCliente)
|
||||
'Hilo.Start()
|
||||
GeneraGlobalDTCliente()
|
||||
End Sub
|
||||
Private Sub RecargaGlobalCliente()
|
||||
'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDTCliente)
|
||||
'Hilo.Start()
|
||||
GeneraGlobalDTCliente()
|
||||
End Sub
|
||||
Private Sub GeneraGlobalDTCliente()
|
||||
GlobalDTCliente(UsuarioActual.CveEmpresa) = Nothing
|
||||
'Dim Objclientes As New ClsClientes
|
||||
'If Objclientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1, Estatus:=-1, TipoCliente:=-1) Then
|
||||
' Application("GlobalDTCliente") = Objclientes.DtResultados
|
||||
'End If
|
||||
'Objclientes.Dispose()
|
||||
GlobalDTCliente(UsuarioActual.CveEmpresa) = Nothing
|
||||
'Dim Objclientes As New ClsClientes
|
||||
'If Objclientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1, Estatus:=-1, TipoCliente:=-1) Then
|
||||
' Application("GlobalDTCliente") = Objclientes.DtResultados
|
||||
'End If
|
||||
'Objclientes.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -6815,7 +6882,7 @@ Partial Class PV
|
||||
MarcaPS = ObjPS.DtResultados.FiltroPrimeroValor("Marca", String.Format("CvePS = {0}", DdlPSAjuste.SelectedValue.ToEntero))
|
||||
End If
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim DtDatos As New DataTable
|
||||
|
||||
|
||||
@@ -2030,17 +2030,18 @@ Partial Class ProductosyServicios
|
||||
#Region "SELECTED INDEX CHANGE"
|
||||
Public Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClasificacion.SelectedIndexChanged
|
||||
If DdlClasificacion.SelectedValue.ToEntero > 0 Then
|
||||
If Not CveSATPS > 0 Or CveSATPS = 46920 Then
|
||||
If Me.CvePS <= 0 AndAlso (Not CveSATPS > 0 Or CveSATPS = 46920) Then
|
||||
Dim Dr = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0)
|
||||
|
||||
DdlSATPS.SelectedValue = Dr("CveSATPS").ToString
|
||||
DdlSATPS.SelectedText = Dr("SATClaveProductoServicio").ToString
|
||||
|
||||
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
|
||||
VerificaRequiereSerieLote()
|
||||
If Dr IsNot Nothing Then
|
||||
DdlSATPS.SelectedValue = Dr("CveSATPS").ToString
|
||||
DdlSATPS.SelectedText = Dr("SATClaveProductoServicio").ToString
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
|
||||
VerificaRequiereSerieLote()
|
||||
End If
|
||||
' CargaClasificacionesDetalles()
|
||||
End If
|
||||
|
||||
@@ -2157,7 +2157,7 @@ Partial Class Ventas
|
||||
DdlSubProyectoDatos.Enabled = False
|
||||
BtnEmitirImprimir.Visible = False
|
||||
BtnCrearApartirDe.Visible = True
|
||||
If UsuarioActual.TienePermisoProceso(302) Then BtnEditar.Visible = True
|
||||
If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue <> "Cot" Then BtnEditar.Visible = True
|
||||
'DdlEstatus.Enabled = True
|
||||
|
||||
DivFechaAnticipoCliente.Visible = True
|
||||
@@ -7081,7 +7081,7 @@ Partial Class Ventas
|
||||
Dim DtNoEncontrados As DataTable = TmpDT.FiltraParametros("ISNULL(SATClaveProdServ,'') = '01010101' ")
|
||||
If DtNoEncontrados IsNot Nothing AndAlso DtNoEncontrados.Rows.Count > 0 Then
|
||||
Dim StrNoEncontrados As New StringBuilder
|
||||
StrNoEncontrados.Append("Los siguientes productos no tiene asignado la clave Producto SAT o Unidad Medida SAT<br/><br/>")
|
||||
StrNoEncontrados.Append("Los siguientes productos no existen en el catálogo del SAT<br/><br/>")
|
||||
For Each drt As DataRow In DtNoEncontrados.Rows
|
||||
StrNoEncontrados.AppendFormat("{0} <br/>", drt("CodigoPS"))
|
||||
Next
|
||||
@@ -12625,7 +12625,7 @@ Partial Class Ventas
|
||||
|
||||
Try
|
||||
' BytesPdfCotizacion(CveVenta)
|
||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(CveVenta, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF))
|
||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(CveVenta, DdlTipoComprobante.SelectedValue.ToString(), LocalSerieFolio, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF))
|
||||
Hilo.Start()
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió error al mandar Mail", ex)
|
||||
@@ -12667,7 +12667,7 @@ Partial Class Ventas
|
||||
|
||||
Try
|
||||
' BytesPdfCotizacion(CveVenta)
|
||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(CveVenta, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF))
|
||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(CveVenta, DdlTipoComprobante.SelectedValue.ToString(), LocalSerieFolio, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF))
|
||||
Hilo.Start()
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió error al mandar Mail", ex)
|
||||
@@ -12706,7 +12706,7 @@ Partial Class Ventas
|
||||
|
||||
Try
|
||||
' BytesPdfCotizacion(CveVenta)
|
||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(CveVenta, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF))
|
||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(CveVenta, DdlTipoComprobante.SelectedValue.ToString(), LocalSerieFolio, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF))
|
||||
Hilo.Start()
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió error al mandar Mail", ex)
|
||||
@@ -17757,7 +17757,7 @@ Partial Class Ventas
|
||||
#End Region
|
||||
|
||||
#Region " MANDA CORREO "
|
||||
Private Sub MandaMails(CveVenta As Integer, EnviarFactura As Boolean, XML As String, PDF As String)
|
||||
Private Sub MandaMails(CveVenta As Integer, TipoDocto As String, SerieFolio As String, EnviarFactura As Boolean, XML As String, PDF As String)
|
||||
|
||||
Dim ObjMail As New ClsSisMail()
|
||||
Dim ObjVentas As New ClsVentas
|
||||
@@ -17770,12 +17770,12 @@ Partial Class Ventas
|
||||
|
||||
Dim TipoComprobante = ""
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.ToString() = "Ing" Then TipoComprobante = "Factura"
|
||||
If DdlTipoComprobante.SelectedValue.ToString() = "Egs" Then TipoComprobante = "Nota de Crédito"
|
||||
If DdlTipoComprobante.SelectedValue.ToString() = "Dev" Then TipoComprobante = "Nota de Devolución"
|
||||
If DdlTipoComprobante.SelectedValue.ToString() = "Rem" Then TipoComprobante = "Remisión"
|
||||
If DdlTipoComprobante.SelectedValue.ToString() = "Cot" Then TipoComprobante = "Cotización"
|
||||
If DdlTipoComprobante.SelectedValue.ToString() = "Ant" Then TipoComprobante = "Anticipo"
|
||||
If TipoDocto = "Ing" Then TipoComprobante = "Factura"
|
||||
If TipoDocto = "Egs" Then TipoComprobante = "Nota de Crédito"
|
||||
If TipoDocto = "Dev" Then TipoComprobante = "Nota de Devolución"
|
||||
If TipoDocto = "Rem" Then TipoComprobante = "Remisión"
|
||||
If TipoDocto = "Cot" Then TipoComprobante = "Cotización"
|
||||
If TipoDocto = "Ant" Then TipoComprobante = "Anticipo"
|
||||
|
||||
If UsuarioActual.Empresa.PlantillaMailVenta.Trim.Length > 0 Then
|
||||
Cuerpo = UsuarioActual.Empresa.PlantillaMailVenta
|
||||
@@ -17785,14 +17785,14 @@ Partial Class Ventas
|
||||
Cuerpo = Cuerpo.Replace("{""Fecha""}", TxtFecha.Text)
|
||||
Cuerpo = Cuerpo.Replace("{""Total""}", TxtTotal.Text)
|
||||
Cuerpo = Cuerpo.Replace("{""FechaVencimiento""}", TxtFechaPago.Text)
|
||||
Cuerpo = Cuerpo.Replace("{""SerieFolio""}", ObjFactura.SerieFolio)
|
||||
Cuerpo = Cuerpo.Replace("{""SerieFolio""}", SerieFolio)
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.AsuntoPlantillaMailVenta.Trim.Length > 0 Then
|
||||
Asunto = UsuarioActual.Empresa.AsuntoPlantillaMailVenta
|
||||
Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante)
|
||||
Asunto = Asunto.Replace("{""Sucursal""}", DdlSubProyectoDatos.SelectedItem.Text)
|
||||
Asunto = Asunto.Replace("{""SerieFolio""}", ObjFactura.SerieFolio)
|
||||
Asunto = Asunto.Replace("{""SerieFolio""}", SerieFolio)
|
||||
End If
|
||||
|
||||
If Not EnviarFactura Then
|
||||
@@ -24749,6 +24749,10 @@ Partial Class Ventas
|
||||
|
||||
GvImpuestosLocales2.Enabled = True
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||
DdlIVA.Visible = True
|
||||
End If
|
||||
|
||||
BloqueaCondiconesPago()
|
||||
|
||||
UpPS.Update()
|
||||
@@ -26541,6 +26545,11 @@ Partial Class Ventas
|
||||
#Region "PORCENTAJE IVA"
|
||||
Protected Sub DdlIVA_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
If Not CveVenta > 0 Or EsCreaApartirDe Or CveDevolucion > 0 Then RecalculaIVA()
|
||||
|
||||
If ModalidadEdicion AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||
RecalculaIVA()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub RecalculaIVA()
|
||||
|
||||
Reference in New Issue
Block a user