-
This commit is contained in:
@@ -2021,7 +2021,7 @@ Public Class ClsClientes
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateEstatusPedido(CveVenta As Integer, CveEstatusFactura As Integer, Dias As Integer, CveUsuario As Integer) As Boolean
|
||||
Public Function UpdateEstatusPedido(CveVenta As Integer, CveEstatusFactura As Integer, Dias As Integer, CveUsuario As Integer, Optional CveRemision As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_ClienteVentasPedidoEstatusUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -2029,6 +2029,7 @@ Public Class ClsClientes
|
||||
.Add("@CveEstatusFactura", SqlDbType.Int).Value = CveEstatusFactura
|
||||
.Add("@Dias", SqlDbType.Int).Value = Dias
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveRemision", SqlDbType.Int).Value = CveRemision
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -2037,28 +2038,28 @@ Public Class ClsClientes
|
||||
OnError("Ocurrió un error al actualizar el pedido del cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
'Public Function UpdateFechaPedido(CveVenta As Integer, DiasCredito As Integer) As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
' DataAdapter("PA_Vta_ClienteVentasPedidoFechaUpdate")
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
' .Add("@DiasCredito", SqlDbType.Int).Value = DiasCredito
|
||||
' End With
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
' Retorno = True
|
||||
' Catch ex As Exception
|
||||
' OnError("Ocurrió un error al actualizar la fecha del pedido del cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
' End Try
|
||||
' Return Retorno
|
||||
'End Function
|
||||
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
'Public Function UpdateFechaPedido(CveVenta As Integer, DiasCredito As Integer) As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
' DataAdapter("PA_Vta_ClienteVentasPedidoFechaUpdate")
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
' .Add("@DiasCredito", SqlDbType.Int).Value = DiasCredito
|
||||
' End With
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
' Retorno = True
|
||||
' Catch ex As Exception
|
||||
' OnError("Ocurrió un error al actualizar la fecha del pedido del cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
' End Try
|
||||
' Return Retorno
|
||||
'End Function
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "A P L I C A C I O N"
|
||||
Public Function AddClienteApp(Cliente As MCliente) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -68,6 +68,11 @@ Public Class ClsContabilidad
|
||||
Public Property ValorPolizaDescuadre As Integer
|
||||
Public Property MensajePolizaDescuadre As String
|
||||
Public Property ValorDiferencia As String
|
||||
|
||||
Public Property SeUnifico As Boolean = False
|
||||
Public Property YaEstabaUnifida As Boolean = False
|
||||
Public Property EstaContabilizada As Boolean = False
|
||||
|
||||
#End Region
|
||||
|
||||
Public Function IniciaTransacSQL() As SqlTransaction
|
||||
@@ -756,16 +761,30 @@ Public Class ClsContabilidad
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
SeUnifico = False
|
||||
YaEstabaUnifida = False
|
||||
EstaContabilizada = False
|
||||
|
||||
DataAdapter("PA_Conta_PrePolizaUnificacion")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
||||
.Add("@CvePrePolizaVieja", SqlDbType.Int).Value = CvePrePolizaVieja
|
||||
.Add("@SeUnifico", SqlDbType.Bit).Direction = ParameterDirection.Output
|
||||
.Add("@YaEstabaUnifida", SqlDbType.Bit).Direction = ParameterDirection.Output
|
||||
.Add("@EstaContabilizada", SqlDbType.Bit).Direction = ParameterDirection.Output
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
SeUnifico = Boolean.Parse(SqlAdapter.SelectCommand.Parameters("@SeUnifico").Value.ToString)
|
||||
YaEstabaUnifida = Boolean.Parse(SqlAdapter.SelectCommand.Parameters("@YaEstabaUnifida").Value.ToString)
|
||||
EstaContabilizada = Boolean.Parse(SqlAdapter.SelectCommand.Parameters("@EstaContabilizada").Value.ToString)
|
||||
|
||||
Retorno = True
|
||||
|
||||
Catch ex1 As SqlException
|
||||
OnError("Ocurrió un error al actualizar la Poliza Original", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
Catch ex As Exception
|
||||
@@ -773,6 +792,7 @@ Public Class ClsContabilidad
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
Public Function PrePolizaSimplificacion(CvePrePoliza As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
@@ -3332,7 +3332,7 @@ Namespace Modelos
|
||||
|
||||
'SI ES FACTURACION DE UNA REMISION CANCELAMOS, TRASPASAMOS SALDOS Y AGREGAMOS EVENTO A LA BITACORA
|
||||
'NO DEBE ENTRAR SI SE ESTA CANCELANDO UNA FACTURA
|
||||
If ValorMultiplicador <> -1 AndAlso (DtRemisionesRelacionadas IsNot Nothing AndAlso DtRemisionesRelacionadas.Rows.Count > 0) OrElse ObjFactura.RemisionesLista.Count > 0 Then
|
||||
If ValorMultiplicador <> -1 AndAlso ((DtRemisionesRelacionadas IsNot Nothing AndAlso DtRemisionesRelacionadas.Rows.Count > 0) OrElse ObjFactura.RemisionesLista.Count > 0) Then
|
||||
|
||||
If Not ObjFactura.TipoDocto.Contiene("Ing", "Ant") Then
|
||||
ErrorPrepoliza = True
|
||||
@@ -7503,7 +7503,7 @@ Namespace Modelos
|
||||
HttpContext.Current.Application("GlobalDTSeccionAlmacen") = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTAlmacen(CveEmpresa As Integer) As DataTable
|
||||
Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
@@ -7516,7 +7516,7 @@ Namespace Modelos
|
||||
Dim Str As New StringBuilder
|
||||
Str.Append("1=1 AND ")
|
||||
If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa)
|
||||
' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
|
||||
If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
|
||||
If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus)
|
||||
If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen)
|
||||
|
||||
@@ -7528,6 +7528,23 @@ Namespace Modelos
|
||||
Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa)
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
'Get
|
||||
|
||||
' Dim Str As New StringBuilder
|
||||
' Str.Append("1=1 AND ")
|
||||
' If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa)
|
||||
' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
|
||||
' If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus)
|
||||
' If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen)
|
||||
|
||||
' Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacen"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
||||
' GlobalDTAlmacen = Dv.ToTable
|
||||
' Dv.Dispose()
|
||||
|
||||
'End Get
|
||||
'Set(value As DataTable)
|
||||
' Application("GlobalDTAlmacen") = value
|
||||
'End Set
|
||||
End Property
|
||||
Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1) As DataTable
|
||||
Get
|
||||
|
||||
@@ -9341,7 +9341,11 @@ Partial Class Compras_Compras
|
||||
ErrorMovtosCxP = 1
|
||||
Alert("No se pudo unificar la prepoliza", TipoMensaje.MsgError)
|
||||
End If
|
||||
CvePrePolizaNueva = CvePrepolizaPadre 'para que se unifique siempre la prepolizanueva
|
||||
|
||||
If ObjConta.SeUnifico Then
|
||||
CvePrePolizaNueva = CvePrepolizaPadre 'para que se unifique siempre la prepolizanueva
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'Simplificacion de PrePolizas
|
||||
|
||||
@@ -1281,10 +1281,10 @@ Partial Class PopUpVerFactura
|
||||
'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()
|
||||
If CveConcepto.Contiene(3, 26) AndAlso ObjInventarios.DtResultados.FiltroPrimeroValor("CveMovimientoVirtual").ToEntero() > 0 Then
|
||||
If CveConcepto.Contiene(2, 3, 26, 27) AndAlso ObjInventarios.DtResultados.FiltroPrimeroValor("CveMovimientoVirtual").ToEntero() > 0 Then
|
||||
FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioVirtual")
|
||||
CveConceptoMovtoRelacionado = 37
|
||||
ElseIf CveConcepto = 37 Then
|
||||
ElseIf CveConcepto.Contiene(36, 37) Then
|
||||
FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioRelacionado")
|
||||
CveConceptoMovtoRelacionado = 3
|
||||
End If
|
||||
@@ -1413,7 +1413,7 @@ Partial Class PopUpVerFactura
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Inicial.rdlc", DtMovimientos, params, String.Format("Inventario Inicial - {0}", Folio), RDSName:="DsInventarios")
|
||||
End If
|
||||
|
||||
Case 2, 32, 33 ' E N T R A D A S
|
||||
Case 2, 32, 33, 36 ' E N T R A D A S
|
||||
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/Entradas.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
@@ -1501,7 +1501,39 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
|
||||
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Entradas.rdlc", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio), 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
|
||||
Dim concepto As String = ""
|
||||
If CveConcepto.Contiene(2, 32, 33) Then
|
||||
concepto = "ENTRADA DE ALMACÉN"
|
||||
ElseIf CveConcepto.Contiene(36) Then
|
||||
concepto = "ENTRADA VIRTUAL"
|
||||
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("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("Folio", Folio))
|
||||
params.Add(New ReportParameter("FacturadoA", NombreCliente))
|
||||
params.Add(New ReportParameter("FacturaProveedor", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("SerieFolio").ToString, "")))
|
||||
params.Add(New ReportParameter("Descuentos", If(CveCompra > 0 AndAlso dr IsNot Nothing, (dr("Descuentos").ToString.ToDouble).FormatoNumero(2), "")))
|
||||
params.Add(New ReportParameter("IVA", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("IVA").ToString.FormatoNumero(2), "")))
|
||||
params.Add(New ReportParameter("Total", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("Total").ToString.FormatoNumero(2), "")))
|
||||
'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("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString()))
|
||||
params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado))
|
||||
|
||||
ImprimirPDF(String.Format("{0}Formatos/Entradas.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
Else
|
||||
|
||||
params.Add(New ReportParameter("TipoDocumento", String.Format("Compras {0}", Almacen)))
|
||||
params.Add(New ReportParameter("Fecha", If(CveCompra > 0, dr("Fecha").ToString.ToDate.ToShortDateString, "")))
|
||||
params.Add(New ReportParameter("Folio", Folio.ToString))
|
||||
@@ -2255,7 +2287,9 @@ Partial Class PopUpVerFactura
|
||||
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString()))
|
||||
params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado))
|
||||
End If
|
||||
|
||||
|
||||
|
||||
@@ -434,6 +434,9 @@
|
||||
</TablixMember>
|
||||
<TablixMember>
|
||||
<Group Name="Details" />
|
||||
<TablixMembers>
|
||||
<TablixMember />
|
||||
</TablixMembers>
|
||||
</TablixMember>
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
@@ -465,8 +468,8 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>1.39318cm</Top>
|
||||
<Left>0.25984cm</Left>
|
||||
<Top>1.99643cm</Top>
|
||||
<Left>0.22809cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>11.36782cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
@@ -480,8 +483,40 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox28">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>= "Total: " & FormatNumber(Sum(Fields!Cantidad.Value, "DsInventarios"),0)</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox28</rd:DefaultName>
|
||||
<Top>1.33674cm</Top>
|
||||
<Left>0.22985cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>2.5cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Height>0.82291in</Height>
|
||||
<Height>1.05208in</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>8.1198in</Width>
|
||||
|
||||
@@ -2882,6 +2882,12 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 140 AndAlso TipoMovimiento = 3 Then
|
||||
If Not ObjCompras.UpdateEstatusAlmacen(CveCompraSurtir, 2, UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
'AGREGA BITACORA TEMPORAL
|
||||
If DtBitacora IsNot Nothing AndAlso DtBitacora.Rows.Count > 0 Then
|
||||
ErrorMovInv = GuardaBitacoraTemporal(ObjBitacora, CveMovimiento)
|
||||
|
||||
@@ -2077,6 +2077,8 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Me.ObjRemisionNC.TipoDocumento = "Remisión"
|
||||
'NUM 1- CARGO 2- BONIFICACION
|
||||
Me.ObjRemisionNC.Num1 = 1
|
||||
'NUM 0- USADO 1- AJUSTE/GARANTIA
|
||||
Me.ObjRemisionNC.Num2 = RblUsadosAjuste.SelectedValue.ToEntero()
|
||||
Me.ObjRemisionNC.Alfa1 = ""
|
||||
Me.ObjRemisionNC.Alfa2 = ""
|
||||
Me.ObjRemisionNC.Alfa3 = ""
|
||||
@@ -2093,8 +2095,6 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Me.ObjRemisionNC.SetCliente()
|
||||
Me.ObjRemisionNC.CveAlmacen = -1
|
||||
|
||||
|
||||
|
||||
Dim ObjCliente As New ClsClientes
|
||||
If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
@@ -2133,6 +2133,9 @@ Partial Class Inventarios_RecepcionUsados
|
||||
'DETALLES
|
||||
Me.ObjRemisionNC.DtDetalle = CreaDTDetalleRNC()
|
||||
|
||||
'GUARDAR AJUSTES
|
||||
Me.ObjRemisionNC.DtAjustes = TmpDTAjustes
|
||||
|
||||
'VALIDA PROMOCIONES Y EXISTENCIAS
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetPromocionesPS(-1, Now, CveSubProyecto, Me.ObjRemisionNC.CveCliente, Me.ObjRemisionNC.CveVendedor, UsuarioActual.CveEmpresa) Then
|
||||
@@ -2517,37 +2520,6 @@ Partial Class Inventarios_RecepcionUsados
|
||||
TmpDTAjustes.Columns.Add("CveVenta", GetType(Integer))
|
||||
TmpDTAjustes.Columns.Add("PUFactura", GetType(Double))
|
||||
End Sub
|
||||
Private Sub CargaAjusteDetalle()
|
||||
Dim Dr As DataRow = Nothing
|
||||
IndexAjuste = 0
|
||||
For Each Dr2 As DataRow In TmpDTAjustes.Rows
|
||||
If Dr2("ConsecutivoVenta").ToString.ToEntero = ConsecutivoVenta Then
|
||||
Dr = Dr2
|
||||
Exit For
|
||||
End If
|
||||
IndexAjuste += 1
|
||||
Next
|
||||
If Dr IsNot Nothing Then
|
||||
IndexAjuste = TmpDTAjustes.Rows.IndexOf(Dr)
|
||||
DdlFolioGarantia.SelectedValueExist(Dr("CveFolioGarantia").ToString)
|
||||
TxtConsecutivoAjuste.Text = Dr("Consecutivo").ToString
|
||||
TxtCodEnsamble.Text = Dr("CodigoEnsamble").ToString
|
||||
DdlTipoUso.SelectedValueExist(Dr("CveTipoUso").ToString)
|
||||
TxtCodLinea.Text = Dr("CodigoLinea").ToString
|
||||
TxtCodInspeccion.Text = Dr("CodigoInspeccion").ToString
|
||||
TxtMesesUso.Text = Dr("Meses").ToString
|
||||
DdlTipoDefecto.SelectedValueExist(Dr("CveTipoDefecto").ToString)
|
||||
TxtPorcentajeAjuste.Text = Dr("PorcentajeAjuste").ToString
|
||||
TxtPoliza.Text = Dr("NumPoliza").ToString
|
||||
TxtImporteAjuste.Text = Dr("Importe").ToString
|
||||
'DdlFacturas.SelectedValueExist(Dr("CveVenta").ToString)
|
||||
CargaPSAjuste()
|
||||
DdlPSAjuste.SelectedValue = (Dr("CvePS").ToString)
|
||||
TxtFechaAjuste.Text = Dr("FechaAjuste").ToString.ToDate.ToShortDateString
|
||||
txtPrecio.Text = Dr("PUFactura").ToString.ToDecimal.FormatoNumero(2)
|
||||
txtPrecio.Enabled = Not Dr("CveVenta").ToString.ToEntero > 0
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CargaPSAjuste()
|
||||
DdlPSAjuste.setEsWebService(True)
|
||||
End Sub
|
||||
@@ -2569,8 +2541,6 @@ Partial Class Inventarios_RecepcionUsados
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
End If
|
||||
|
||||
' PrecioSugerido = drPS("Precio").ToString.ToDecimal
|
||||
Dim PS As String = drPS("PS").ToString
|
||||
CveMarca = drPS("CveMarca").ToString.ToEntero
|
||||
CveClasificacion = drPS("CveClasificacion").ToString.ToEntero
|
||||
@@ -2646,11 +2616,71 @@ Partial Class Inventarios_RecepcionUsados
|
||||
If ObjAcumuladores.GetNuevoConsecutivoFolio(DdlFolioGarantia.SelectedValue.ToEntero) Then
|
||||
Dim resultado As String = ObjAcumuladores.DtResultados.FiltroPrimeroValor("NuevoConsecutivo")
|
||||
TxtConsecutivoAjuste.Text = (resultado.ToEntero + 1).ToString
|
||||
UpAjuste.Update()
|
||||
End If
|
||||
ObjAcumuladores.Dispose()
|
||||
|
||||
Dim FolioGarantia As MFolioGarantiaMensaje = ValidaFolioGarantia(DdlPSAjuste.SelectedValue.ToEntero(), DdlFolioGarantia.SelectedValue.ToEntero())
|
||||
|
||||
If Not FolioGarantia.Valido Then
|
||||
Alert($"El folio de garantía no es valido.<br/> Clasificacion del Producto:{FolioGarantia.ClasificacionPS}.<br/>Tipo Folio:{FolioGarantia.TipoFolio}", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function ValidaFolioGarantia(CvePS As Integer, CveFolioGarantia As Integer) As MFolioGarantiaMensaje
|
||||
Dim Retorno As New MFolioGarantiaMensaje
|
||||
|
||||
Dim Valido As Boolean = False
|
||||
Dim TipoFolio As String = ""
|
||||
Dim ListaClasificacionesPermitidas As New List(Of Integer)
|
||||
|
||||
Dim ObjAcumuladores As New ClsAcumuladores
|
||||
If ObjAcumuladores.FoliosGarantiaGet(CveFolioGarantia, UsuarioActual.CveEmpresa, Area:=-1) AndAlso ObjAcumuladores.DtResultados.Rows.Count > 0 Then
|
||||
Dim Row As DataRow = ObjAcumuladores.DtResultados.Rows(0)
|
||||
TipoFolio = Row("tipoFolio").ToString().ToUpper()
|
||||
End If
|
||||
ObjAcumuladores.Dispose()
|
||||
|
||||
Dim CveClasificacionPS As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("CveClasificacion").ToEntero()
|
||||
Dim ClasificacionPS As String = GlobalDTClasificaciones(CveEmpresa:=UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionPS).FiltroPrimeroValor("Clasificacion").ToString()
|
||||
Select Case TipoFolio
|
||||
Case "GENERAL"
|
||||
'20520 ACUM. AUTOMOTRIZ
|
||||
'20522 ACUM. ESPECIALES
|
||||
'20513 ACUM. ESTANDAR
|
||||
'20521 ACUM. PESADO
|
||||
'20512 ACUM. PREMIUM
|
||||
'20514 ACUM. VALUE
|
||||
'20229 Acumulador
|
||||
ListaClasificacionesPermitidas.Add(20520) 'ACUM. AUTOMOTRIZ
|
||||
ListaClasificacionesPermitidas.Add(20522) 'ACUM. ESPECIALES
|
||||
ListaClasificacionesPermitidas.Add(20513) 'ACUM. ESTANDAR
|
||||
ListaClasificacionesPermitidas.Add(20521) 'ACUM. PESADO
|
||||
ListaClasificacionesPermitidas.Add(20512) 'ACUM. PREMIUM
|
||||
ListaClasificacionesPermitidas.Add(20514) 'ACUM. VALUE
|
||||
ListaClasificacionesPermitidas.Add(20229) 'Acumulador
|
||||
Case "OPTIMA"
|
||||
'20511 ACUM. OPTIMA
|
||||
ListaClasificacionesPermitidas.Add(20511) 'ACUM. OPTIMA
|
||||
Case "MOTOBATERIA"
|
||||
'20517 MOTOBATERIAS
|
||||
ListaClasificacionesPermitidas.Add(20517) 'MOTOBATERIAS
|
||||
End Select
|
||||
|
||||
If ListaClasificacionesPermitidas.Contains(CveClasificacionPS) Then
|
||||
Valido = True
|
||||
End If
|
||||
|
||||
Retorno.CvePS = CvePS
|
||||
Retorno.CveFolioGarantia = CveFolioGarantia
|
||||
Retorno.CveClasificacionPS = CveClasificacionPS
|
||||
Retorno.ClasificacionPS = ClasificacionPS
|
||||
Retorno.TipoFolio = TipoFolio
|
||||
Retorno.Valido = Valido
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Protected Sub CargaTipoDeUso()
|
||||
DdlTipoUso.Items.Clear()
|
||||
DdlTipoUso.DataSource = GlobalDTAcumTiposUso.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
||||
@@ -2729,7 +2759,45 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
UpAjuste.Update()
|
||||
End Sub
|
||||
Private Sub GuardaAjuste()
|
||||
|
||||
Dim CargoAnterior As Double = 0
|
||||
Dim CargoActual As Double = 0
|
||||
|
||||
Dim Row As DataRow = Nothing
|
||||
Row = TmpDTAjustes.NewRow
|
||||
Row("CveFolioGarantia") = DdlFolioGarantia.SelectedValue.ToEntero
|
||||
Row("CveTipoUso") = DdlTipoUso.SelectedValue.ToEntero
|
||||
Row("CveTipoDefecto") = DdlTipoDefecto.SelectedValue.ToEntero
|
||||
Row("CodigoEnsamble") = TxtCodEnsamble.Text
|
||||
Row("CodigoLinea") = TxtCodLinea.Text
|
||||
Row("CodigoInspeccion") = TxtCodInspeccion.Text
|
||||
Row("Consecutivo") = TxtConsecutivoAjuste.Text
|
||||
Row("FechaAjuste") = TxtFechaAjuste.Text.ToDate
|
||||
Row("Meses") = TxtMesesUso.Text.ToEntero
|
||||
Row("PorcentajeAjuste") = TxtPorcentajeAjuste.Text.ToDouble
|
||||
Row("NumPoliza") = TxtPoliza.Text
|
||||
Row("Importe") = TxtImporteAjuste.Text.ToDouble
|
||||
Row("ConsecutivoVenta") = TxtConsecutivoAjuste.Text.ToEntero()
|
||||
Row("CvePS") = DdlPSAjuste.SelectedValue
|
||||
Row("PS") = DdlPSAjuste.SelectedText
|
||||
Row("CveVenta") = -1
|
||||
Row("PUFactura") = TxtPUFactura.Text.ToDouble
|
||||
Row("Cantidad") = 1
|
||||
Dim CveUM As Integer = -1
|
||||
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
|
||||
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).Rows(0)
|
||||
If Dr IsNot Nothing Then
|
||||
CveUM = Dr("CveUnidadMedida").ToString.ToEntero
|
||||
CargoAnterior = Dr("Cargo").ToString.ToDouble
|
||||
End If
|
||||
End If
|
||||
Row("CveUM") = CveUM
|
||||
Row("CveVentaDetalle") = -1
|
||||
TmpDTAjustes.Rows.Add(Row)
|
||||
|
||||
|
||||
End Sub
|
||||
Protected Sub BtnCalculaMesesUso_Click(sender As Object, e As EventArgs)
|
||||
CalculaMesesUso()
|
||||
End Sub
|
||||
@@ -2759,6 +2827,14 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
Protected Sub BtnAgregarProductoAjuste_Click(sender As Object, e As EventArgs)
|
||||
Dim CvePS As Integer = DdlPSAjuste.SelectedValue.ToEntero
|
||||
|
||||
Dim FolioGarantia As MFolioGarantiaMensaje = ValidaFolioGarantia(CvePS, DdlFolioGarantia.SelectedValue.ToEntero())
|
||||
|
||||
If Not FolioGarantia.Valido Then
|
||||
Alert($"El folio de garantía no es valido.<br/> Clasificacion del Producto:{FolioGarantia.ClasificacionPS}.<br/>Tipo Folio:{FolioGarantia.TipoFolio}", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
Dim CveTamaño As Integer = -1
|
||||
If ObjPS.GetPS(CvePS, -1, UsuarioActual.CveEmpresa) Then
|
||||
@@ -2783,6 +2859,8 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Alert("No se pudo cargar el producto", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
|
||||
GuardaAjuste()
|
||||
End Sub
|
||||
|
||||
Protected Sub CargarDescuento()
|
||||
@@ -2799,4 +2877,14 @@ Partial Class Inventarios_RecepcionUsados
|
||||
InicializaClientes(ChkClientesTodos.Checked)
|
||||
End Sub
|
||||
|
||||
Partial Class MFolioGarantiaMensaje
|
||||
Public Property CvePS As Integer
|
||||
Public Property CveClasificacionPS As Integer
|
||||
Public Property ClasificacionPS As String
|
||||
Public Property CveFolioGarantia As Integer
|
||||
Public Property TipoFolio As String
|
||||
|
||||
Public Property Valido As Boolean
|
||||
End Class
|
||||
|
||||
End Class
|
||||
|
||||
@@ -171,16 +171,8 @@
|
||||
<asp:Label ID="LtlAlmacen" runat="server" Text='<%# Eval("TipoAlmacen")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Existencia" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlExist" runat="server" Text='<%# Eval("Existencia", "{0:#,###.##}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlTotal" runat="server" Text='<%# Eval("Total", "{0:#,##0.00}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Existencia" DataField="Existencia" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -4,6 +4,8 @@ Option Explicit On
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports System.IO
|
||||
|
||||
Partial Class Inventarios_RepAlmacen
|
||||
Inherits ClsPaginas
|
||||
@@ -76,10 +78,10 @@ Partial Class Inventarios_RepAlmacen
|
||||
End Sub
|
||||
|
||||
#Region "I M P R I M I R <i class='fa fa-print'></i>"
|
||||
Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
'GVAlmacen.ExportToExcel("RepFacturas_" & Now.ToShortDateString())
|
||||
GenerarPDF("EXCEL")
|
||||
|
||||
Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
|
||||
GenerarPDF("EXCEL")
|
||||
|
||||
End Sub
|
||||
Private Sub GenerarPDF(Optional Formato As String = "PDF")
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
|
||||
@@ -146,8 +146,8 @@
|
||||
|
||||
<div id="DivTransitorio" style="display: none;">
|
||||
<div class="row">
|
||||
|
||||
<asp:Label AssociatedControlID="TxtResponsable" ID="LblResponsable" runat="server" Text="Responsable:" CssClass="col-md-2"></asp:Label>
|
||||
|
||||
<asp:Label AssociatedControlID="TxtResponsable" ID="LblResponsable" runat="server" Text="Responsable:" CssClass="col-md-2"></asp:Label>
|
||||
<asp:Panel CssClass="col-md-2" ID="divResponsable" runat="server">
|
||||
<asp:TextBox runat="server" Text="" CssClass="form-control" ID="TxtResponsable" />
|
||||
</asp:Panel>
|
||||
@@ -156,8 +156,8 @@
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlAlmacenTransitorio" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label AssociatedControlID="ChkEmitirTimbrado" runat="server" Text="Emitir Timbrado:" ID="LblEmitirTimbrado" CssClass="col-md-2 " Visible="false"></asp:Label>
|
||||
<asp:Panel id="DivEmitirTimbrado" runat="server" Visible="false" class="col-md-2">
|
||||
<asp:Label AssociatedControlID="ChkEmitirTimbrado" runat="server" Text="Emitir Timbrado:" ID="LblEmitirTimbrado" CssClass="col-md-2 " Visible="false"></asp:Label>
|
||||
<asp:Panel ID="DivEmitirTimbrado" runat="server" Visible="false" class="col-md-2">
|
||||
<asp:CheckBox ID="ChkEmitirTimbrado" runat="server" CssClass="chksino" Text=" " />
|
||||
</asp:Panel>
|
||||
|
||||
@@ -166,9 +166,9 @@
|
||||
|
||||
<div id="DivTransitorio2" class="rowpadding" runat="server" visible="false">
|
||||
<div class="row">
|
||||
|
||||
<asp:Label AssociatedControlID="TxtGastoIndirecto" Visible="false" id="LblGastoIndirecto" runat="server" Text="Gasto Indirecto:" CssClass="col-md-2"></asp:Label>
|
||||
<div class="col-md-2" id="divGastoIndirecto" Visible="false" runat="server">
|
||||
|
||||
<asp:Label AssociatedControlID="TxtGastoIndirecto" Visible="false" ID="LblGastoIndirecto" runat="server" Text="Gasto Indirecto:" CssClass="col-md-2"></asp:Label>
|
||||
<div class="col-md-2" id="divGastoIndirecto" visible="false" runat="server">
|
||||
<asp:TextBox runat="server" Text="" CssClass="form-control" ID="TxtGastoIndirecto" />
|
||||
</div>
|
||||
<label class="col-md-2">Chofer:</label>
|
||||
@@ -194,7 +194,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-1">Unidad:</label>
|
||||
<div class="col-md-1 ">
|
||||
<asp:HyperLink runat="server" ID="HplNuevaUnidad" CssClass ="btn btn-sm btn-primary" NavigateUrl="#" data-toggle="modal" data-target="#DivAgregarNuevoCamion"><i class='fa fa-plus'></i></asp:HyperLink>
|
||||
<asp:HyperLink runat="server" ID="HplNuevaUnidad" CssClass="btn btn-sm btn-primary" NavigateUrl="#" data-toggle="modal" data-target="#DivAgregarNuevoCamion"><i class='fa fa-plus'></i></asp:HyperLink>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList runat="server" ID="DdlUnidadCamion" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="Placa"></asp:DropDownList>
|
||||
@@ -391,7 +391,7 @@
|
||||
|
||||
<th width="160px">Comandos</th>
|
||||
</tr>
|
||||
</thea>
|
||||
</thea>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td align="center">
|
||||
@@ -621,7 +621,6 @@
|
||||
</div>
|
||||
<br />
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UPDivCodigoSeriePSRecepcion" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row" runat="server" id="DivCodigoSeriePSRecepcion" visible="false">
|
||||
@@ -647,46 +646,47 @@
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpDatosRecepcion" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatosRecepcion" DataKeyNames="CveMovimiento,CveUM,CvePS,PS,CveAF,CodigoBarras,CveAlmacen,CveAlmacenDestino,AplicaSerie,CveMovimientoDetalle,PU,CveAlmacenSalida,CveMovimientoSalida,Serie,Lote,FechaCaducidad,Cantidad, GastoIndirectoSalida, Importe,Codigo" runat="server" AutoGenerateColumns="False" EmptyDataText="No hay movimientos pendientes" ToolTip="Listado de Movimientos" CssClass="table table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
|
||||
<%--<HeaderTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:UpdatePanel runat="server" ID="UpDatosRecepcion" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatosRecepcion" DataKeyNames="CveMovimiento,CveUM,CvePS,PS,CveAF,CodigoBarras,CveAlmacen,CveAlmacenDestino,AplicaSerie,CveMovimientoDetalle,PU,CveAlmacenSalida,CveMovimientoSalida,Serie,Lote,FechaCaducidad,Cantidad, GastoIndirectoSalida, Importe,Codigo" runat="server" AutoGenerateColumns="False" EmptyDataText="No hay movimientos pendientes" ToolTip="Listado de Movimientos" CssClass="table table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
|
||||
<%--<HeaderTemplate>
|
||||
<input type="checkbox" id="ChkAll" onclick="CheckAll();" />
|
||||
</HeaderTemplate>--%>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="Chk" Checked="true" runat="server"></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidad" Visible="false" Width="60px" runat="server" Text="0"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Disponible" DataField="Cantidad" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-Width="40%" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Caducidad" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-Width="15%" />
|
||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true">
|
||||
</asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="Chk" Checked="true" runat="server"></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidad" Visible="false" Width="60px" runat="server" Text="0"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Disponible" DataField="Cantidad" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-Width="40%" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Caducidad" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-Width="15%" />
|
||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true">
|
||||
</asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
@@ -859,7 +859,13 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
'Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacenOrigen.SelectedValue}").ToEntero()
|
||||
|
||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, 24).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyectoOrigen}").ToEntero()
|
||||
Dim CveAlmacenVirtual As Integer = -1
|
||||
If TipoAlmacenOrigen = 27 Then
|
||||
CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa, 25).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyectoOrigen}").ToEntero()
|
||||
Else
|
||||
CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa, 24).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyectoOrigen}").ToEntero()
|
||||
End If
|
||||
|
||||
|
||||
CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtual, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/V", CveMovimientoRelacionado:=CveMovimientoSalida)
|
||||
FolioVirtualSalida = ObjInventario.Folio
|
||||
@@ -919,9 +925,15 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
'Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacenDestino.SelectedValue}").ToEntero()
|
||||
|
||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $" CveTipoAlmacen =24 AND CveSubProyecto={CveSubProyectoDestino }").ToEntero()
|
||||
'SI EL ALMACEN DESTINO ES DE APOPYO LOGISTICO EL ALMACEN VIRTUAL DEBE SER DE APOYO LOGISTICO
|
||||
Dim CveAlmacenVirtual As Integer = -1
|
||||
If TipoAlmacenDestino = 27 Then
|
||||
CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $" CveTipoAlmacen =25 AND CveSubProyecto={CveSubProyectoDestino }").ToEntero()
|
||||
Else
|
||||
CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $" CveTipoAlmacen =24 AND CveSubProyecto={CveSubProyectoDestino }").ToEntero()
|
||||
End If
|
||||
|
||||
CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtual, 36, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="TA/S3")
|
||||
CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtual, 36, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveMovimientoRelacionado:=CveMovimientoEntrada, Modulo:="TA/S3")
|
||||
FolioVirtualEntrada = ObjInventario.Folio
|
||||
Dim dtvirtual As DataTable = Nothing
|
||||
|
||||
@@ -1024,12 +1036,12 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
MensajeAlert.AppendFormat("<br/> Folio de Salida: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", FolioSalida, CveMovimientoSalida)
|
||||
MensajeAlert.AppendFormat("<br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalida)))
|
||||
If CveMovimientoVirtualSalida > 0 Then MensajeAlert.AppendFormat("<br/>Folio: <a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{2}</a> <a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Salida Virtual</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtualSalida)), CveMovimientoVirtualSalida, FolioVirtualSalida)
|
||||
If CveMovimientoVirtualSalida > 0 Then MensajeAlert.AppendFormat("<br/>Folio Virtual: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{2}</a></b> <br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Salida Virtual</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtualSalida)), CveMovimientoVirtualSalida, FolioVirtualSalida)
|
||||
|
||||
If Not ChkTransitorio.Checked Then
|
||||
MensajeAlert.AppendFormat("<br/><br/> Folio de Entrada: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", FolioEntrada, CveMovimientoEntrada)
|
||||
MensajeAlert.AppendFormat("<br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoEntrada)))
|
||||
If CveMovimientoVirtualEntrada > 0 Then MensajeAlert.AppendFormat("<br/>Folio: <a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{2}</a> <a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Entrada Virtual</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtualEntrada)), CveMovimientoVirtualEntrada, FolioVirtualEntrada)
|
||||
If CveMovimientoVirtualEntrada > 0 Then MensajeAlert.AppendFormat("<br/>Folio Virtual: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{2}</a></b> <br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Entrada Virtual</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtualEntrada)), CveMovimientoVirtualEntrada, FolioVirtualEntrada)
|
||||
|
||||
End If
|
||||
|
||||
@@ -1669,7 +1681,15 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero}").ToEntero()
|
||||
|
||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $" CveTipoAlmacen =24 AND CveSubProyecto={CveSubProyecto}").ToEntero()
|
||||
Dim CveTipoAlmacenOrigen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero).FiltroPrimeroValor("CveTipoAlmacen").ToEntero()
|
||||
|
||||
'SI EL ALMACEN ORIGEN ES DE APOPYO LOGISTICO EL ALMACEN VIRTUAL DEBE SER DE APOYO LOGISTICO
|
||||
Dim CveAlmacenVirtual As Integer = -1
|
||||
If CveTipoAlmacenOrigen = 27 Then
|
||||
CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $" CveTipoAlmacen =25 AND CveSubProyecto={CveSubProyecto}").ToEntero()
|
||||
Else
|
||||
CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $" CveTipoAlmacen =24 AND CveSubProyecto={CveSubProyecto}").ToEntero()
|
||||
End If
|
||||
|
||||
If CveAlmacenVirtual > 0 Then
|
||||
|
||||
@@ -1736,7 +1756,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim Mensaje As StringBuilder = New StringBuilder
|
||||
Mensaje.AppendFormat("Se realizo correctamente la cancelación. <br/> Folio de Entrada: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", Folio, CveMovimientoEntrada)
|
||||
Mensaje.AppendFormat("<br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoEntrada))) 'onclick='ImprimirTraslado()'
|
||||
If CveMovimientoVirtualEntrada > 0 Then Mensaje.AppendFormat("<br/>Folio: <a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{2}</a> <a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Entrada Virtual</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtualEntrada)), CveMovimientoVirtualEntrada, FolioVirtualEntrada)
|
||||
If CveMovimientoVirtualEntrada > 0 Then Mensaje.AppendFormat("<br/>Folio Virtual: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{2}</a></b> <br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Entrada Virtual</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtualEntrada)), CveMovimientoVirtualEntrada, FolioVirtualEntrada)
|
||||
|
||||
Alert(Mensaje.ToString, TipoMensaje.MsgInformacion)
|
||||
|
||||
@@ -1885,7 +1905,12 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacenRecepcion.SelectedValue}").ToEntero()
|
||||
|
||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $" CveTipoAlmacen =24 AND CveSubProyecto={CveSubProyecto}").ToEntero()
|
||||
Dim CveAlmacenVirtual As Integer = -1
|
||||
If TipoAlmacenDestino = 27 Then
|
||||
CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $" CveTipoAlmacen =25 AND CveSubProyecto={CveSubProyecto}").ToEntero()
|
||||
Else
|
||||
CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $" CveTipoAlmacen =24 AND CveSubProyecto={CveSubProyecto}").ToEntero()
|
||||
End If
|
||||
|
||||
If CveAlmacenVirtual > 0 Then
|
||||
|
||||
@@ -1989,7 +2014,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim Mensaje As StringBuilder = New StringBuilder
|
||||
Mensaje.AppendFormat("Se realizo correctamente la recepción. <br/> Folio de Entrada: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", Folio, CveMovimientoSalida)
|
||||
Mensaje.AppendFormat("<br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalida))) 'onclick='ImprimirTraslado()'
|
||||
If CveMovimientoVirtualEntrada > 0 Then Mensaje.AppendFormat("<br/><br/>Virtual<a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{2}</a><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtualEntrada)), CveMovimientoVirtualEntrada, FolioVirtualEntrada) 'onclick='ImprimirTraslado()'
|
||||
If CveMovimientoVirtualEntrada > 0 Then Mensaje.AppendFormat("<br/><br/><br/>Folio Virtual <b> <a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{2}</a> </b> <br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtualEntrada)), CveMovimientoVirtualEntrada, FolioVirtualEntrada) 'onclick='ImprimirTraslado()'
|
||||
|
||||
|
||||
Alert(Mensaje.ToString, TipoMensaje.MsgInformacion)
|
||||
|
||||
@@ -167,9 +167,17 @@
|
||||
<asp:LinkButton ID="BtnPDFHistorial" OnClick="LbPDFHistorial_Click" runat="server" ToolTip="Imprime PDF del Historial" Style="float: right;"><i class="fa fa-print" style="margin-right: 10px;"></i></asp:LinkButton>
|
||||
<asp:LinkButton ID="BtnExcelHistorial" OnClick="BtnExcelHistorial_Click" runat="server" ToolTip="Descarga Excel del Historial" Style="float: right;"><i style="margin-right: 10px;" class='fa fa-download'></i></asp:LinkButton>
|
||||
</legend>
|
||||
<div class="text-right" style="margin-top: -5px!important">
|
||||
<input type="text" id="TxtBusqueda1" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda1','{0}')", GvCxP.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="FiltrarTabla('TxtBusqueda1','C_Tab_TabCxP_GvCxPPanelItem')" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
<div style="width:100%" class="row">
|
||||
<div class="col-md-1 text-left" style="margin-top: -5px!important;width:50%">
|
||||
<div class="row" runat="server" id="DivSucursalCxC">
|
||||
<asp:Label runat="server" ID="lblSucursal" Text="Sucursal:" class="col-sm-1" Style="Width:85px" />
|
||||
<asp:DropDownList ID="DdlProveedorSucursalCxCSucursal" DataValueField="CveProveedorSucursal" DataTextField="ProveedorSucursal" AutoPostBack="true" runat="server" OnSelectedIndexChanged="DdlProveedorSucursalCxCSucursal_Changed" CssClass="col-md-1 form-control input-sm input-small" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1 text-right" style="margin-top: -5px!important;width:50%" runat="server" id="DivSearch">
|
||||
<input type="text" id="TxtBusqueda1" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda1','{0}')", GvCxP.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="FiltrarTabla('TxtBusqueda1','C_Tab_TabCxP_GvCxPPanelItem')" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UPPCxP" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -185,6 +193,7 @@
|
||||
<asp:BoundField DataField="PorPagado" DataFormatString="{0:N2}%" HeaderText="% Abonado" />
|
||||
<asp:BoundField DataField="Saldo" DataFormatString="{0:N2}" HeaderText="Saldo" />
|
||||
<asp:BoundField DataField="PorXPagar" DataFormatString="{0:N2}%" HeaderText="% A Cobrar" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="AplicaNC" HeaderText="Aplica NC" ItemStyle-Width="10%" />
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
@@ -205,9 +214,17 @@
|
||||
<asp:LinkButton ID="BtnPDFPagadas" OnClick="LbPDFPagadas_Click" runat="server" ToolTip="Imprime PDF del Historial" Style="float: right;"><i class="fa fa-print" style="margin-right: 10px;"></i></asp:LinkButton>
|
||||
<asp:LinkButton ID="BtnExcelPagadas" OnClick="BtnExcelPagadas_Click" runat="server" ToolTip="Descarga Excel del Historial" Style="float: right;"><i style="margin-right: 10px;" class='fa fa-download'></i></asp:LinkButton>
|
||||
</legend>
|
||||
<div class="text-right">
|
||||
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvCxPHistorial.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvCxPHistorial.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
<div style="width:100%" class="row">
|
||||
<div class="col-md-1 text-left" style="margin-top: -5px!important;width:50%">
|
||||
<%--<div class="row" runat="server" id="DivProveedorSucursalHistorial">
|
||||
<asp:Label runat="server" ID="lblProveedorSucursalHistorial" Text="Sucursal: " class="col-md-1" Style="Width:85px" />
|
||||
<asp:DropDownList ID="DdlProveedorSucursalPHistorial" DataValueField="CveProveedorSucursal" DataTextField="ProveedorSucursal" runat="server" CssClass="col-md-1 form-control input-sm input-small" />
|
||||
</div>--%>
|
||||
</div>
|
||||
<div class="col-md-1 text-right" style="width:100%">
|
||||
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvCxPHistorial.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvCxPHistorial.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UPGvCxPHistorial" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -223,6 +240,7 @@
|
||||
<asp:BoundField DataField="PorPagado" DataFormatString="{0:N2}%" HeaderText="% Abonado" />
|
||||
<asp:BoundField DataField="FolioPago" DataFormatString="{0:N2}" HeaderText="Cheque" />
|
||||
<asp:BoundField DataField="PorXPagar" DataFormatString="{0:N2}%" HeaderText="% A Cobrar" />
|
||||
<asp:BoundField DataField="AplicaNC" HeaderText="Aplica NC" ItemStyle-Width="10%"/>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
@@ -250,6 +250,7 @@ Partial Class Portal_PortalProveedor
|
||||
|
||||
If Not IsPostBack Then
|
||||
CveProveedor = UsuarioActual.CveProveedor
|
||||
CargarSucursalesProveedor()
|
||||
Session("FileUpload") = ""
|
||||
ViewState("Orden") = ""
|
||||
|
||||
@@ -355,7 +356,7 @@ Partial Class Portal_PortalProveedor
|
||||
Private Sub CargaCxP()
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
|
||||
If ObjMovtos.GetCxPProveedor(CveProveedor, "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1) Then
|
||||
If ObjMovtos.GetCxPProveedor(CveProveedor, "-1", "-1", -1, -1, -1, -1, -1, -1, DdlProveedorSucursalCxCSucursal.SelectedValue.ToEntero, -1) Then
|
||||
|
||||
GvCxP.DataSource = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'", "Moneda,OrdenVencimiento, FechaVencimiento")
|
||||
|
||||
@@ -1813,9 +1814,34 @@ Partial Class Portal_PortalProveedor
|
||||
|
||||
CargaDocumentacion()
|
||||
objDocumentos.Dispose()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
#Region "Sucursales del proveedor"
|
||||
Private Sub CargarSucursalesProveedor()
|
||||
Dim ObjProveedores As New ClsCompProveedores()
|
||||
If ObjProveedores.GetSucursales(CveProveedor, UsuarioActual.CveEmpresa) Then
|
||||
If ObjProveedores.DtResultados.Rows.Count > 0 Then
|
||||
DdlProveedorSucursalCxCSucursal.DataSource = ObjProveedores.DtResultados
|
||||
'DdlProveedorSucursalPHistorial.DataSource = ObjProveedores.DtResultados
|
||||
Else
|
||||
DivSucursalCxC.Visible = False
|
||||
DivSearch.Attributes("style") = "width:100%"
|
||||
'DivProveedorSucursalHistorial.Visible = False
|
||||
End If
|
||||
End If
|
||||
ObjProveedores.Dispose()
|
||||
DdlProveedorSucursalCxCSucursal.DataBind()
|
||||
'DdlProveedorSucursalPHistorial.DataBind()
|
||||
DdlProveedorSucursalCxCSucursal.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
'DdlProveedorSucursalPHistorial.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlProveedorSucursalCxCSucursal_Changed(sender As Object, e As EventArgs)
|
||||
CargaCxP()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
@@ -321,7 +321,7 @@ Partial Class Sistemas_PopUpAddUsuario
|
||||
If Row.DataKey("CveProcesoAcceso") <> "" Then
|
||||
'checo si el permiso que tiene es del rol, de ser así, nada más actualizo los denegados
|
||||
If Row.DataKey("Permitir") = "" AndAlso Row.FCCheckBox("ChkD").Checked OrElse Row.DataKey("Permitir") = "0" AndAlso Row.FCCheckBox("ChkD").Checked = False Then
|
||||
If Not ObjUsuarios.UpdateUsuariosProcesos(CveUsuario, Row.DataKey("CveProceso").ToEntero, Not Row.FCCheckBox("ChkD").Checked) Then
|
||||
If Not ObjUsuarios.UpdateUsuariosProcesos(CveUsuario, Row.DataKey("CveProceso").ToEntero, Not Row.FCCheckBox("ChkD").Checked, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
HuboError = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -329,7 +329,7 @@ Partial Class Sistemas_PopUpAddUsuario
|
||||
Else
|
||||
'permisos que el rol, no le está otorgando, y serán únicos para el usuario
|
||||
If Row.DataKey("Permitir") = "" AndAlso Row.FCCheckBox("ChkP").Checked OrElse Row.DataKey("Permitir") = "1" AndAlso Row.FCCheckBox("ChkP").Checked = False Then
|
||||
If Not ObjUsuarios.UpdateUsuariosProcesos(CveUsuario, Row.DataKey("CveProceso").ToEntero, Row.FCCheckBox("ChkP").Checked) Then
|
||||
If Not ObjUsuarios.UpdateUsuariosProcesos(CveUsuario, Row.DataKey("CveProceso").ToEntero, Row.FCCheckBox("ChkP").Checked, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
HuboError = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -340,7 +340,7 @@ Partial Class Sistemas_PopUpAddUsuario
|
||||
If Row.DataKey("CveProcesoAcceso") <> "" Then
|
||||
'checo si el permiso que tiene es del rol, de ser así, nada más actualizo los denegados
|
||||
If Row.DataKey("Permitir") = "" AndAlso Row.FCCheckBox("ChkDenegar").Checked OrElse Row.DataKey("Permitir") = "0" AndAlso Row.FCCheckBox("ChkDenegar").Checked = False Then
|
||||
If Not ObjUsuarios.UpdateUsuariosProcesos(CveUsuario, Row.DataKey("CveProceso").ToEntero, Not Row.FCCheckBox("ChkDenegar").Checked) Then
|
||||
If Not ObjUsuarios.UpdateUsuariosProcesos(CveUsuario, Row.DataKey("CveProceso").ToEntero, Not Row.FCCheckBox("ChkDenegar").Checked, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
HuboError = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -348,7 +348,7 @@ Partial Class Sistemas_PopUpAddUsuario
|
||||
Else
|
||||
'permisos que el rol, no le está otorgando, y serán únicos para el usuario
|
||||
If Row.DataKey("Permitir") = "" AndAlso Row.FCCheckBox("ChkPermitir").Checked OrElse Row.DataKey("Permitir") = "1" AndAlso Row.FCCheckBox("ChkPermitir").Checked = False Then
|
||||
If Not ObjUsuarios.UpdateUsuariosProcesos(CveUsuario, Row.DataKey("CveProceso").ToEntero, Row.FCCheckBox("ChkPermitir").Checked) Then
|
||||
If Not ObjUsuarios.UpdateUsuariosProcesos(CveUsuario, Row.DataKey("CveProceso").ToEntero, Row.FCCheckBox("ChkPermitir").Checked, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
HuboError = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -490,7 +490,7 @@ Partial Class Sistemas_PopUpAddUsuario
|
||||
If Row.DataKey("CveProcesoAcceso") <> "" Then
|
||||
'checo si el permiso que tiene es del rol, de ser así, nada más actualizo los denegados
|
||||
If Row.DataKey("Permitir") = "" AndAlso Row.FCCheckBox("ChkD").Checked OrElse Row.DataKey("Permitir") = "0" AndAlso Row.FCCheckBox("ChkD").Checked = False Then
|
||||
If Not ObjUsuarios.UpdateUsuariosProcesos(CveUsuario, Row.DataKey("CveProceso").ToEntero, Not Row.FCCheckBox("ChkD").Checked) Then
|
||||
If Not ObjUsuarios.UpdateUsuariosProcesos(CveUsuario, Row.DataKey("CveProceso").ToEntero, Not Row.FCCheckBox("ChkD").Checked, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
HuboError = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -498,7 +498,7 @@ Partial Class Sistemas_PopUpAddUsuario
|
||||
Else
|
||||
'permisos que el rol, no le está otorgando, y serán únicos para el usuario
|
||||
If Row.DataKey("Permitir") = "" AndAlso Row.FCCheckBox("ChkP").Checked OrElse Row.DataKey("Permitir") = "1" AndAlso Row.FCCheckBox("ChkP").Checked = False Then
|
||||
If Not ObjUsuarios.UpdateUsuariosProcesos(CveUsuario, Row.DataKey("CveProceso").ToEntero, Row.FCCheckBox("ChkP").Checked) Then
|
||||
If Not ObjUsuarios.UpdateUsuariosProcesos(CveUsuario, Row.DataKey("CveProceso").ToEntero, Row.FCCheckBox("ChkP").Checked, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
HuboError = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
BIN
TareasProgramadas/FormatosThalamus/FormatoAlmacenes.xlsx
Normal file
BIN
TareasProgramadas/FormatosThalamus/FormatoAlmacenes.xlsx
Normal file
Binary file not shown.
BIN
TareasProgramadas/FormatosThalamus/FormatoClientes.xlsx
Normal file
BIN
TareasProgramadas/FormatosThalamus/FormatoClientes.xlsx
Normal file
Binary file not shown.
BIN
TareasProgramadas/FormatosThalamus/FormatoProductos.xlsx
Normal file
BIN
TareasProgramadas/FormatosThalamus/FormatoProductos.xlsx
Normal file
Binary file not shown.
BIN
TareasProgramadas/FormatosThalamus/FormatoVentas.xlsx
Normal file
BIN
TareasProgramadas/FormatosThalamus/FormatoVentas.xlsx
Normal file
Binary file not shown.
@@ -10,7 +10,8 @@ using System.Web.Services.Protocols;
|
||||
using GemBox.Spreadsheet;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using ClosedXML;
|
||||
|
||||
public class TareasJam : IHttpHandler
|
||||
{
|
||||
@@ -63,6 +64,13 @@ public class TareasJam : IHttpHandler
|
||||
string RutaClientes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Clientes{DateTime.Now.ToString("yyyyMMdd")}.xlsx";
|
||||
string RutaAlmacenes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Almacenes{DateTime.Now.ToString("yyyyMMdd")}.xlsx";
|
||||
|
||||
|
||||
string FormatoVentas = $@"{ HttpContext.Current.Server.MapPath("~") }\TareasProgramadas\FormatosThalamus\FormatoVentas.xlsx";
|
||||
string FormatoClientes = $@"{ HttpContext.Current.Server.MapPath("~") }\TareasProgramadas\FormatosThalamus\FormatoClientes.xlsx";
|
||||
string FormatoAlmacenes = $@"{ HttpContext.Current.Server.MapPath("~") }\TareasProgramadas\FormatosThalamus\FormatoAlmacenes.xlsx";
|
||||
string FormatoProductos = $@"{ HttpContext.Current.Server.MapPath("~") }\TareasProgramadas\FormatosThalamus\FormatoProductos.xlsx";
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
if (File.Exists(RutaProductos))
|
||||
@@ -91,14 +99,14 @@ public class TareasJam : IHttpHandler
|
||||
}
|
||||
|
||||
|
||||
string FTPServer = "ftp://127.0.0.1/";
|
||||
string TFPUsr = "Toor";
|
||||
string FTPPass = "agj-3500";
|
||||
//string FTPServer = "ftp://127.0.0.1/";
|
||||
//string TFPUsr = "Toor";
|
||||
//string FTPPass = "agj-3500";
|
||||
|
||||
|
||||
//string FTPServer = "ftp://us2.hostedftp.com";
|
||||
//string TFPUsr = "agrojam";
|
||||
//string FTPPass = "A12345678";
|
||||
string FTPServer = "ftp://us2.hostedftp.com";
|
||||
string TFPUsr = "agrojam";
|
||||
string FTPPass = "A12345678";
|
||||
|
||||
bool ErrorProceso = false;
|
||||
|
||||
@@ -158,7 +166,7 @@ public class TareasJam : IHttpHandler
|
||||
try
|
||||
{
|
||||
|
||||
DTProductos.Columns[0].ColumnName = "Código Producto Interno ";
|
||||
DTProductos.Columns[0].ColumnName = "Código Producto Interno";
|
||||
DTProductos.Columns[1].ColumnName = "Nombre del Producto";
|
||||
DTProductos.Columns[2].ColumnName = "Presentación";
|
||||
DTProductos.AcceptChanges();
|
||||
@@ -196,9 +204,6 @@ public class TareasJam : IHttpHandler
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DataTable dtCloned = DTVentas.Clone();
|
||||
dtCloned.Columns[3].DataType = typeof(string);
|
||||
|
||||
@@ -210,7 +215,7 @@ public class TareasJam : IHttpHandler
|
||||
DTVentas = dtCloned;
|
||||
foreach (DataRow dRow in DTVentas.Rows)
|
||||
{
|
||||
string tmpDate = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd");//.ToDate().ToString("yyyy/MM/dd").ToDate();
|
||||
string tmpDate = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd");
|
||||
dRow[3] = tmpDate;
|
||||
}
|
||||
|
||||
@@ -228,106 +233,98 @@ public class TareasJam : IHttpHandler
|
||||
DTAlmacenes = dtCloned;
|
||||
foreach (DataRow dRow in DTAlmacenes.Rows)
|
||||
{
|
||||
//DateTime tmpDate = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd").ToDate();
|
||||
string tmpDate = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd");
|
||||
dRow[3] = tmpDate;
|
||||
}
|
||||
DTAlmacenes.AcceptChanges();
|
||||
|
||||
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
SBLog.AppendLine("<b>Error al renombrar columnas</b>");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (!ErrorProceso)
|
||||
{
|
||||
|
||||
int contador = 0;
|
||||
|
||||
SpreadsheetInfo.SetLicense(Extensiones.ModExtensiones.SerialGemBoxSpreadsheet());
|
||||
//////////////////////////////////////////////////////////////
|
||||
int count = 2;
|
||||
var wbVentas = new ClosedXML.Excel.XLWorkbook(FormatoVentas);
|
||||
var wsVentas = wbVentas.Worksheet(1);
|
||||
|
||||
var workbookAlmacenes = new ExcelFile();
|
||||
var worksheetAlmacenes = workbookAlmacenes.Worksheets.Add("Almacenes");
|
||||
worksheetAlmacenes.InsertDataTable(DTAlmacenes, new InsertDataTableOptions()
|
||||
foreach (DataRow DRow in DTVentas.Rows)
|
||||
{
|
||||
ColumnHeaders = true,
|
||||
StartRow = 0
|
||||
});
|
||||
wsVentas.Cell(count, 1).Value = "'" + DRow["systemId"].ToString();
|
||||
wsVentas.Cell(count, 2).Value = DRow["Branch"].ToString();
|
||||
wsVentas.Cell(count, 3).Value = "'" + DRow["Code"].ToString();
|
||||
wsVentas.Cell(count, 4).Value = "'" + DRow["Sale Date"].ToString();
|
||||
wsVentas.Cell(count, 5).Value = DRow["Quantity"].ToString();
|
||||
wsVentas.Cell(count, 6).Value = DRow["Amount"].ToString();
|
||||
wsVentas.Cell(count, 7).Value = DRow["Transaction ID"].ToString();
|
||||
count++;
|
||||
}
|
||||
wbVentas.SaveAs(RutaVentas);
|
||||
|
||||
var wbAlmacenes = new ClosedXML.Excel.XLWorkbook(FormatoAlmacenes);
|
||||
var wsAlmacenes = wbAlmacenes.Worksheet(1);
|
||||
|
||||
count = 2;
|
||||
|
||||
foreach (DataRow DRow in DTAlmacenes.Rows)
|
||||
{
|
||||
|
||||
//contador++;
|
||||
//var cell = worksheetAlmacenes.Cells[contador, 3];
|
||||
//cell.Style.WrapText = true;
|
||||
|
||||
|
||||
wsAlmacenes.Cell(count, 1).Value = "'" + DRow["Code"].ToString();
|
||||
wsAlmacenes.Cell(count, 2).Value = DRow["Quantity"].ToString();
|
||||
wsAlmacenes.Cell(count, 3).Value = DRow["Description"].ToString();
|
||||
wsAlmacenes.Cell(count, 4).Value = "'" + DRow["Stock Date"].ToString();
|
||||
count++;
|
||||
}
|
||||
//worksheetAlmacenes.Columns[3].Style.NumberFormat = "yyyy/MM/dd";
|
||||
workbookAlmacenes.Save(RutaAlmacenes);
|
||||
wbAlmacenes.SaveAs(RutaAlmacenes);
|
||||
|
||||
var workbookProductos = new ExcelFile();
|
||||
var worksheetProductos = workbookProductos.Worksheets.Add("Productos");
|
||||
worksheetProductos.InsertDataTable(DTProductos, new InsertDataTableOptions()
|
||||
var wbAClientes = new ClosedXML.Excel.XLWorkbook(FormatoClientes);
|
||||
var wsClientes = wbAClientes.Worksheet(1);
|
||||
|
||||
count = 2;
|
||||
|
||||
foreach (DataRow DRow in DTClientes.Rows)
|
||||
{
|
||||
ColumnHeaders = true,
|
||||
StartRow = 0
|
||||
});
|
||||
workbookProductos.Save(RutaProductos);
|
||||
|
||||
var workbookVentas = new ExcelFile();
|
||||
var worksheetVentas = workbookVentas.Worksheets.Add("Ventas");
|
||||
worksheetVentas.InsertDataTable(DTVentas, new InsertDataTableOptions()
|
||||
{
|
||||
ColumnHeaders = true,
|
||||
StartRow = 0
|
||||
});
|
||||
|
||||
|
||||
contador = 0;
|
||||
foreach (DataRow DRow in DTVentas.Rows)
|
||||
{
|
||||
|
||||
//var value = DateTime.Now;
|
||||
contador++;
|
||||
|
||||
var cell = worksheetVentas.Cells[contador, 3];
|
||||
cell.Style.WrapText = false;
|
||||
cell.Style.IsTextVertical = false;
|
||||
cell.Style.Font.Italic = false;
|
||||
|
||||
//cell.Style.NumberFormat = "h:mm AM/PM"; // "yyyy-MM-dd";
|
||||
//cell.SetValue(value);
|
||||
|
||||
wsClientes.Cell(count, 1).Value = "'" + DRow["systemId"].ToString();
|
||||
wsClientes.Cell(count, 2).Value = DRow["fiscalIdMex"].ToString();
|
||||
wsClientes.Cell(count, 3).Value = DRow["fiscalName"].ToString();
|
||||
wsClientes.Cell(count, 4).Value = DRow["email"].ToString();
|
||||
wsClientes.Cell(count, 5).Value = DRow["address.countryId"].ToString();
|
||||
wsClientes.Cell(count, 6).Value = DRow["address.stateId"].ToString();
|
||||
wsClientes.Cell(count, 7).Value = DRow["address.city"].ToString();
|
||||
wsClientes.Cell(count, 8).Value = DRow["address.street1"].ToString();
|
||||
wsClientes.Cell(count, 9).Value = DRow["address.street2"].ToString();
|
||||
wsClientes.Cell(count, 10).Value = "'" + DRow["address.postalCode"].ToString();
|
||||
wsClientes.Cell(count, 11).Value = DRow["phone.intCode"].ToString();
|
||||
wsClientes.Cell(count, 12).Value = DRow["phone.areaCode"].ToString();
|
||||
wsClientes.Cell(count, 13).Value = "'" + DRow["phone.number"].ToString();
|
||||
wsClientes.Cell(count, 14).Value = DRow["salesman"].ToString();
|
||||
|
||||
count++;
|
||||
}
|
||||
wbAClientes.SaveAs(RutaClientes);
|
||||
|
||||
//worksheetVentas.Columns[3].Style.NumberFormat = "yyyy/MM/dd";
|
||||
var wbProductos= new ClosedXML.Excel.XLWorkbook(FormatoProductos);
|
||||
var wsProductos = wbProductos.Worksheet(1);
|
||||
|
||||
workbookVentas.Save(RutaVentas);
|
||||
count = 2;
|
||||
|
||||
|
||||
var workbookClientes = new ExcelFile();
|
||||
var worksheetClientes = workbookClientes.Worksheets.Add("Clientes");
|
||||
worksheetClientes.InsertDataTable(DTClientes, new InsertDataTableOptions()
|
||||
foreach (DataRow DRow in DTProductos.Rows)
|
||||
{
|
||||
ColumnHeaders = true,
|
||||
StartRow = 0
|
||||
});
|
||||
workbookClientes.Save(RutaClientes);
|
||||
|
||||
|
||||
|
||||
wsProductos.Cell(count, 1).Value = "'" + DRow["Código Producto Interno"].ToString();
|
||||
wsProductos.Cell(count, 2).Value = DRow["Nombre del Producto"].ToString();
|
||||
wsProductos.Cell(count, 3).Value = DRow["Presentación"].ToString();
|
||||
|
||||
count++;
|
||||
}
|
||||
wbProductos.SaveAs(RutaProductos);
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
||||
var FInfoProductos = new FileInfo(RutaProductos);
|
||||
var FInfoVentas = new FileInfo(RutaVentas);
|
||||
@@ -363,21 +360,22 @@ public class TareasJam : IHttpHandler
|
||||
CargaVentas = CargarArchivos(FInfoVentas, $"{FTPServer}/Ventas", TFPUsr, FTPPass);
|
||||
if (CargaVentas)
|
||||
{
|
||||
CargaVentas = VerificarArchivo(FInfoVentas, FInfoVentas.Length, $"{FTPServer}/Ventas", TFPUsr, FTPPass);
|
||||
CargaVentas = VerificarArchivo(FInfoVentas, FInfoVentas.Length, $"{FTPServer}/Ventas", TFPUsr, FTPPass);
|
||||
}
|
||||
}
|
||||
|
||||
if (CargaVentas)
|
||||
{
|
||||
SBLog.AppendLine($"<tr><td>Ventas</td><td>ok</td></tr>");
|
||||
}else
|
||||
}
|
||||
else
|
||||
{
|
||||
SBLog.AppendLine($"<tr><td>Ventas</td><td>Error carga</td></tr>");
|
||||
}
|
||||
|
||||
if (CargaProductos & CargaVentas)
|
||||
{
|
||||
CargaClientes = CargarArchivos(FInfoClientes, $"{FTPServer}/Clientes", TFPUsr, FTPPass);
|
||||
CargaClientes = CargarArchivos(FInfoClientes, $"{FTPServer}/Clientes", TFPUsr, FTPPass);
|
||||
if (CargaClientes)
|
||||
{
|
||||
CargaClientes = VerificarArchivo(FInfoClientes, FInfoClientes.Length, $"{FTPServer}/Clientes", TFPUsr, FTPPass);
|
||||
@@ -387,12 +385,13 @@ public class TareasJam : IHttpHandler
|
||||
if (CargaClientes)
|
||||
{
|
||||
SBLog.AppendLine($"<tr><td>Clientes</td><td>ok</td></tr>");
|
||||
}else
|
||||
}
|
||||
else
|
||||
{
|
||||
SBLog.AppendLine($"<tr><td>Clientes</td><td>Error carga</td></tr>");
|
||||
}
|
||||
|
||||
if (CargaProductos & CargaVentas& CargaClientes )
|
||||
if (CargaProductos & CargaVentas & CargaClientes)
|
||||
{
|
||||
CargaAlmacenes = CargarArchivos(FInfoAlmacenes, $"{FTPServer}/Stock", TFPUsr, FTPPass);
|
||||
if (CargaClientes)
|
||||
@@ -404,7 +403,8 @@ public class TareasJam : IHttpHandler
|
||||
if (CargaAlmacenes)
|
||||
{
|
||||
SBLog.AppendLine($"<tr><td>Almacenes</td><td>ok</td></tr>");
|
||||
}else
|
||||
}
|
||||
else
|
||||
{
|
||||
SBLog.AppendLine($"<tr><td>Almacenes</td><td>Error carga</td></tr>");
|
||||
}
|
||||
@@ -431,8 +431,6 @@ public class TareasJam : IHttpHandler
|
||||
string Cuerpo = Respuesta ? $"<b>Correcto</b><br>Tarea de carga de archios Corteva realizada correctamente<br> {SBLog.ToString()}" : $"<b>Error</b><br> Error tarea de carga de archios Corteva<br> {SBLog.ToString()}" ;
|
||||
|
||||
|
||||
|
||||
|
||||
MandaCorreo(Cuerpo, Respuesta, RutaProductos, RutaVentas, RutaClientes, RutaAlmacenes);
|
||||
|
||||
return Respuesta;
|
||||
@@ -457,14 +455,7 @@ public class TareasJam : IHttpHandler
|
||||
Ventas.Ruta = RutaVentas;
|
||||
Clientes.Ruta = RutaClientes;
|
||||
Almacenes.Ruta = RutaAlmacenes;
|
||||
|
||||
//FileInfo FIp = new FileInfo(RutaProductos);
|
||||
//FileInfo FIv = new FileInfo(RutaVentas);
|
||||
//FileInfo FIc = new FileInfo(RutaClientes);
|
||||
//FileInfo FIa = new FileInfo(RutaAlmacenes);
|
||||
|
||||
|
||||
|
||||
|
||||
ListaArchivos.Add(Productos);
|
||||
ListaArchivos.Add(Ventas);
|
||||
ListaArchivos.Add(Clientes);
|
||||
@@ -472,8 +463,8 @@ public class TareasJam : IHttpHandler
|
||||
|
||||
|
||||
ClsSisMail Correo = new ClsSisMail();
|
||||
// string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx";
|
||||
string Para = "oscar.irigoyen@adssistemas.mx";
|
||||
string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx";
|
||||
//string Para = "oscar.irigoyen@adssistemas.mx";
|
||||
string Asunto = ErrorProceso ? $"Carga Layout Corteva {DateTime.Now.ToString("yyyy-MM-dd")}" : $"Carga Layout Corteva Error {DateTime.Now.ToString("yyyy-MM-dd")}";
|
||||
|
||||
Correo.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Cuerpo, Archivos:ListaArchivos);
|
||||
@@ -488,7 +479,7 @@ public class TareasJam : IHttpHandler
|
||||
private bool CargarArchivos(FileInfo FInfo, string FTPServer, string FTPUsr, string FTPPass )
|
||||
{
|
||||
bool Respuesta;
|
||||
//var FInfo = new FileInfo(RutaArchivo);
|
||||
|
||||
if (FInfo.Exists)
|
||||
{
|
||||
FtpWebRequest request = (FtpWebRequest)WebRequest.Create($"{FTPServer}/{FInfo.Name}");
|
||||
|
||||
@@ -772,8 +772,8 @@ Partial Class Clientes
|
||||
UpAccionesCRM.Update()
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(309) Then
|
||||
DeshabilitarDatosClienteCajas()
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(309) Then
|
||||
DeshabilitarDatosClienteCajas()
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -845,8 +845,8 @@ Partial Class Clientes
|
||||
If Request("CveEmpresaCRM") IsNot Nothing AndAlso IsNumeric(Request("CveEmpresaCRM")) AndAlso Request("CveEmpresaCRM").ToEntero > 0 Then
|
||||
ViewState("CveEmpresaCRM") = Request("CveEmpresaCRM")
|
||||
CargaDatosCRM()
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then ' Funcionalidad Es Distribuidor
|
||||
DivEsDistribuidor.Visible = True
|
||||
DivCargoUsado.Visible = True
|
||||
@@ -912,33 +912,33 @@ Partial Class Clientes
|
||||
End Function
|
||||
Private Function PermiteEliminar() As Boolean
|
||||
Return UsuarioActual.TienePermisoProceso(194)
|
||||
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 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))
|
||||
@@ -1223,14 +1223,14 @@ Partial Class Clientes
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub CargaSubProyectoss()
|
||||
|
||||
'DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1).FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
Private Sub CargaSubProyectoss()
|
||||
|
||||
'DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1).FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
|
||||
DdlSubProyecto.DataBind()
|
||||
|
||||
|
||||
DdlSubProyecto.DataBind()
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub CargaMetodosPago()
|
||||
DdlMetodoPago.DataSource = GlobalDTMetodosPago.FiltraParametros("Estatus = 'Activo'", "ClaveSAT") '.FiltraParametros("CveMetodoPago > 0 ")
|
||||
@@ -1926,14 +1926,14 @@ Partial Class Clientes
|
||||
GvDireccionesEnvio.DataSource = ObjClientes.DtResultados
|
||||
End If
|
||||
ObjClientes.Dispose()
|
||||
GvDireccionesEnvio.DataBind()
|
||||
|
||||
If TxtRFC.Text = "XAXX010101000" Then
|
||||
If GvDireccionesEnvio.HeaderRow IsNot Nothing AndAlso GvDireccionesEnvio.HeaderRow.FCLiteral("LtlNombreSucursal") IsNot Nothing Then GvDireccionesEnvio.HeaderRow.FCLiteral("LtlNombreSucursal").Text = "Cliente"
|
||||
LtlNombreSucursal.Text = "Cliente"
|
||||
LtlNombreSucursalTitulo.Text = "Cliente"
|
||||
LtlTituloSurcusalCliente.Text = "Datos del cliente"
|
||||
LtlGvSucursalesCliente.Text = "Clientes"
|
||||
GvDireccionesEnvio.DataBind()
|
||||
|
||||
If TxtRFC.Text = "XAXX010101000" Then
|
||||
If GvDireccionesEnvio.HeaderRow IsNot Nothing AndAlso GvDireccionesEnvio.HeaderRow.FCLiteral("LtlNombreSucursal") IsNot Nothing Then GvDireccionesEnvio.HeaderRow.FCLiteral("LtlNombreSucursal").Text = "Cliente"
|
||||
LtlNombreSucursal.Text = "Cliente"
|
||||
LtlNombreSucursalTitulo.Text = "Cliente"
|
||||
LtlTituloSurcusalCliente.Text = "Datos del cliente"
|
||||
LtlGvSucursalesCliente.Text = "Clientes"
|
||||
End If
|
||||
UpAgregarSucursal.Update()
|
||||
UpDatos.Update()
|
||||
@@ -2758,7 +2758,7 @@ Partial Class Clientes
|
||||
'HLRemision.HRef = $"/Ventas/Ventas.aspx?CveRemision={e.Row.DBCampo("CveVenta")}"
|
||||
|
||||
Dim Liga As String = String.Format("< a class=""Texto"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">", e.Row.DBCampo("CveVenta"))
|
||||
HLSendMail.HRef = String.Format("javascript:(function mail(){{$get('HdnTipoDocto').value='{0}';$get('HdnCveVenta').value='{1}';$get('HdnFolioVenta').value='{2}';$get('TxtParaMail').value='{3}';$get('HdnSerieFolio').value='{4}';$get('HdnSubProyecto').value='{5}';$('#ModalDivMail').modal();}})();", e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveVenta"), e.Row.DBCampo("folio"), e.Row.DBCampo("Correo"), e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("SubProyecto"))
|
||||
HLSendMail.HRef = String.Format("javascript:(function mail(){{$get('HdnTipoDocto').value='{0}';$get('HdnCveVenta').value='{1}';$get('HdnFolioVenta').value='{2}';$get('TxtParaMail').value='{3}';$get('HdnSerieFolio').value='{4}';$get('HdnSubProyecto').value='{5}';$('#ModalDivMail').modal();return false;}})();", e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveVenta"), e.Row.DBCampo("folio"), e.Row.DBCampo("Correo"), e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("SubProyecto"))
|
||||
e.Row.FCLiteral("LtlFactura").Text = String.Format("<a class=""Texto"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">{1}</a>", e.Row.DBCampo("CveVenta"), e.Row.DBCampo("Folio"))
|
||||
|
||||
UpSendMail.Update()
|
||||
@@ -9082,7 +9082,14 @@ Partial Class Clientes
|
||||
e.Row.FCCheckBox("ChkBonificacion").Visible = False
|
||||
Else
|
||||
e.Row.FCCheckBox("ChkBonificacion").Checked = False
|
||||
e.Row.FCCheckBox("ChkBonificacion").Visible = True
|
||||
'VERIFICA SI ES USADO O AJUSTE/GARANTIA
|
||||
'SI ES USADO
|
||||
If e.Row.DBCampo("EsUsadoAjuste") = "0" Then
|
||||
e.Row.FCCheckBox("ChkBonificacion").Visible = True
|
||||
'SI ES AJUSTE/GARANTIA
|
||||
ElseIf e.Row.DBCampo("EsUsadoAjuste") = "1" Then
|
||||
e.Row.FCCheckBox("ChkBonificacion").Visible = False
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
@@ -10196,18 +10203,18 @@ Partial Class Clientes
|
||||
GvPagosNoBancarios.DataBind()
|
||||
End If
|
||||
ObjBancos.Dispose()
|
||||
End Sub
|
||||
Protected Sub TxtCodigo_TextChanged(sender As Object, e As EventArgs)
|
||||
|
||||
If CveCliente <= 0 AndAlso UsuarioActual.CveEmpresa = 140 Then
|
||||
DdlTipoCliente.SelectedValueExist("1")
|
||||
ChkEsDistribuidor.Checked = True
|
||||
ChkCargoUsado.Checked = True
|
||||
ChkBonificacionUsado.Checked = True
|
||||
End If
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
Protected Sub TxtCodigo_TextChanged(sender As Object, e As EventArgs)
|
||||
|
||||
If CveCliente <= 0 AndAlso UsuarioActual.CveEmpresa = 140 Then
|
||||
DdlTipoCliente.SelectedValueExist("1")
|
||||
ChkEsDistribuidor.Checked = True
|
||||
ChkCargoUsado.Checked = True
|
||||
ChkBonificacionUsado.Checked = True
|
||||
End If
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
@@ -4671,6 +4671,15 @@ Partial Class PV
|
||||
RegistraScript("$('#DivAddVenta').modal({backdrop: 'static', keyboard: false});", "EdicionVenta")
|
||||
End Sub
|
||||
Protected Sub LnkAgregarPS_Click(sender As Object, e As EventArgs)
|
||||
If ChkAjuste.Checked Then
|
||||
Dim FolioGarantia As MFolioGarantiaMensaje = ValidaFolioGarantia(DdlPSAjuste.SelectedValue.ToEntero(), DdlFolioGarantia.SelectedValue.ToEntero())
|
||||
|
||||
If Not FolioGarantia.Valido Then
|
||||
Alert($"El folio de garantía no es valido.<br/> Clasificacion del Producto:{FolioGarantia.ClasificacionPS}.<br/>Tipo Folio:{FolioGarantia.TipoFolio}", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
If AgregarPS() Then
|
||||
If ChkAjuste.Checked Then GuardaAjuste()
|
||||
AddPolizaVirtual(DdlPS.SelectedValue.ToEntero())
|
||||
@@ -6511,6 +6520,12 @@ Partial Class PV
|
||||
UpAjuste.Update()
|
||||
End If
|
||||
ObjAcumuladores.Dispose()
|
||||
|
||||
Dim FolioGarantia As MFolioGarantiaMensaje = ValidaFolioGarantia(DdlPSAjuste.SelectedValue.ToEntero(), DdlFolioGarantia.SelectedValue.ToEntero())
|
||||
|
||||
If Not FolioGarantia.Valido Then
|
||||
Alert($"El folio de garantía no es valido.<br/> Clasificacion del Producto:{FolioGarantia.ClasificacionPS}.<br/>Tipo Folio:{FolioGarantia.TipoFolio}", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
@@ -6991,4 +7006,68 @@ Partial Class PV
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Ajuste.rdlc", DtDatos, params, "Reporte de Ajuste", "PDF")
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function ValidaFolioGarantia(CvePS As Integer, CveFolioGarantia As Integer) As MFolioGarantiaMensaje
|
||||
Dim Retorno As New MFolioGarantiaMensaje
|
||||
|
||||
Dim Valido As Boolean = False
|
||||
Dim TipoFolio As String = ""
|
||||
Dim ListaClasificacionesPermitidas As New List(Of Integer)
|
||||
|
||||
Dim ObjAcumuladores As New ClsAcumuladores
|
||||
If ObjAcumuladores.FoliosGarantiaGet(CveFolioGarantia, UsuarioActual.CveEmpresa, Area:=-1) AndAlso ObjAcumuladores.DtResultados.Rows.Count > 0 Then
|
||||
Dim Row As DataRow = ObjAcumuladores.DtResultados.Rows(0)
|
||||
TipoFolio = Row("tipoFolio").ToString().ToUpper()
|
||||
End If
|
||||
ObjAcumuladores.Dispose()
|
||||
|
||||
Dim CveClasificacionPS As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("CveClasificacion").ToEntero()
|
||||
Dim ClasificacionPS As String = GlobalDTClasificaciones(CveEmpresa:=UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionPS).FiltroPrimeroValor("Clasificacion").ToString()
|
||||
Select Case TipoFolio
|
||||
Case "GENERAL"
|
||||
'20520 ACUM. AUTOMOTRIZ
|
||||
'20522 ACUM. ESPECIALES
|
||||
'20513 ACUM. ESTANDAR
|
||||
'20521 ACUM. PESADO
|
||||
'20512 ACUM. PREMIUM
|
||||
'20514 ACUM. VALUE
|
||||
'20229 Acumulador
|
||||
ListaClasificacionesPermitidas.Add(20520) 'ACUM. AUTOMOTRIZ
|
||||
ListaClasificacionesPermitidas.Add(20522) 'ACUM. ESPECIALES
|
||||
ListaClasificacionesPermitidas.Add(20513) 'ACUM. ESTANDAR
|
||||
ListaClasificacionesPermitidas.Add(20521) 'ACUM. PESADO
|
||||
ListaClasificacionesPermitidas.Add(20512) 'ACUM. PREMIUM
|
||||
ListaClasificacionesPermitidas.Add(20514) 'ACUM. VALUE
|
||||
ListaClasificacionesPermitidas.Add(20229) 'Acumulador
|
||||
Case "OPTIMA"
|
||||
'20511 ACUM. OPTIMA
|
||||
ListaClasificacionesPermitidas.Add(20511) 'ACUM. OPTIMA
|
||||
Case "MOTOBATERIA"
|
||||
'20517 MOTOBATERIAS
|
||||
ListaClasificacionesPermitidas.Add(20517) 'MOTOBATERIAS
|
||||
End Select
|
||||
|
||||
If ListaClasificacionesPermitidas.Contains(CveClasificacionPS) Then
|
||||
Valido = True
|
||||
End If
|
||||
|
||||
Retorno.CvePS = CvePS
|
||||
Retorno.CveFolioGarantia = CveFolioGarantia
|
||||
Retorno.CveClasificacionPS = CveClasificacionPS
|
||||
Retorno.ClasificacionPS = ClasificacionPS
|
||||
Retorno.TipoFolio = TipoFolio
|
||||
Retorno.Valido = Valido
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Partial Class MFolioGarantiaMensaje
|
||||
Public Property CvePS As Integer
|
||||
Public Property CveClasificacionPS As Integer
|
||||
Public Property ClasificacionPS As String
|
||||
Public Property CveFolioGarantia As Integer
|
||||
Public Property TipoFolio As String
|
||||
|
||||
Public Property Valido As Boolean
|
||||
End Class
|
||||
End Class
|
||||
|
||||
@@ -6235,8 +6235,8 @@
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<asp:DropDownList ID="DdlVentaUsado" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="100%" CssClass="select2me" OnSelectedIndexChanged="DdlVentaUsado_SelectedIndexChanged"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVVentaUsado" runat="server" InitialValue="-1" ControlToValidate="DdlVentaUsado" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Factura''</b> es necesario, por favor ingréselo." ValidationGroup="VGAplicarRNC"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEVentaUsado" runat="server" HighlightCssClass="vco" TargetControlID="RFVVentaUsado" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<%-- <asp:RequiredFieldValidator ID="RFVVentaUsado" runat="server" InitialValue="-1" ControlToValidate="DdlVentaUsado" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Factura''</b> es necesario, por favor ingréselo." ValidationGroup="VGAplicarRNC"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEVentaUsado" runat="server" HighlightCssClass="vco" TargetControlID="RFVVentaUsado" Width="350px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -6293,14 +6293,14 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtImporte" CssClass="myvalue" runat="server" Width="75px" />
|
||||
<asp:TextBox ID="TxtImporte" CssClass="myvalue ImportesRNCCargo" runat="server" Width="75px" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row" id="DivSMU" runat="server" visible="false">
|
||||
<div class="col-md-12">
|
||||
<table border="0" rules="none" class="well TextTab" style="float: right;" runat="server">
|
||||
<tr align="right">
|
||||
|
||||
@@ -2160,6 +2160,7 @@ Partial Class Ventas
|
||||
'Carga Venta
|
||||
If Request("CveVenta") IsNot Nothing AndAlso IsNumeric(Request("CveVenta")) AndAlso Request("CveVenta").ToEntero() > 0 Then
|
||||
ViewState("CveVenta") = Request("CveVenta")
|
||||
|
||||
If CargaVenta() Then
|
||||
|
||||
'DdlSucursal.Enabled = False
|
||||
@@ -2694,7 +2695,7 @@ Partial Class Ventas
|
||||
TrPedido.Visible = False
|
||||
' TrKilometrajeTxt.Visible = True
|
||||
End If
|
||||
LtlTareaNueva.Text = String.Format("<a class=""caption-subject bold font-green"" onclick=""OpenModalNewTareaUserControl(1,-1,{{CveVenta:{0}}});""> <i class=""fa fa-plus""'></i> Tarea</a>", CveVenta)
|
||||
LtlTareaNueva.Text = String.Format("<a class=""caption-subject bold font-green"" onclick=""OpenModalNewTareaUserControl(1,-1,{{CveVenta:{0}}});""> <i class=""fa fa-plus""></i> Tarea</a>", CveVenta)
|
||||
|
||||
End If
|
||||
|
||||
@@ -5415,7 +5416,7 @@ Partial Class Ventas
|
||||
|
||||
DdlVentaUsado.DataBind()
|
||||
|
||||
DdlVentaUsado.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlVentaUsado.Items.Insert(0, New ListItem("No Aplica", "-1"))
|
||||
|
||||
UpModalRemisionesNC.Update()
|
||||
End If
|
||||
@@ -10190,7 +10191,7 @@ Partial Class Ventas
|
||||
|
||||
'PedidoA'
|
||||
If ObjVentas.CveVenta > 0 And CvePedidoA > 0 And DdlTipoComprobante.SelectedValue.Contiene("Rem") Then
|
||||
If Not ObjCliente.UpdateEstatusPedido(CvePedidoA, 18, -1, UsuarioActual.CveUsuario) Then
|
||||
If Not ObjCliente.UpdateEstatusPedido(CvePedidoA, 18, -1, UsuarioActual.CveUsuario, CveRemision:=factura.CveVenta) Then
|
||||
ErrorList.Add("Ocurrió un error al actualizar el estatus del pedidoA")
|
||||
End If
|
||||
End If
|
||||
@@ -23118,13 +23119,19 @@ Partial Class Ventas
|
||||
GvRemisionesNCBon.DataBind()
|
||||
|
||||
If CveVentaUsado > 0 Then
|
||||
DivSMU.Visible = True
|
||||
Dim FacUsado As New Modelos.Factura(UsuarioActual, CveVentaUsado, UsuarioActual.CveEmpresa)
|
||||
LtlSMU.Text = String.Format("{0:N2}", FacUsado.DtDetalle.SUM("Total", "EsCargo = True").ToDecimal() + FacUsado.DtDetalle.SUM("ImporteIVA", "EsCargo = True").ToDecimal())
|
||||
Dim SaldoMaximoUsados As Decimal = FacUsado.DtDetalle.SUM("Total", "EsCargo = True").ToDecimal() + FacUsado.DtDetalle.SUM("ImporteIVA", "EsCargo = True").ToDecimal()
|
||||
HdnSaldoMaximoUsados.Value = SaldoMaximoUsados.ToString()
|
||||
LtlSMU.Text = String.Format("{0:N2}", SaldoMaximoUsados)
|
||||
Else
|
||||
LtlSMU.Text = String.Format("{0:N2}", 0)
|
||||
DivSMU.Visible = False
|
||||
HdnSaldoMaximoUsados.Value = "0"
|
||||
LtlSMU.Text = "0"
|
||||
End If
|
||||
|
||||
UpModalRemisionesNC.Update()
|
||||
UpDescNC.Update()
|
||||
End Sub
|
||||
Private Sub CargaDescRNC()
|
||||
Dim DtNC As DataTable = Nothing
|
||||
@@ -23320,8 +23327,8 @@ Partial Class Ventas
|
||||
End Sub
|
||||
Protected Sub GvRemisionesNC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvRemisionesNC.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.FCCheckBox("ChkAplicar").Attributes.Add("onclick", $"CalculaTotalRNCChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble}, this);")
|
||||
e.Row.FCTextBox("TxtImporte").Attributes.Add("onkeyup", $"LimitaCantidadRNCMasivo({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble}, this);")
|
||||
e.Row.FCCheckBox("ChkAplicar").Attributes.Add("onclick", $"CalculaSaldoRNCChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble}, this);")
|
||||
e.Row.FCTextBox("TxtImporte").Attributes.Add("onkeyup", $"LimitaSaldoRNCChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble}, this);")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user