Cambios BDH, ajuste y garantia
This commit is contained in:
@@ -384,11 +384,12 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div style="overflow-y: auto; height: 400px; width: 1200px;" runat="server">
|
||||
<div style="overflow-y: auto; height: 400px; min-width: 1200px;" runat="server">
|
||||
<asp:GridView ID="GvGarantiasDetalle" runat="server" AutoGenerateColumns="false" Width="100%" EmptyDataText="No se encontraron datos" CssClass="table table-striped table-hover Widthall"
|
||||
DataKeyNames="Consecutivo,CodigoCliente,Codigo,CodigoTipoUso,CodigoTipoDefecto,CodigoEnsamble,CodigoLinea,CodigoInspeccion,FechaVenta,FechaReclamacion,TipoComprobante,Comprobante,Autorizo,Comentarios,ClaveAutorizacion" BorderColor="#D3D3D3" GridLines="None">
|
||||
OnRowDataBound="GvGarantiasDetalle_RowDataBound" DataKeyNames="Consecutivo,CodigoCliente,CodigoSucursal,Codigo,CodigoProducto2,CodigoTipoUso,CodigoTipoDefecto,CodigoEnsamble,CodigoLinea,CodigoInspeccion,FechaVenta,FechaReclamacion,TipoComprobante,Comprobante,Autorizo,Comentarios,ClaveAutorizacion" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Consecutivo" HeaderText="Consecutivo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="FolioRemision" HeaderText="Remisión" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||
<asp:BoundField DataField="FolioFactura" HeaderText="Factura" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||
<asp:BoundField DataField="Cliente" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%" />
|
||||
<asp:BoundField DataField="Codigo" HeaderText="Código" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
@@ -397,9 +398,15 @@
|
||||
<asp:BoundField DataField="CodigoEnsamble" HeaderText="Código Ensamble" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="CodigoLinea" HeaderText="Código Linea" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="CodigoInspeccion" HeaderText="Código Inspeccion" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="NumPoliza" HeaderText="Num.Póliza" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="TipoComprobanteTexto" HeaderText="Tipo Comprobante" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="Comprobante" HeaderText="Comprobante" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="FechaAjuste" HeaderText="Fecha Ajuste" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
|
||||
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
|
||||
<asp:TemplateField HeaderText="Descargar PDF" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="80px">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HlDescargarPDF" runat="server" Text="<i class='fa fa-file-pdf-o' style='font-size:15px; font-weight:bold; color:dimgray;'></i>" Target="_blank" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Acumuladores_CatFoliosGarantia
|
||||
Inherits ClsPaginas
|
||||
@@ -41,10 +41,10 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
CargadatosGvFolioGarantia(DdlEstatus.SelectedValue.ToEntero, DdlTipoFolio.SelectedValue)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region "Folios Garantía"
|
||||
Private Sub CargaSubProyectos()
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, lblSubProyecto)
|
||||
@@ -162,27 +162,22 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub Remove_ClickFolioGarantia(sender As Object, e As EventArgs)
|
||||
|
||||
Dim objAcum As New ClsAcumuladores
|
||||
Public Sub Remove_ClickFolioGarantia(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = 0
|
||||
Dim CveCapacitador As Integer = GvRow.DataKey("CveFolioGarantia")
|
||||
|
||||
Dim objAcum As New ClsAcumuladores
|
||||
If objAcum.FoliosGarantiaRemove(CveCapacitador, UsuarioActual.CveEmpresa) Then
|
||||
CargadatosGvFolioGarantia(-1, "-1")
|
||||
|
||||
Alert("Capacitador Eliminó Correctamente ", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al Eliminar el Folio de Garantía", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
objAcum.Dispose()
|
||||
|
||||
CargadatosGvFolioGarantia(-1, "-1")
|
||||
|
||||
CveFolioGarantia = -1
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub Edit_ClickFolioGarantia(sender As Object, e As EventArgs)
|
||||
@@ -263,9 +258,9 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
'1.- Consecutivo Partida-->1
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("Consecutivo"))
|
||||
'2.- Cliente-->100407
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("CodigoCliente"))
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("CodigoSucursal"))
|
||||
'3. Codigo De Articulo --> 171402
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("Codigo"))
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("CodigoProducto2"))
|
||||
'4. Tipo De Uso --> A
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("CodigoTipoUso"))
|
||||
'5. Defecto --> P
|
||||
@@ -277,9 +272,9 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
'8. Codigo De Inspeccion --> J8K
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("CodigoInspeccion"))
|
||||
'9. Fecha De Venta --> 05/09/2009
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("FechaVenta").ToDateTime().ToString("dd/MM/yyyy"))
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("FechaVenta").ToDateTime().ToString("MM-dd-yyyyy"))
|
||||
'10. Fecha De Reclamacion --> 05/07/2010
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("FechaReclamacion").ToDateTime().ToString("dd/MM/yyyy"))
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("FechaReclamacion").ToDateTime().ToString("MM-dd-yyyyy"))
|
||||
'11. TipoComprobante --> 1
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("TipoComprobante"))
|
||||
'12. Comprobante --> N/A
|
||||
@@ -305,4 +300,10 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
Response.End()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvGarantiasDetalle_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.FCHyperLink("HlDescargarPDF").NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=AJUSTE&CveGarantiaDetalle={e.Row.DBCampo("CveGarantiaDetalle")}")}"
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -727,8 +727,9 @@ Public Class ClsAcumuladores
|
||||
|
||||
Public Function AddGarantiasDetalle(CveVentaDetalle As Integer, CvePS As Integer, CveFolioGarantia As Integer, CveTipoUso As Integer,
|
||||
CodigoEnsamble As String, CodigoLinea As String, CodigoInspeccion As String,
|
||||
CveTipoDefecto As Integer, NumPoliza As String, Importe As Double,
|
||||
Consecutivo As String, FechaAjuste As DateTime, PorcentajeAjuste As Decimal) As Boolean
|
||||
CveTipoDefecto As Integer, CodigoTD As String, TipoComprobante As Integer, Comprobante As String, Importe As Double,
|
||||
Consecutivo As String, FechaAjuste As DateTime, PorcentajeAjuste As Decimal, CveBCIAjuste As Integer, Etiqueta As String, CveClienteDistribuidor As Integer,
|
||||
CveModeloAuto As Integer, Año As String) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
SqlDataAdapter("PA_Acum_GarantiasDetalleAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -739,12 +740,19 @@ Public Class ClsAcumuladores
|
||||
.Add("@CodigoEnsamble", SqlDbType.VarChar).Value = CodigoEnsamble
|
||||
.Add("@CodigoLinea", SqlDbType.VarChar).Value = CodigoLinea
|
||||
.Add("@CodigoInspeccion", SqlDbType.VarChar).Value = CodigoInspeccion
|
||||
.Add("@CveTipoDefecto", SqlDbType.Int).Value = CveTipoDefecto
|
||||
.Add("@NumPoliza", SqlDbType.VarChar).Value = NumPoliza
|
||||
.Add("@CveTipoDefecto", SqlDbType.Int).Value = CveTipoDefecto
|
||||
.Add("@CodigoTD", SqlDbType.VarChar).Value = CodigoTD
|
||||
.Add("@TipoComprobante", SqlDbType.TinyInt).Value = TipoComprobante
|
||||
.Add("@Comprobante", SqlDbType.VarChar).Value = Comprobante
|
||||
.Add("@Importe", SqlDbType.Float).Value = Importe
|
||||
.Add("@Consecutivo", SqlDbType.VarChar).Value = Consecutivo
|
||||
.Add("@FechaAjuste", SqlDbType.DateTime).Value = FechaAjuste
|
||||
.Add("@FechaAjuste", SqlDbType.DateTime).Value = FechaAjuste
|
||||
.Add("@PorcentajeAjuste", SqlDbType.Float).Value = PorcentajeAjuste
|
||||
.Add("@CveBCIAjuste", SqlDbType.Int).Value = CveBCIAjuste
|
||||
.Add("@Etiqueta", SqlDbType.VarChar).Value = Etiqueta
|
||||
.Add("@CveClienteDistribuidor", SqlDbType.Int).Value = CveClienteDistribuidor
|
||||
.Add("@CveModeloAuto", SqlDbType.Int).Value = CveModeloAuto
|
||||
.Add("@Año", SqlDbType.VarChar).Value = Año
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -754,6 +762,8 @@ Public Class ClsAcumuladores
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetGarantiasDetalle(CveVenta As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
SqlDataAdapter("PA_Acum_GarantiasDetalleGet")
|
||||
@@ -1153,13 +1163,14 @@ Public Class ClsAcumuladores
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetFoliosGarantiasDetalle(CveFolioGarantia As Integer) As Boolean
|
||||
Public Function GetFoliosGarantiasDetalle(CveFolioGarantia As Integer, Optional CveGarantiaDetalle As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
SqlDataAdapter("PA_Acum_GarantiasDetalleFolioGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia
|
||||
.Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia
|
||||
.Add("@CveGarantiaDetalle", SqlDbType.Int).Value = CveGarantiaDetalle
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -327,13 +327,13 @@ Public Class ClsSubProyectos
|
||||
OnError("Ocurrió un error al obtener las ventas no timbradas por centro de costo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#Region "N U E V O C E N T R O D E C O S T O S"
|
||||
Public Function AddCentroCosto(SubProyecto As String, IdSegNeg As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveProyecto As Integer, Optional Serie As String = "", Optional IVA As Double = 0.0, Optional Calle As String = "", Optional NoExt As String = "",
|
||||
Optional NoInt As String = "", Optional Colonia As String = "", Optional Localidad As String = "", Optional Municipio As String = "", Optional Estado As String = "", Optional Pais As String = "", Optional CP As String = "", Optional TipoSucursal As Integer = 0, Optional EsSucursal As Integer = 0,
|
||||
Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1, Optional AplicaComercioExterior As Boolean = False, Optional Correo As String = "", Optional CvePrecioLista As Integer = -1,
|
||||
Optional Telefono As String = "", Optional NoVerificaAlmacen As Boolean = False) As Boolean
|
||||
Optional Telefono As String = "", Optional NoVerificaAlmacen As Boolean = False, Optional CodigoSucursal As String = "") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_CentroCostoAdd")
|
||||
@@ -365,7 +365,8 @@ Public Class ClsSubProyectos
|
||||
.Add("@Correo", SqlDbType.VarChar).Value = Correo
|
||||
.Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista
|
||||
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
|
||||
.Add("@NoVerificaAlmacen", SqlDbType.Bit).Value = NoVerificaAlmacen
|
||||
.Add("@NoVerificaAlmacen", SqlDbType.Bit).Value = NoVerificaAlmacen
|
||||
.Add("@CodigoSucursal", SqlDbType.VarChar).Value = CodigoSucursal
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
|
||||
@@ -388,7 +389,7 @@ Public Class ClsSubProyectos
|
||||
Public Function UpdateCentroCosto(CveSubProyecto As Integer, SubProyecto As String, IdSegNeg As Integer, Estatus As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveProyecto As Integer, Optional Serie As String = "", Optional IVA As Double = 0.0, Optional Calle As String = "", Optional NoExt As String = "",
|
||||
Optional NoInt As String = "", Optional Colonia As String = "", Optional Localidad As String = "", Optional Municipio As String = "", Optional Estado As String = "", Optional Pais As String = "", Optional CP As String = "", Optional TipoSucursal As Integer = 0, Optional EsSucursal As Integer = 0,
|
||||
Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1, Optional AplicaComercioExterior As Boolean = False, Optional Correo As String = "", Optional CvePrecioLista As Integer = -1,
|
||||
Optional Telefono As String = "", Optional HorarioVerano As Integer = Nothing, Optional HorarioInvierno As Integer = Nothing, Optional NoVerificaAlmacen As Boolean = False) As Boolean
|
||||
Optional Telefono As String = "", Optional HorarioVerano As Integer = Nothing, Optional HorarioInvierno As Integer = Nothing, Optional NoVerificaAlmacen As Boolean = False, Optional CodigoSucursal As String = "") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_CentroCostoUpdate")
|
||||
@@ -425,6 +426,7 @@ Public Class ClsSubProyectos
|
||||
.Add("@HorarioVerano", SqlDbType.Int).Value = HorarioVerano
|
||||
.Add("@HorarioInvierno", SqlDbType.Int).Value = HorarioInvierno
|
||||
.Add("@NoVerificaAlmacen", SqlDbType.Bit).Value = NoVerificaAlmacen
|
||||
.Add("@CodigoSucursal", SqlDbType.VarChar).Value = CodigoSucursal
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -442,10 +444,10 @@ Public Class ClsSubProyectos
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
#Region " IDisposable Support "
|
||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
||||
ConexionClose()
|
||||
|
||||
@@ -1527,8 +1527,9 @@ Namespace Modelos
|
||||
If DtAjustes IsNot Nothing AndAlso DtAjustes.Rows.Count > 0 Then
|
||||
For Each Dr As DataRow In DtAjustes.Rows
|
||||
If Not ObjAcum.AddGarantiasDetalle(Dr("CveVentaDetalle").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("CveFolioGarantia").ToString.ToEntero, Dr("CveTipoUso").ToString.ToEntero,
|
||||
Dr("CodigoEnsamble").ToString, Dr("CodigoLinea").ToString, Dr("CodigoInspeccion").ToString, Dr("CveTipoDefecto").ToString.ToEntero,
|
||||
Dr("NumPoliza").ToString, Dr("Importe").ToString.ToDouble, Dr("Consecutivo").ToString, Dr("FechaAjuste").ToString.ToDateTime(), Dr("PorcentajeAjuste").ToString.ToDecimal()) Then
|
||||
Dr("CodigoEnsamble").ToString, Dr("CodigoLinea").ToString, Dr("CodigoInspeccion").ToString, Dr("CveTipoDefecto").ToString.ToEntero, Dr("CodigoTD").ToString, Dr("TipoComprobante").ToString.ToEntero(),
|
||||
Dr("Comprobante").ToString, Dr("Importe").ToString.ToDouble, Dr("Consecutivo").ToString, Dr("FechaAjuste").ToString.ToDateTime(), Dr("PorcentajeAjuste").ToString.ToDecimal(),
|
||||
Dr("CveBCIAjuste").ToString.ToEntero(), Dr("Etiqueta").ToString, Dr("CveClienteDistribuidor").ToString.ToEntero(), Dr("CveModeloAuto").ToString.ToEntero(), Dr("Año").ToString) Then
|
||||
ErrorList.Add("Ocurrió un error al agregar la garantia detalle.")
|
||||
End If
|
||||
Next
|
||||
@@ -4839,14 +4840,14 @@ Namespace Modelos
|
||||
Dim CveCliente As Integer = ObjVentas.DtResultados(0)("CveCliente").ToString.ToEntero
|
||||
Dim ClienteNombre As String = ObjVentas.DtResultados(0)("ClienteNombre").ToString
|
||||
Dim SerieFolio As String = ObjVentas.DtResultados(0)("SerieFolio").ToString
|
||||
Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundSQL()
|
||||
Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundAD()
|
||||
Dim TotalCostoAcumulado As Decimal = 0
|
||||
Dim cont As Integer = 1
|
||||
|
||||
Dim CvePrePolizaDev As Integer = ObjConta.AddPrePolizas("Modelos/RecepcionEntrega", 4, TotalCosto, TotalCosto, 1, Fecha, ClienteNombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
'SE AGREGA MOVIMIENTO SEPARADO POR LA CUENTA DE VENTAS (ER)
|
||||
For Each RowInv As DataRow In tmpCostos.Rows
|
||||
ValorInventario = DtCostos.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").RoundSQL()
|
||||
ValorInventario = DtCostos.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").RoundAD()
|
||||
TotalCostoAcumulado += ValorInventario
|
||||
|
||||
'CUANDO ES EL ÚLTIMO MOVIMIENTO Y HAY DIFERENCIAS EN LOS IMPORTES
|
||||
|
||||
@@ -380,7 +380,7 @@ Namespace Extensiones
|
||||
Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.Handler, Page)
|
||||
Dim script As String = ""
|
||||
If showalert Then
|
||||
script = String.Format("bootbox.dialog({{message: ""{0} "", className: ""{11}"", {12} onEscape: function() {{ {12} }},title: ""{1}"",buttons: {{ success: {{ label: ""{2}"", className: "" {3}""," &
|
||||
script = String.Format("bootbox.dialog({{message: ""{0} "", className: ""{11}"", {13} onEscape: function() {{ {12} }},title: ""{1}"",buttons: {{ success: {{ label: ""{2}"", className: "" {3}""," &
|
||||
"callback: function() {{ {4} }} }}, danger: {{ label: ""{5}"", className: "" {6}"",callback: function() {{ {7} }} }}," &
|
||||
"main: {{ label: ""{8}"", className: "" {9}"", callback: function() {{ {10} }} }} }} }});",
|
||||
Mensaje, Titulo, b3title, b3clas, b3js, b2title, b2clas, b2js, b1title, b1clas, b1js, headerclas, onEscape, closeButtonOption)
|
||||
|
||||
@@ -690,7 +690,7 @@ Partial Class Bancos_PopIEVentas
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then
|
||||
|
||||
|
||||
Dim Valida As New ClsValidaCFDi(dr("FolioFiscal").ToString(), dr("ClienteRFC").ToString, UsuarioActual.Empresa.RFC)
|
||||
Dim Valida As New ClsValidaCFDi(dr("FolioFiscal").ToString(), dr("ClienteRFC").ToString, UsuarioActual.Empresa.RFC, Importe:=dr("Total").ToString().ToDecimal())
|
||||
|
||||
If Valida.EsValida > 0 Then
|
||||
If Valida.EsValida = 2 Then
|
||||
|
||||
@@ -485,6 +485,13 @@ Partial Class PopUpVerFactura
|
||||
If UrlParametros("CVEASIGNACIONENTREGA") IsNot Nothing And UrlParametros("USUARIOENTREGA") IsNot Nothing Then
|
||||
ImprimeEntregasPorRealizar(UrlParametros("CVEASIGNACIONENTREGA").ToString.ToLong, UrlParametros("USUARIOENTREGA").ToString)
|
||||
End If
|
||||
End If
|
||||
|
||||
'PDF AJUSTE
|
||||
If UrlParametros("OP").ToString = "AJUSTE" Then
|
||||
If UrlParametros("CVEGARANTIADETALLE") IsNot Nothing Then
|
||||
ImprimirPDFAjuste(UrlParametros("CVEGARANTIADETALLE").ToString.ToEntero)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -1296,7 +1303,7 @@ Partial Class PopUpVerFactura
|
||||
Dim ResponsableRecibio As String = ObjInventarios.ResponsableRecibio
|
||||
Dim UsuarioCapturo As String = ObjInventarios.DtResultados.FiltroPrimeroValor("UsuarioCapturo")
|
||||
|
||||
If Recibio.Trim = "" Then
|
||||
If String.IsNullOrEmpty(Recibio) Then
|
||||
Dim ObjRH As New ClsRH
|
||||
If ObjRH.GetPersonal(ObjInventarios.CvePersonal, UsuarioActual.CveEmpresa) AndAlso ObjRH.DtResultados.Rows.Count > 0 Then
|
||||
Recibio = ObjRH.DtResultados.Rows(0)("NombreCompleto").ToString
|
||||
@@ -4445,4 +4452,153 @@ Partial Class PopUpVerFactura
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "OP = AJUSTE"
|
||||
Private Sub ImprimirPDFAjuste(CveGarantiaDetalle As Integer)
|
||||
' Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim RowAjuste As DataRow = Nothing
|
||||
|
||||
Using ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.GetFoliosGarantiasDetalle(-1, CveGarantiaDetalle) Then
|
||||
If ObjAcum.DtResultados.Rows.Count > 0 Then
|
||||
RowAjuste = ObjAcum.DtResultados.Rows(0)
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
|
||||
Dim CvePSAjuste As Integer = RowAjuste("CvePS").ToString.ToEntero()
|
||||
Dim CveCliente As Integer = RowAjuste("CveCliente").ToString.ToEntero()
|
||||
Dim CveClienteDistribuidor As Integer = RowAjuste("CveClienteDistribuidor").ToString.ToEntero()
|
||||
Dim Consec As String = RowAjuste("Consecutivo").ToString
|
||||
Dim FolioGarantia As String = RowAjuste("FolioGarantia").ToString
|
||||
Dim FechaAjuste As DateTime = RowAjuste("FechaVenta").ToString.ToDateTime()
|
||||
Dim FechaReclamacion As DateTime = RowAjuste("FechaReclamacion").ToString.ToDateTime()
|
||||
Dim TipoDefecto As String = RowAjuste("TipoDefecto").ToString
|
||||
Dim CveTipoUso As Integer = RowAjuste("CveTipoUso").ToString.ToEntero()
|
||||
Dim CodigoEnsamble As String = RowAjuste("CodigoEnsamble").ToString
|
||||
Dim CodigoLinea As String = RowAjuste("CodigoLinea").ToString
|
||||
Dim CodigoInspeccion As String = RowAjuste("CodigoInspeccion").ToString
|
||||
|
||||
Dim MesesUso As String = "0"
|
||||
Dim PorcentajeAjuste As String = RowAjuste("PorcentajeAjuste").ToString
|
||||
Dim BCIAjuste As String = RowAjuste("BCIAjuste").ToString
|
||||
Dim Etiqueta As String = RowAjuste("Etiqueta").ToString
|
||||
|
||||
Dim Año As String = RowAjuste("Año").ToString
|
||||
Dim Comprobante As String = RowAjuste("Comprobante").ToString
|
||||
|
||||
Dim ModeloAuto As String = RowAjuste("ModeloAuto").ToString
|
||||
Dim MarcaAuto As String = RowAjuste("MarcaAuto").ToString
|
||||
|
||||
Dim MarcaPS As String = ""
|
||||
Dim CveMarca As Integer = -1
|
||||
|
||||
Dim FechaI As Date = FechaAjuste.AddDays(1)
|
||||
Dim FechaF As Date = FechaReclamacion
|
||||
|
||||
Dim Dia As Integer = FechaI.Day
|
||||
Try
|
||||
'validación adicional, para saber si el mes tiene 31 días y el actua es menor.
|
||||
If FechaI.Day > Today.LastDayOfMonth.Day Then Dia = Today.LastDayOfMonth.Day
|
||||
Dim FechaT As Date = String.Format("{0}/{1}/{2}", Dia, FechaF.Month, FechaF.Year).ToDate 'armo la fecha con el día del mes actual
|
||||
|
||||
Dim MesesTrascurridos As Integer = Math.Round(DateDiff(DateInterval.Day, FechaI, FechaT) / 30.4, 2).ToEntero 'saco los meses y lo redondeo
|
||||
|
||||
If FechaT > FechaF Then
|
||||
'todavía está en el mes actual.
|
||||
MesesTrascurridos = MesesTrascurridos
|
||||
Else
|
||||
MesesTrascurridos = MesesTrascurridos + 1
|
||||
End If
|
||||
|
||||
MesesUso = MesesTrascurridos.ToString
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al calcular los meses de uso", ex)
|
||||
End Try
|
||||
|
||||
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPS(CvePSAjuste, -1, UsuarioActual.CveEmpresa) Then
|
||||
MarcaPS = ObjPS.DtResultados.FiltroPrimeroValor("Marca", String.Format("CvePS = {0}", CvePSAjuste))
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
|
||||
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
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
|
||||
'Informacion Distribuidor
|
||||
If (CveClienteDistribuidor > 0) Then
|
||||
|
||||
Dim DatosClienteSeleccionado As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", CveClienteDistribuidor))
|
||||
Dim CiudadEstado As String = ""
|
||||
Dim Telefono As String = ""
|
||||
Dim Nombre As String = ""
|
||||
|
||||
If DatosClienteSeleccionado IsNot Nothing Then
|
||||
CiudadEstado = String.Format("{0}, {1}", DatosClienteSeleccionado("Ciudad"), DatosClienteSeleccionado("Estado"))
|
||||
Telefono = DatosClienteSeleccionado("Telefono").ToString
|
||||
Nombre = DatosClienteSeleccionado("Nombre").ToString
|
||||
End If
|
||||
|
||||
params.Add(New ReportParameter("NombreDistribuidor", Nombre))
|
||||
params.Add(New ReportParameter("CiudadEstado", CiudadEstado))
|
||||
params.Add(New ReportParameter("TelCliente", Telefono))
|
||||
End If
|
||||
|
||||
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("Consec", Consec))
|
||||
params.Add(New ReportParameter("FolioAcuse", FolioGarantia))
|
||||
|
||||
'Informacion de Garantia o ajuste
|
||||
params.Add(New ReportParameter("FechaInst", FechaAjuste.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("Fecha", FechaReclamacion.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("Defecto", TipoDefecto))
|
||||
params.Add(New ReportParameter("MesesUso", MesesUso))
|
||||
params.Add(New ReportParameter("PorcentajeAjuste", PorcentajeAjuste))
|
||||
|
||||
'Informacion Acumulador
|
||||
params.Add(New ReportParameter("CodEnsamble", CodigoEnsamble))
|
||||
params.Add(New ReportParameter("CodLinea", CodigoLinea))
|
||||
params.Add(New ReportParameter("CodInspeccion", CodigoInspeccion))
|
||||
params.Add(New ReportParameter("Tipo", BCIAjuste))
|
||||
params.Add(New ReportParameter("Marca", MarcaPS))
|
||||
params.Add(New ReportParameter("Etiqueta", Etiqueta))
|
||||
|
||||
'Informacion Vehiculo
|
||||
params.Add(New ReportParameter("MarcaAuto", MarcaAuto))
|
||||
params.Add(New ReportParameter("TipoAuto", ModeloAuto))
|
||||
|
||||
'Informacion Consumidor
|
||||
'Informacion Distribuidor
|
||||
If (CveCliente > 0) Then
|
||||
|
||||
Dim DatosClienteSeleccionado As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", CveCliente))
|
||||
Dim Nombre As String = DatosClienteSeleccionado.Item("Nombre").ToString
|
||||
Dim Ciudad As String = DatosClienteSeleccionado.Item("Ciudad").ToString
|
||||
Dim Estado As String = DatosClienteSeleccionado.Item("Estado").ToString
|
||||
|
||||
params.Add(New ReportParameter("NombreCliente", Nombre))
|
||||
params.Add(New ReportParameter("Direccion", String.Format("{0}, {1}", Ciudad.Trim, Estado)))
|
||||
params.Add(New ReportParameter("CiudadEstadoConsumidor", String.Format("{0}, {1}", Ciudad.Trim, Estado)))
|
||||
params.Add(New ReportParameter("TelConsumidor", DatosClienteSeleccionado.Item("Telefono").ToString))
|
||||
End If
|
||||
|
||||
params.Add(New ReportParameter("Anio", Año))
|
||||
params.Add(New ReportParameter("Comprobante", Comprobante))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Ajuste.rdlc", DtDatos, params, "Reporte de Ajuste", "PDF")
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
@@ -291,7 +291,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2 truncate">No. Contrato:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtNumeroContrato" runat="server" Width="200px"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtNumeroContrato" runat="server" Width="200px" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNumeroContrato" runat="server" ControlToValidate="TxtNumeroContrato" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''No. Contrato''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCENumeroContrato" runat="server" HighlightCssClass="vco" TargetControlID="RFVNumeroContrato" Width="300px" BehaviorID="_content_VCENumeroContrato"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
@@ -741,16 +741,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="vertical-align: middle;" align="center">
|
||||
<div style="z-index: 5; position: relative;">
|
||||
<div id="DivAdvertencia" clientidmode="Static" runat="server" class="alert alert-warning" style="padding: 5px; margin-bottom: 5px; padding-right: 25px;">
|
||||
<button type="button" class="close" data-dismiss="alert" style="margin-top: 5px;" aria-hidden="true"></button>
|
||||
<asp:Literal Text="En las observaciones se puede generar una plantilla a partir de diferentes etiquetas: {DIA},{MES},{AÑO},{TC}" runat="server" ID="LtlAdvertencia"></asp:Literal>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" runat="server" id="DivImpuestosLocales">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
@@ -1972,8 +1963,21 @@
|
||||
<br />
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate ">Observación de Facturación:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" Width="400px" TextMode="MultiLine" Rows="2"></asp:TextBox>
|
||||
<div class="col-md-7">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" Width="100%" TextMode="MultiLine" Rows="2"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:Button ID="BtnVerPlantilla" runat="server" Text="Ver Plantilla" CssClass="btn btn-sm btn-primary" Width="100%" OnClick="BtnVerPlantilla_Click"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="vertical-align: middle;" align="center">
|
||||
<div style="z-index: 5; position: relative;">
|
||||
<div id="DivAdvertencia" clientidmode="Static" runat="server" class="alert alert-warning" style="padding: 5px; margin-bottom: 5px; padding-right: 25px;">
|
||||
<button type="button" class="close" data-dismiss="alert" style="margin-top: 5px;" aria-hidden="true"></button>
|
||||
<asp:Literal Text="En las observaciones se puede generar una plantilla a partir de diferentes etiquetas:<br/> {DIA},{MES},{AÑO},{TC},{MESANTERIOR},{INICIOMESANTERIOR},{FINMESANTERIOR}" runat="server" ID="LtlAdvertencia"></asp:Literal>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2003,11 +2007,11 @@
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Fecha Vencimiento" DataField="FechaVenc" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField HeaderText="Fue Facturado" DataField="FueFacturadoTexto" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
|
||||
<%-- <asp:BoundField HeaderText="Periodo" DataField="Periodo" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />--%>
|
||||
<%-- <asp:BoundField HeaderText="Periodo" DataField="Periodo" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />--%>
|
||||
<asp:HyperLinkField HeaderText="Serie-Folio" DataTextField="VentaFacturada" Target="_blank" ItemStyle-Width="10%" ItemStyle-CssClass="Texto Izquierda" DataNavigateUrlFields="CveVentaFacturada" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||
<asp:BoundField HeaderText="Moneda" DataField="MonedaVenta" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Fecha Facturación" DataField="FechaIngVenta" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<%-- <asp:BoundField HeaderText="SubTotal" DataField="SubTotalVenta" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<%-- <asp:BoundField HeaderText="SubTotal" DataField="SubTotalVenta" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVAVenta" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField HeaderText="IEPS" DataField="IVAVenta" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />--%>
|
||||
<asp:BoundField HeaderText="Total" DataField="TotalVenta" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
|
||||
@@ -4450,15 +4450,17 @@ Partial Class Contratos_Default
|
||||
|
||||
Select Case TipoContrato
|
||||
Case 7 'Contrato Comodato
|
||||
SufijoContrato = "COM"
|
||||
SufijoContrato = "COMODATO"
|
||||
Case 8 'Contrato Consignacion
|
||||
SufijoContrato = "CONSIG"
|
||||
SufijoContrato = "CONSIGNACION"
|
||||
Case 9 'Contrato de Arrendamiento
|
||||
SufijoContrato = "ARRENDAMIENTO"
|
||||
Case 10 'Contrato de Financiamiento
|
||||
SufijoContrato = "FIN"
|
||||
SufijoContrato = "FINANCIAMIENTO"
|
||||
Case 13 'Contrato Servicio Administrado de Impresion (?)
|
||||
SufijoContrato = "MPS"
|
||||
Case 28 'Convenio Precio Fijo
|
||||
SufijoContrato = "CON"
|
||||
SufijoContrato = "CONVENIO"
|
||||
End Select
|
||||
|
||||
Dim Serie As String = String.Format("-{0}-{1}", DateTime.Today.Year, SufijoContrato)
|
||||
@@ -4504,6 +4506,61 @@ Partial Class Contratos_Default
|
||||
UpFacCiclica.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnVerPlantilla_Click(sender As Object, e As EventArgs)
|
||||
Dim Plantilla As String = TxtObservaciones.Text
|
||||
|
||||
If Plantilla.Contains("{DIA}") Then
|
||||
Plantilla = Plantilla.Replace("{DIA}", DateTime.Now.Day.ToString())
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{MES}") Then
|
||||
Dim fecha As DateTime = DateTime.Now
|
||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
|
||||
Plantilla = Plantilla.ToString().Replace("{MES}", nombreMes)
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{AÑO}") Then
|
||||
Plantilla = Plantilla.Replace("{AÑO}", DateTime.Now.Year.ToString())
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{TC}") Then
|
||||
Plantilla = Plantilla.Replace("{TC}", GlobalTipoCambio(Now).FormatoNumero)
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{MESANTERIOR}") Then
|
||||
Dim fecha As DateTime = DateTime.Now.AddMonths(-1)
|
||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
|
||||
Plantilla = Plantilla.ToString().Replace("{MESANTERIOR}", nombreMes)
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{INICIOMESANTERIOR}") Then
|
||||
Dim fecha As DateTime = DateTime.Now.AddMonths(-1)
|
||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
|
||||
Dim mesAnterior As String = String.Format("01 {0} {1}", nombreMes, fecha.Year)
|
||||
|
||||
Plantilla = Plantilla.ToString().Replace("{INICIOMESANTERIOR}", mesAnterior)
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{FINMESANTERIOR}") Then
|
||||
Dim fecha As DateTime = DateTime.Now.AddMonths(-1)
|
||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
|
||||
Dim LastDayOfMonth = DateTime.DaysInMonth(fecha.Year, fecha.Month)
|
||||
|
||||
Dim mesAnterior As String = String.Format("{0} {1} {2}", LastDayOfMonth, nombreMes, fecha.Year)
|
||||
|
||||
Plantilla = Plantilla.ToString().Replace("{FINMESANTERIOR}", mesAnterior)
|
||||
End If
|
||||
|
||||
Alert(Plantilla)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3001,31 +3001,34 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero()).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
|
||||
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, 13, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, CveMovimientoRelacionado:=CveMovimientoRef, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="RA/VD")
|
||||
|
||||
If CveMovimientoVirtual > 0 Then
|
||||
FolioVirtual = ObjInventario.Folio
|
||||
|
||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
|
||||
Dim CantidadUsado As Decimal = RowUsado("Cantidad").ToString().ToDecimal()
|
||||
Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal()
|
||||
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, 13, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, CveMovimientoRelacionado:=CveMovimientoRef, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="RA/VD")
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
If CveMovimientoVirtual > 0 Then
|
||||
FolioVirtual = ObjInventario.Folio
|
||||
|
||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
|
||||
Dim CantidadUsado As Decimal = RowUsado("Cantidad").ToString().ToDecimal()
|
||||
Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal()
|
||||
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If SumarImporteUsados Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoVirtual, UsuarioActual.CveEmpresa) Then
|
||||
ImporteIngresoAdicional = ObjInventario.DtResultados.SUMD("TotalOriginal")
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If SumarImporteUsados Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoVirtual, UsuarioActual.CveEmpresa) Then
|
||||
ImporteIngresoAdicional = ObjInventario.DtResultados.SUMD("TotalOriginal")
|
||||
End If
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
@@ -369,20 +369,26 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlBCIAjuste" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="BCI" DataValueField="CveBCIUsado" Width="100%" AutoPostBack="true">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlBCIAjuste.ClientID.ToString()%>">BCI:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtEtiqueta" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtEtiqueta.ClientID.ToString()%>">Etiqueta:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlFolioGarantia" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="FolioGarantia" DataValueField="CveFolioGarantia" Width="100%" AutoPostBack="true">
|
||||
</asp:DropDownList>
|
||||
<%-- <asp:RequiredFieldValidator ID="RFVFolioGarantia" runat="server" ControlToValidate="DdlFolioGarantia" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAjuste"></asp:RequiredFieldValidator>
|
||||
<%-- <asp:RequiredFieldValidator ID="RFVFolioGarantia" runat="server" ControlToValidate="DdlFolioGarantia" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAjuste"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFolioGarantia" runat="server" HighlightCssClass="vco" TargetControlID="RFVFolioGarantia"></ajax:ValidatorCalloutExtender>--%>
|
||||
<label for="<%= DdlFolioGarantia.ClientID.ToString()%>">Folio:</label>
|
||||
</div>
|
||||
|
||||
@@ -2656,6 +2656,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
TmpDTAjustes.Columns.Add("CveFolioGarantia", GetType(Integer))
|
||||
TmpDTAjustes.Columns.Add("CveTipoUso", GetType(Integer))
|
||||
TmpDTAjustes.Columns.Add("CveTipoDefecto", GetType(Integer))
|
||||
TmpDTAjustes.Columns.Add("CodigoTD", GetType(String))
|
||||
TmpDTAjustes.Columns.Add("CodigoEnsamble", GetType(String))
|
||||
TmpDTAjustes.Columns.Add("CodigoLinea", GetType(String))
|
||||
TmpDTAjustes.Columns.Add("CodigoInspeccion", GetType(String))
|
||||
@@ -2664,7 +2665,8 @@ Partial Class Inventarios_RecepcionUsados
|
||||
TmpDTAjustes.Columns.Add("FechaAjuste", GetType(Date))
|
||||
TmpDTAjustes.Columns.Add("Meses", GetType(String))
|
||||
TmpDTAjustes.Columns.Add("PorcentajeAjuste", GetType(Double))
|
||||
TmpDTAjustes.Columns.Add("NumPoliza", GetType(String))
|
||||
TmpDTAjustes.Columns.Add("TipoComprobante", GetType(Integer))
|
||||
TmpDTAjustes.Columns.Add("Comprobante", GetType(String))
|
||||
TmpDTAjustes.Columns.Add("Importe", GetType(Double))
|
||||
TmpDTAjustes.Columns.Add("CvePS", GetType(Integer))
|
||||
TmpDTAjustes.Columns.Add("PS", GetType(String))
|
||||
@@ -2673,6 +2675,11 @@ Partial Class Inventarios_RecepcionUsados
|
||||
TmpDTAjustes.Columns.Add("CveVentaDetalle", GetType(Integer))
|
||||
TmpDTAjustes.Columns.Add("CveVenta", GetType(Integer))
|
||||
TmpDTAjustes.Columns.Add("PUFactura", GetType(Double))
|
||||
TmpDTAjustes.Columns.Add("CveBCIAjuste", GetType(Integer))
|
||||
TmpDTAjustes.Columns.Add("Etiqueta", GetType(String))
|
||||
TmpDTAjustes.Columns.Add("CveClienteDistribuidor", GetType(Integer))
|
||||
TmpDTAjustes.Columns.Add("CveModeloAuto", GetType(Integer))
|
||||
TmpDTAjustes.Columns.Add("Año", GetType(String))
|
||||
End Sub
|
||||
Private Sub CargaPSAjuste()
|
||||
DdlPSAjuste.setEsWebService(True)
|
||||
@@ -2963,6 +2970,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Row("CveFolioGarantia") = DdlFolioGarantia.SelectedValue.ToEntero
|
||||
Row("CveTipoUso") = DdlTipoUso.SelectedValue.ToEntero
|
||||
Row("CveTipoDefecto") = DdlTipoDefecto.SelectedValue.ToEntero
|
||||
Row("CodigoTD") = TxtCodigoTD.Text
|
||||
Row("CodigoEnsamble") = TxtCodEnsamble.Text
|
||||
Row("CodigoLinea") = TxtCodLinea.Text
|
||||
Row("CodigoInspeccion") = TxtCodInspeccion.Text
|
||||
@@ -2970,7 +2978,8 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Row("FechaAjuste") = TxtFechaAjuste.Text.ToDate
|
||||
Row("Meses") = TxtMesesUso.Text.ToEntero
|
||||
Row("PorcentajeAjuste") = TxtPorcentajeAjuste.Text.ToDouble
|
||||
Row("NumPoliza") = TxtPoliza.Text
|
||||
Row("TipoComprobante") = 1
|
||||
Row("Comprobante") = TxtPoliza.Text
|
||||
Row("Importe") = TxtImporteAjuste.Text.ToDouble
|
||||
Row("ConsecutivoVenta") = TxtConsecutivoAjuste.Text.ToEntero()
|
||||
Row("CvePS") = DdlPSAjuste.SelectedValue
|
||||
@@ -2988,6 +2997,11 @@ Partial Class Inventarios_RecepcionUsados
|
||||
End If
|
||||
Row("CveUM") = CveUM
|
||||
Row("CveVentaDetalle") = -1
|
||||
Row("CveBCIAjuste") = DdlBCIAjuste.SelectedValue.ToEntero()
|
||||
Row("Etiqueta") = TxtEtiqueta.Text.TrimStart.TrimEnd
|
||||
Row("CveClienteDistribuidor") = -1
|
||||
Row("CveModeloAuto") = -1
|
||||
Row("Año") = ""
|
||||
TmpDTAjustes.Rows.Add(Row)
|
||||
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
<div style="">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveSubProyecto,SubProyecto,IdSegNeg,Estatus,Serie,IVA,Calle,NoExt,NoInt,Colonia,Localidad,Municipio,Estado,Pais,CP,CveProyecto,TipoSucursal,EsSucursal,
|
||||
CvePais,CveEstado,CveMunicipio,CveColonia,AplicaComercioExterior,CvePrecioLista,Correo,Telefono,UTCOffsetVerano,UTCOffsetInvierno,NoVerificaAlmacen"
|
||||
CvePais,CveEstado,CveMunicipio,CveColonia,AplicaComercioExterior,CvePrecioLista,Correo,Telefono,UTCOffsetVerano,UTCOffsetInvierno,NoVerificaAlmacen,CodigoSucursal"
|
||||
EmptyDataText="No se encontraron SubProyectos" ShowHeader="true" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="SubProyecto" HeaderText="Centro de costo" />
|
||||
@@ -158,6 +158,10 @@
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlSegmentoNegocio.ClientID.ToString()%>">Segmento Negocio:</label>
|
||||
</div>
|
||||
<div id="DivCodigoSucursal" runat="server" visible="false" class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCodigoSucursal" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<label for="<%= TxtCentroCosto.ClientID.ToString()%>">Código Sucursal:</label>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
@@ -61,6 +61,11 @@ Partial Class CatSubProyectos
|
||||
|
||||
GvDatos.Columns(2).Visible = False
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
DivCodigoSucursal.Visible = True
|
||||
End If
|
||||
|
||||
CargaProyecto()
|
||||
CargaSegmentosNegocio()
|
||||
|
||||
@@ -296,7 +301,8 @@ Partial Class CatSubProyectos
|
||||
CargaColonia()
|
||||
DdlColonia.SelectedValueExist(GvRow.DataKey("CveColonia"))
|
||||
AplicaComercio()
|
||||
ChkNoVerificaAlmacen.Checked = If(GvRow.DataKey("NoVerificaAlmacen").ToString = "True", True, False)
|
||||
ChkNoVerificaAlmacen.Checked = If(GvRow.DataKey("NoVerificaAlmacen").ToString = "True", True, False)
|
||||
TxtCodigoSucursal.Text = (GvRow.DataKey("CodigoSucursal"))
|
||||
|
||||
BtnGuardar.Text = "Actualizar"
|
||||
CargaRequired()
|
||||
@@ -366,7 +372,7 @@ Partial Class CatSubProyectos
|
||||
If Not ObjSubproyectos.AddCentroCosto(TxtCentroCosto.Text.Trim, IdSeg, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, Serie:=TxtSerie.Text.Trim, IVA:=TxtIVA.Text.ToDecimal, Calle:=TxtCalle.Text.Trim, NoExt:=TxtNoExt.Text.Trim,
|
||||
NoInt:=TxtNoInt.Text.Trim, Colonia:=TxtColonia.Text.Trim, Localidad:=TxtLocalidad.Text.Trim, Municipio:=TxtMunicipio.Text.Trim, Estado:=TxtEstado.Text.Trim, Pais:=TxtPais.Text.Trim, CP:=TxtCP.Text.Trim, TipoSucursal:=TipoSucursal, EsSucursal:=EsSucursal,
|
||||
CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, Correo:=TxtCorreo.Text, CvePrecioLista:=DdlPrecioLista.SelectedValue.ToEntero,
|
||||
Telefono:=TxtTelefono.Text, NoVerificaAlmacen:=ChkNoVerificaAlmacen.Checked) Then
|
||||
Telefono:=TxtTelefono.Text, NoVerificaAlmacen:=ChkNoVerificaAlmacen.Checked, CodigoSucursal:=TxtCodigoSucursal.Text.Trim) Then
|
||||
TieneError = True
|
||||
Else
|
||||
CveSubProyecto = ObjSubproyectos.CveSubProyecto
|
||||
@@ -376,7 +382,7 @@ Partial Class CatSubProyectos
|
||||
If Not ObjSubproyectos.UpdateCentroCosto(CveCentroCosto, TxtCentroCosto.Text.Trim, IdSeg, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, Serie:=TxtSerie.Text.Trim, IVA:=TxtIVA.Text.ToDecimal, Calle:=TxtCalle.Text.Trim, NoExt:=TxtNoExt.Text.Trim,
|
||||
NoInt:=TxtNoInt.Text.Trim, Colonia:=TxtColonia.Text.Trim, Localidad:=TxtLocalidad.Text.Trim, Municipio:=TxtMunicipio.Text.Trim, Estado:=TxtEstado.Text.Trim, Pais:=TxtPais.Text.Trim, CP:=TxtCP.Text.Trim, TipoSucursal:=TipoSucursal, EsSucursal:=EsSucursal,
|
||||
CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, Correo:=TxtCorreo.Text, CvePrecioLista:=DdlPrecioLista.SelectedValue.ToEntero,
|
||||
Telefono:=TxtTelefono.Text, HorarioVerano:=TxtHorarioVerano.Text.ToEntero, HorarioInvierno:=TxtHorarioInvierno.Text.ToEntero, NoVerificaAlmacen:=ChkNoVerificaAlmacen.Checked) Then
|
||||
Telefono:=TxtTelefono.Text, HorarioVerano:=TxtHorarioVerano.Text.ToEntero, HorarioInvierno:=TxtHorarioInvierno.Text.ToEntero, NoVerificaAlmacen:=ChkNoVerificaAlmacen.Checked, CodigoSucursal:=TxtCodigoSucursal.Text.Trim) Then
|
||||
TieneError = True
|
||||
End If
|
||||
Else
|
||||
|
||||
@@ -167,6 +167,14 @@
|
||||
.no-padding {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.labelgray {
|
||||
top: 0;
|
||||
margin-bottom: 0;
|
||||
font-size: 13px;
|
||||
color: #888888;
|
||||
opacity: 1;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
@@ -819,7 +827,7 @@
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:TextBox ID="TxtTotal" runat="server" ClientIDMode="Static" BorderStyle="None" Style="text-align: right;" Text="0.00" Width="78px"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtTotal" runat="server" ClientIDMode="Static" BorderStyle="None" Style="text-align: right; font-weight:bold" Text="0.00" Width="78px"></asp:TextBox>
|
||||
<asp:HiddenField ID="HdnVentaSaldo" runat="server" ClientIDMode="Static" Value="0" />
|
||||
<asp:HiddenField ID="HdnTotalVenta" runat="server" ClientIDMode="Static" Value="0" />
|
||||
</ContentTemplate>
|
||||
@@ -2645,8 +2653,8 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= DdlPS.ClientID.ToString()%>">Producto/Servicio:</label>
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width: 100%;" CssClass=" form-control input-sm DdlPS" IncluyeTodos="false" CssClassDdl="select2me form-control" DataTextField="PSCodigo" DataValueField="CvePS" data-onresult="CargaExistenciaAlmacenes" Onselectedindexchange="DdlPS_SelectedIndexChanged" />
|
||||
<label for="<%= DdlPS.ClientID.ToString()%>">Producto/Servicio:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2667,7 +2675,7 @@
|
||||
</asp:UpdatePanel>
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
<label>Observación:</label>
|
||||
<label class="labelgray">Observación:</label>
|
||||
<br />
|
||||
<asp:TextBox ID="TxtObsPS" runat="server" Height="100%" Width="100%" TextMode="MultiLine" CausesValidation="true" MaxLength="500"></asp:TextBox>
|
||||
</div>
|
||||
@@ -2763,7 +2771,7 @@
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:Label ID="LblTot" runat="server">Total: $</asp:Label>
|
||||
<asp:Label ID="LblTot" runat="server" CssClass="labelgray">Total: $</asp:Label>
|
||||
<asp:Label ID="LblTotalPS" runat="server" ClientIDMode="Static" Text="0.00"></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-6" align="right" id="divagregrarotrops" runat="server">
|
||||
@@ -2816,12 +2824,13 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<div>
|
||||
<label for="<%= DdlDistribuidor.ClientID.ToString()%>">Distribuidor:</label><br />
|
||||
<ADS:Dropdownlost ID="DdlDistribuidor" data-metodo="getcliente" CssStyle="width:100%" CssClassDdl="select2me" runat="server" DataTextField="CodigoNombre" DataValueField="CveCliente" Width="300px"></ADS:Dropdownlost>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<ADS:Dropdownlost ID="DdlDistribuidor" data-metodo="getcliente" CssStyle="width:100%" CssClass=" form-control input-sm DdlPS" CssClassDdl="select2me form-control" runat="server" DataTextField="CodigoNombre" DataValueField="CveCliente" Width="300px"></ADS:Dropdownlost>
|
||||
<label for="<%= DdlDistribuidor.ClientID.ToString()%>">Distribuidor:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
@@ -2842,13 +2851,19 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlBCIAjuste" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="BCI" DataValueField="CveBCIUsado" Width="100%" AutoPostBack="true">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlBCIAjuste.ClientID.ToString()%>">BCI:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtEtiqueta" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtEtiqueta.ClientID.ToString()%>">Etiqueta:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
@@ -2897,7 +2912,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label for="<%= TxtFechaAjuste.ClientID.ToString()%>">Fecha:</label>
|
||||
<label for="<%= TxtFechaAjuste.ClientID.ToString()%>" class="labelgray">Fecha:</label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaAjuste" CssClass="form-control input-sm ADSMaskDate" Width="100%" runat="server"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
@@ -2923,11 +2938,11 @@
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtMesesUso" CssClass="form-control" runat="server" MaxLength="50" Enabled="false"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtMesesUso" CssClass="form-control" runat="server" MaxLength="50" Enabled="false" style="font-weight:bold"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVMesesUso" runat="server" ControlToValidate="TxtMesesUso" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Meses de Uso''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEMesesUso" runat="server" HighlightCssClass="vco" TargetControlID="RFVMesesUso"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBEMesesUso" runat="server" TargetControlID="TxtMesesUso" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<label for="<%= TxtMesesUso.ClientID.ToString()%>">Meses de Uso:</label>
|
||||
<label for="<%= TxtMesesUso.ClientID.ToString()%>" style="font-weight:bold">Meses de Uso:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2952,33 +2967,45 @@
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPorcentajeAjuste" CssClass="form-control" Enabled="false" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtPorcentajeAjuste" CssClass="form-control" Enabled="false" runat="server" MaxLength="50" style="font-weight:bold"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVPorcentajeAjuste" runat="server" ControlToValidate="TxtPorcentajeAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''% Ajuste''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPorcentajeAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVPorcentajeAjuste"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBEPorcentajeAjuste" runat="server" TargetControlID="TxtPorcentajeAjuste" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<label for="<%= TxtPorcentajeAjuste.ClientID.ToString()%>">% Ajuste:</label>
|
||||
<label for="<%= TxtPorcentajeAjuste.ClientID.ToString()%>" style="font-weight:bold">% Ajuste:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPoliza" CssClass="form-control" runat="server" MaxLength="50" Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVPoliza" runat="server" ControlToValidate="TxtPoliza" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Póliza''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||
<asp:DropDownList ID="DdlTipoComprobanteAjuste" CssClass="form-control input-sm select2me" runat="server" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Póliza" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Factura" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Clave_Red * Req Autorización" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoComprobanteAjuste" runat="server" ControlToValidate="DdlTipoComprobanteAjuste" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Comprobante''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETipoComprobanteAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoComprobanteAjuste"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= DdlTipoDefecto.ClientID.ToString()%>">Tipo de Comprobante:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtComprobante" CssClass="form-control" runat="server" MaxLength="50" Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVPoliza" runat="server" ControlToValidate="TxtComprobante" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Comprobante''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVPoliza" runat="server" ControlToValidate="TxtPoliza" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Poliza''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
|
||||
<%--<ajax:ValidatorCalloutExtender ID="VCEPoliza" runat="server" HighlightCssClass="vco" TargetControlID="RFVPoliza"></ajax:ValidatorCalloutExtender>--%>
|
||||
<label for="<%= TxtPoliza.ClientID.ToString()%>">Póliza:</label>
|
||||
<label for="<%= TxtComprobante.ClientID.ToString()%>">Comprobante:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 17px;">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtImporteAjuste" CssClass="form-control" runat="server" Enabled="false" MaxLength="50"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtImporteAjuste" CssClass="form-control" runat="server" Enabled="false" MaxLength="50" style="font-weight:bold"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVImporteAjuste" runat="server" ControlToValidate="TxtImporteAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEImporteAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVImporteAjuste"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBEImporteAjuste" runat="server" TargetControlID="TxtImporteAjuste" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<label for="<%= TxtImporteAjuste.ClientID.ToString()%>">Importe:</label>
|
||||
<label for="<%= TxtImporteAjuste.ClientID.ToString()%>" style="font-weight:bold">Importe:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
@@ -1144,6 +1144,11 @@ Partial Class PV
|
||||
CargaVenta()
|
||||
End If
|
||||
|
||||
|
||||
If CveVenta > 0 Then
|
||||
CargaTmpDTAjustes()
|
||||
End If
|
||||
|
||||
'CARGA PARA FACTURAR
|
||||
ViewState("CveRemision") = IfNull(Request("CveRemision").ToEntero, 0)
|
||||
ViewState("CveCotizacion") = IfNull(Request("CveCotizacion").ToEntero, 0)
|
||||
@@ -1807,6 +1812,28 @@ Partial Class PV
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If TmpDTRecepcionUsados IsNot Nothing Then
|
||||
If TmpDTRecepcionUsados.Select($"CvePS={Row("CvePS").ToString.ToEntero}").Length > 0 Then
|
||||
Dim rowInv As DataRow = TmpDTRecepcionUsados.Select($"CvePS={Row("CvePS").ToString.ToEntero}")(0)
|
||||
rowInv("CveVentaDetalle") = CveVentaDetalle
|
||||
End If
|
||||
End If
|
||||
|
||||
If TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.Rows.Count > 0 Then
|
||||
If TmpDTAjustes.Select($"ConsecutivoVenta={Row("Consec").ToString.ToEntero}").Length > 0 Then
|
||||
Dim DrAju As DataRow = TmpDTAjustes.Select($"ConsecutivoVenta={Row("Consec").ToString.ToEntero}")(0)
|
||||
DrAju("CveVentaDetalle") = CveVentaDetalle
|
||||
End If
|
||||
End If
|
||||
|
||||
If TmpDTPolizaVirtual IsNot Nothing Then
|
||||
If TmpDTPolizaVirtual.Select($"CvePS={Row("CvePS").ToString.ToEntero}").Length > 0 Then
|
||||
Dim RowPoliza As DataRow = TmpDTPolizaVirtual.Select($"CvePS={Row("CvePS").ToString.ToEntero}")(0)
|
||||
RowPoliza("CveVentaDetalle") = CveVentaDetalle
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
If Not ObjVentas.AddVentaDetalle(CveVenta, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("CveUM").ToString.ToEntero,
|
||||
Row("PU").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("ImporteIVA").ToString.ToDouble, Math.Round((Row("Total").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)) * (1 + Row("PorcentajeIVA").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)))), 6),
|
||||
@@ -1901,9 +1928,11 @@ Partial Class PV
|
||||
If Not OcurrioError AndAlso TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.Rows.Count > 0 Then
|
||||
For Each Dr As DataRow In TmpDTAjustes.Rows
|
||||
If Not ObjAcum.AddGarantiasDetalle(Dr("CveVentaDetalle").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("CveFolioGarantia").ToString.ToEntero, Dr("CveTipoUso").ToString.ToEntero,
|
||||
Dr("CodigoEnsamble").ToString, Dr("CodigoLinea").ToString, Dr("CodigoInspeccion").ToString, Dr("CveTipoDefecto").ToString.ToEntero,
|
||||
Dr("NumPoliza").ToString, Dr("Importe").ToString.ToDouble, Dr("Consecutivo").ToString, Dr("FechaAjuste").ToString.ToDateTime(), Dr("PorcentajeAjuste").ToString.ToDecimal()) Then
|
||||
ErrorList.Add("Ocurrió un error al agregar la garantia detalle.")
|
||||
Dr("CodigoEnsamble").ToString, Dr("CodigoLinea").ToString, Dr("CodigoInspeccion").ToString, Dr("CveTipoDefecto").ToString.ToEntero, Dr("CodigoTD").ToString, Dr("TipoComprobante").ToString.ToEntero,
|
||||
Dr("Comprobante").ToString, Dr("Importe").ToString.ToDouble, Dr("Consecutivo").ToString, Dr("FechaAjuste").ToString.ToDateTime(), Dr("PorcentajeAjuste").ToString.ToDecimal(),
|
||||
Dr("CveBCIAjuste").ToString.ToEntero(), Dr("Etiqueta").ToString, Dr("CveClienteDistribuidor").ToString.ToEntero(), Dr("CveModeloAuto").ToString.ToEntero(), Dr("Año").ToString) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
@@ -2451,9 +2480,9 @@ Partial Class PV
|
||||
End If
|
||||
|
||||
If CveVenta <= 0 Then
|
||||
CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString.ToEntero
|
||||
CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString.ToEntero
|
||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI.ToString)
|
||||
DdlMetodoPago.SelectedValueExist(ObjCliente.CveMetodoPago.ToString)
|
||||
'DdlMetodoPago.SelectedValueExist(ObjCliente.CveMetodoPago.ToString)
|
||||
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33.ToString)
|
||||
'DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString)
|
||||
DdlMetodoPago33_SelectedIndexChanged(DdlMetodoPago33, EventArgs.Empty)
|
||||
@@ -2652,7 +2681,7 @@ Partial Class PV
|
||||
PlazoCobranza = ObjCliente.PlazoCobranza
|
||||
|
||||
If CveVenta <= 0 Then
|
||||
CveMetodoPagoCliente = ObjCliente.CveMetodoPago
|
||||
'CveMetodoPagoCliente = ObjCliente.CveMetodoPago
|
||||
DdlMetodoPago.SelectedValueExist(CveMetodoPagoCliente.ToString)
|
||||
|
||||
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33)
|
||||
@@ -3156,10 +3185,19 @@ Partial Class PV
|
||||
If TmpDT.Rows.Count > 0 Then
|
||||
Dim Retorno = ObjFactura.EmitirFactura()
|
||||
If Retorno.CveVenta > 0 Then
|
||||
|
||||
Dim SbAlert As New StringBuilder
|
||||
SbAlert.AppendFormat("{0}<br>", Retorno.Mensajes(Retorno.Mensajes.Count - 1))
|
||||
SbAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta)))
|
||||
SbAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF Factura</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", Retorno.CveVenta)))
|
||||
|
||||
Using ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.GetGarantiasDetalle(Retorno.CveVenta) Then
|
||||
Dim RowGarantia As DataRow = ObjAcum.DtResultados.FiltroPrimero("")
|
||||
If RowGarantia IsNot Nothing Then
|
||||
SbAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF Ajuste</a></li></ul><br/>", Encripta(String.Format("OP=AJUSTE&CVEGARANTIADETALLE={0}", RowGarantia("CveGarantiaDetalle"))))
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
|
||||
Retorno.Mensajes(Retorno.Mensajes.Count - 1) = SbAlert.ToString()
|
||||
End If
|
||||
@@ -3432,7 +3470,7 @@ Partial Class PV
|
||||
|
||||
'SI LA SUCURSAL NO TIENE ENTREGA POR ADELANTADO
|
||||
If ObjFactura.CveAlmacenTraspasoDestino <= 0 And ObjFactura.TipoDocto = "Rem" Then
|
||||
ErrorList.Add("Ocurrió un error al seleccionar el almacen de entrega por adelantado de la sucursal.")
|
||||
ObjFactura.ErrorList.Add("Ocurrió un error al seleccionar el almacen de entrega por adelantado de la sucursal.")
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -4687,10 +4725,10 @@ Partial Class PV
|
||||
LblTotalPS.Text = GvRow.DataKey("Total")
|
||||
ChkAgregar.Checked = False
|
||||
divagregrarotrops.Visible = False
|
||||
If CveVenta <= 0 Then
|
||||
Ajuste()
|
||||
End If
|
||||
|
||||
Ajuste()
|
||||
AddPolizaVirtual(DdlPS.SelectedValue.ToEntero())
|
||||
|
||||
UpVenta.Update()
|
||||
RegistraScript("$('#DivAddVenta').modal({backdrop: 'static', keyboard: false});", "EdicionVenta")
|
||||
End Sub
|
||||
@@ -5967,6 +6005,7 @@ Partial Class PV
|
||||
TmpDTAjustes.Columns.Add("CveFolioGarantia", GetType(Integer))
|
||||
TmpDTAjustes.Columns.Add("CveTipoUso", GetType(Integer))
|
||||
TmpDTAjustes.Columns.Add("CveTipoDefecto", GetType(Integer))
|
||||
TmpDTAjustes.Columns.Add("CodigoTD", GetType(String))
|
||||
TmpDTAjustes.Columns.Add("CodigoEnsamble", GetType(String))
|
||||
TmpDTAjustes.Columns.Add("CodigoLinea", GetType(String))
|
||||
TmpDTAjustes.Columns.Add("CodigoInspeccion", GetType(String))
|
||||
@@ -5975,7 +6014,8 @@ Partial Class PV
|
||||
TmpDTAjustes.Columns.Add("FechaAjuste", GetType(Date))
|
||||
TmpDTAjustes.Columns.Add("Meses", GetType(String))
|
||||
TmpDTAjustes.Columns.Add("PorcentajeAjuste", GetType(Double))
|
||||
TmpDTAjustes.Columns.Add("NumPoliza", GetType(String))
|
||||
TmpDTAjustes.Columns.Add("TipoComprobante", GetType(Integer))
|
||||
TmpDTAjustes.Columns.Add("Comprobante", GetType(String))
|
||||
TmpDTAjustes.Columns.Add("Importe", GetType(Double))
|
||||
TmpDTAjustes.Columns.Add("CvePS", GetType(Integer))
|
||||
TmpDTAjustes.Columns.Add("PS", GetType(String))
|
||||
@@ -5984,6 +6024,93 @@ Partial Class PV
|
||||
TmpDTAjustes.Columns.Add("CveVentaDetalle", GetType(Integer))
|
||||
TmpDTAjustes.Columns.Add("CveVenta", GetType(Integer))
|
||||
TmpDTAjustes.Columns.Add("PUFactura", GetType(Double))
|
||||
TmpDTAjustes.Columns.Add("CveBCIAjuste", GetType(Integer))
|
||||
TmpDTAjustes.Columns.Add("Etiqueta", GetType(String))
|
||||
TmpDTAjustes.Columns.Add("CveClienteDistribuidor", GetType(Integer))
|
||||
TmpDTAjustes.Columns.Add("Distribuidor", GetType(String))
|
||||
TmpDTAjustes.Columns.Add("CveModeloAuto", GetType(Integer))
|
||||
TmpDTAjustes.Columns.Add("Año", GetType(String))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaTmpDTAjustes()
|
||||
Dim DtGarantias As DataTable = Nothing
|
||||
Using ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.GetGarantiasDetalle(CveVenta) Then
|
||||
Dim RowGarantia As DataRow = ObjAcum.DtResultados.FiltroPrimero("")
|
||||
If RowGarantia IsNot Nothing Then
|
||||
If ObjAcum.GetFoliosGarantiasDetalle(-1, CveGarantiaDetalle:=RowGarantia("CveGarantiaDetalle").ToString().ToEntero()) Then
|
||||
DtGarantias = ObjAcum.DtResultados.Copy()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
|
||||
If DtGarantias IsNot Nothing Then
|
||||
For Each Row As DataRow In DtGarantias.Rows
|
||||
Dim RowAjuste As DataRow = TmpDTAjustes.NewRow
|
||||
|
||||
RowAjuste("CveFolioGarantia") = Row("CveFolioGarantia")
|
||||
RowAjuste("CveTipoUso") = Row("CveTipoUso")
|
||||
RowAjuste("CveTipoDefecto") = Row("CveTipoDefecto")
|
||||
RowAjuste("CodigoTD") = Row("CodigoTipoDefecto")
|
||||
RowAjuste("CodigoEnsamble") = Row("CodigoEnsamble")
|
||||
RowAjuste("CodigoLinea") = Row("CodigoLinea")
|
||||
RowAjuste("CodigoInspeccion") = Row("CodigoInspeccion")
|
||||
RowAjuste("Consecutivo") = Row("Consecutivo")
|
||||
RowAjuste("FechaAjuste") = Row("FechaAjuste")
|
||||
|
||||
Dim FechaAjuste As DateTime = Row("FechaVenta").ToString.ToDateTime()
|
||||
Dim FechaReclamacion As DateTime = Row("FechaReclamacion").ToString.ToDateTime()
|
||||
|
||||
Dim FechaI As Date = FechaAjuste.AddDays(1)
|
||||
Dim FechaF As Date = FechaReclamacion
|
||||
|
||||
Dim Dia As Integer = FechaI.Day
|
||||
Try
|
||||
'validación adicional, para saber si el mes tiene 31 días y el actua es menor.
|
||||
If FechaI.Day > Today.LastDayOfMonth.Day Then Dia = Today.LastDayOfMonth.Day
|
||||
Dim FechaT As Date = String.Format("{0}/{1}/{2}", Dia, FechaF.Month, FechaF.Year).ToDate 'armo la fecha con el día del mes actual
|
||||
|
||||
Dim MesesTrascurridos As Integer = Math.Round(DateDiff(DateInterval.Day, FechaI, FechaT) / 30.4, 2).ToEntero 'saco los meses y lo redondeo
|
||||
|
||||
If FechaT > FechaF Then
|
||||
'todavía está en el mes actual.
|
||||
MesesTrascurridos = MesesTrascurridos
|
||||
Else
|
||||
MesesTrascurridos = MesesTrascurridos + 1
|
||||
End If
|
||||
|
||||
RowAjuste("Meses") = MesesTrascurridos.ToString
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al calcular los meses de uso", ex)
|
||||
End Try
|
||||
|
||||
RowAjuste("PorcentajeAjuste") = Row("PorcentajeAjuste")
|
||||
RowAjuste("TipoComprobante") = Row("TipoComprobante")
|
||||
RowAjuste("Comprobante") = Row("Comprobante")
|
||||
RowAjuste("Importe") = Row("Importe")
|
||||
|
||||
If TmpDT IsNot Nothing Then
|
||||
RowAjuste("ConsecutivoVenta") = TmpDT.FiltroPrimeroValor("Consec", $"CveVentaDetalle={Row("CveVentaDetalle")}")
|
||||
End If
|
||||
|
||||
RowAjuste("CvePS") = Row("CvePS")
|
||||
RowAjuste("PS") = Row("PS")
|
||||
RowAjuste("CveVenta") = Row("CveRemision")
|
||||
RowAjuste("PUFactura") = Row("Importe")
|
||||
RowAjuste("Cantidad") = 1
|
||||
|
||||
RowAjuste("CveBCIAjuste") = Row("CveBCIAjuste")
|
||||
RowAjuste("Etiqueta") = Row("Etiqueta")
|
||||
RowAjuste("CveClienteDistribuidor") = Row("CveClienteDistribuidor")
|
||||
RowAjuste("Distribuidor") = Row("Distribuidor")
|
||||
RowAjuste("CveModeloAuto") = Row("CveModeloAuto")
|
||||
RowAjuste("Año") = Row("Año")
|
||||
|
||||
TmpDTAjustes.Rows.Add(RowAjuste)
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -6047,6 +6174,7 @@ Partial Class PV
|
||||
CreaDTmpDTPolizaVirtual()
|
||||
DdlDistribuidor.setEsWebService(True)
|
||||
DivChkAjuste.Visible = True
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaModelos()
|
||||
@@ -6087,7 +6215,9 @@ Partial Class PV
|
||||
' DdlPSAjuste.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DtPUFacturas.AcceptChanges()
|
||||
UpAjuste.Update()
|
||||
CalculaPorcentajeAjuste()
|
||||
If CveVenta < 0 Then
|
||||
CalculaPorcentajeAjuste()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Ajuste()
|
||||
@@ -6097,11 +6227,16 @@ Partial Class PV
|
||||
TxtPrecio.Attributes.Add("onKeyUp", $"CambiaAjuste(this,{TxtPrecio.ClientID});")
|
||||
ChkAjuste.Checked = True
|
||||
DivAjuste.Visible = True
|
||||
|
||||
ChkAjuste_CheckedChanged(ChkAjuste, EventArgs.Empty)
|
||||
|
||||
CargaAjusteDetalle()
|
||||
Else
|
||||
ModalidadAjuste = "A"
|
||||
TxtPrecio.Attributes.Add("onKeyUp ", "Recalcula();")
|
||||
End If
|
||||
|
||||
UpAjuste.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub LimpiaAjuste()
|
||||
@@ -6117,11 +6252,15 @@ Partial Class PV
|
||||
TxtMesesUso.Text = ""
|
||||
DdlTipoDefecto.SelectedIndex = -1
|
||||
TxtPorcentajeAjuste.Text = ""
|
||||
TxtPoliza.Text = ""
|
||||
TxtComprobante.Text = ""
|
||||
TxtImporteAjuste.Text = ""
|
||||
DdlPSAjuste.SelectedValue = "-1"
|
||||
ChkAjuste.Checked = False
|
||||
DivAjuste.Visible = False
|
||||
DdlBCIAjuste.SelectedValueExist(-1)
|
||||
TxtEtiqueta.Text = ""
|
||||
DdlModeloAuto.SelectedValueExist(-1)
|
||||
TxtAnioVehiculo.Text = ""
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -6137,6 +6276,18 @@ Partial Class PV
|
||||
Next
|
||||
If Dr IsNot Nothing Then
|
||||
IndexAjuste = TmpDTAjustes.Rows.IndexOf(Dr)
|
||||
|
||||
CargaPSAjuste()
|
||||
|
||||
DdlPSAjuste.SelectedValue = Dr("CvePS").ToString()
|
||||
DdlPSAjuste.SelectedText = Dr("PS").ToString()
|
||||
DdlPSAjuste_selectedindexchange(DdlPSAjuste, EventArgs.Empty)
|
||||
|
||||
If Dr("CveClienteDistribuidor").ToString().ToEntero() > 0 Then
|
||||
DdlDistribuidor.SelectedValue = Dr("CveClienteDistribuidor").ToString()
|
||||
DdlDistribuidor.SelectedText = Dr("Distribuidor").ToString()
|
||||
End If
|
||||
|
||||
DdlFolioGarantia.SelectedValueExist(Dr("CveFolioGarantia").ToString)
|
||||
TxtConsecutivoAjuste.Text = Dr("Consecutivo").ToString
|
||||
TxtCodEnsamble.Text = Dr("CodigoEnsamble").ToString
|
||||
@@ -6145,15 +6296,32 @@ Partial Class PV
|
||||
TxtCodInspeccion.Text = Dr("CodigoInspeccion").ToString
|
||||
TxtMesesUso.Text = Dr("Meses").ToString
|
||||
DdlTipoDefecto.SelectedValueExist(Dr("CveTipoDefecto").ToString)
|
||||
TxtCodigoTD.Text = Dr("CodigoTD").ToString
|
||||
TxtPorcentajeAjuste.Text = Dr("PorcentajeAjuste").ToString
|
||||
TxtPoliza.Text = Dr("NumPoliza").ToString
|
||||
DdlTipoComprobanteAjuste.SelectedValueExist(Dr("TipoComprobante").ToString())
|
||||
TxtComprobante.Text = Dr("Comprobante").ToString
|
||||
TxtImporteAjuste.Text = Dr("Importe").ToString
|
||||
DdlFacturas.SelectedValueExist(Dr("CveVenta").ToString)
|
||||
CargaPSAjuste()
|
||||
DdlPSAjuste.SelectedValue = (Dr("CvePS").ToString)
|
||||
|
||||
If TxtDescuento.Text.ToDecimal() > 0 AndAlso Dr("Importe").ToString.ToDecimal() > 0 Then
|
||||
|
||||
Dim DescuentoSinAjuste As Decimal = TxtDescuento.Text.ToDecimal - Dr("Importe").ToString.ToDecimal
|
||||
|
||||
If DescuentoSinAjuste <= 0 Then
|
||||
TxtDescuento.Text = "0"
|
||||
Else
|
||||
TxtDescuento.Text = DescuentoSinAjuste.FormatoNumero(2)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
TxtFechaAjuste.Text = Dr("FechaAjuste").ToString.ToDate.ToShortDateString
|
||||
TxtPrecio.Text = Dr("PUFactura").ToString.ToDecimal.FormatoNumero(2)
|
||||
TxtPrecio.Enabled = Not Dr("CveVenta").ToString.ToEntero > 0
|
||||
'TxtPrecio.Enabled = Dr("CveVenta").ToString.ToEntero > 0
|
||||
DdlBCIAjuste.SelectedValueExist(Dr("CveBCIAjuste").ToString())
|
||||
TxtEtiqueta.Text = Dr("Etiqueta").ToString
|
||||
DdlModeloAuto.SelectedValueExist(Dr("CveModeloAuto").ToString())
|
||||
TxtAnioVehiculo.Text = Dr("Año").ToString
|
||||
End If
|
||||
End Sub
|
||||
'Protected Sub BtnCalculaMesesUso_Click(sender As Object, e As EventArgs)
|
||||
@@ -6188,7 +6356,7 @@ Partial Class PV
|
||||
TxtMesesUso.Text = MesesTrascurridos.ToString
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al calcular los meses de uso", ex)
|
||||
OnError("Ocurrió un Error al calcular los meses de uso", ex)
|
||||
End Try
|
||||
|
||||
Return True
|
||||
@@ -6342,7 +6510,7 @@ Partial Class PV
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {CveTamaño}")
|
||||
Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} And CveTamaño = {CveTamaño}")
|
||||
If DrCargo IsNot Nothing Then
|
||||
|
||||
CargoVendido = DrCargo("Cargo").ToString.ToDecimal
|
||||
@@ -6395,6 +6563,7 @@ Partial Class PV
|
||||
Row("CveFolioGarantia") = DdlFolioGarantia.SelectedValue.ToEntero
|
||||
Row("CveTipoUso") = DdlTipoUso.SelectedValue.ToEntero
|
||||
Row("CveTipoDefecto") = DdlTipoDefecto.SelectedValue.ToEntero
|
||||
Row("CodigoTD") = TxtCodigoTD.Text
|
||||
Row("CodigoEnsamble") = TxtCodEnsamble.Text
|
||||
Row("CodigoLinea") = TxtCodLinea.Text
|
||||
Row("CodigoInspeccion") = TxtCodInspeccion.Text
|
||||
@@ -6402,7 +6571,8 @@ Partial Class PV
|
||||
Row("FechaAjuste") = TxtFechaAjuste.Text.ToDate
|
||||
Row("Meses") = TxtMesesUso.Text.ToEntero
|
||||
Row("PorcentajeAjuste") = TxtPorcentajeAjuste.Text.ToDouble
|
||||
Row("NumPoliza") = TxtPoliza.Text
|
||||
Row("TipoComprobante") = DdlTipoComprobanteAjuste.SelectedValue.ToEntero()
|
||||
Row("Comprobante") = TxtComprobante.Text
|
||||
Row("Importe") = TxtImporteAjuste.Text.ToDouble
|
||||
Row("ConsecutivoVenta") = ConsecutivoVenta
|
||||
Row("CvePS") = DdlPSAjuste.SelectedValue
|
||||
@@ -6420,11 +6590,17 @@ Partial Class PV
|
||||
End If
|
||||
Row("CveUM") = CveUM
|
||||
Row("CveVentaDetalle") = -1
|
||||
Row("CveBCIAjuste") = DdlBCIAjuste.SelectedValue.ToEntero()
|
||||
Row("Etiqueta") = TxtEtiqueta.Text.TrimStart.TrimEnd
|
||||
Row("CveClienteDistribuidor") = DdlDistribuidor.SelectedValue.ToEntero()
|
||||
Row("CveModeloAuto") = DdlModeloAuto.SelectedValue.ToEntero()
|
||||
Row("Año") = TxtAnioVehiculo.Text.TrimStart.TrimEnd
|
||||
TmpDTAjustes.Rows.Add(Row)
|
||||
ElseIf ModalidadAjuste = "U" Then
|
||||
TmpDTAjustes.Rows(IndexAjuste)("CveFolioGarantia") = DdlFolioGarantia.SelectedValue.ToEntero
|
||||
TmpDTAjustes.Rows(IndexAjuste)("CveTipoUso") = DdlTipoUso.SelectedValue.ToEntero
|
||||
TmpDTAjustes.Rows(IndexAjuste)("CveTipoDefecto") = DdlTipoDefecto.SelectedValue.ToEntero
|
||||
TmpDTAjustes.Rows(IndexAjuste)("CodigoTD") = TxtCodigoTD.Text
|
||||
TmpDTAjustes.Rows(IndexAjuste)("CodigoEnsamble") = TxtCodEnsamble.Text
|
||||
TmpDTAjustes.Rows(IndexAjuste)("CodigoLinea") = TxtCodLinea.Text
|
||||
TmpDTAjustes.Rows(IndexAjuste)("CodigoInspeccion") = TxtCodInspeccion.Text
|
||||
@@ -6432,7 +6608,8 @@ Partial Class PV
|
||||
TmpDTAjustes.Rows(IndexAjuste)("FechaAjuste") = TxtFechaAjuste.Text.ToDate
|
||||
TmpDTAjustes.Rows(IndexAjuste)("Meses") = TxtMesesUso.Text.ToDouble
|
||||
TmpDTAjustes.Rows(IndexAjuste)("PorcentajeAjuste") = TxtPorcentajeAjuste.Text.ToDecimal
|
||||
TmpDTAjustes.Rows(IndexAjuste)("NumPoliza") = TxtPoliza.Text.ToDouble
|
||||
TmpDTAjustes.Rows(IndexAjuste)("TipoComprobante") = DdlTipoComprobanteAjuste.SelectedValue.ToEntero()
|
||||
TmpDTAjustes.Rows(IndexAjuste)("Comprobante") = TxtComprobante.Text.ToDouble
|
||||
TmpDTAjustes.Rows(IndexAjuste)("Importe") = TxtImporteAjuste.Text.ToDouble
|
||||
TmpDTAjustes.Rows(IndexAjuste)("ConsecutivoVenta") = ConsecutivoVenta
|
||||
TmpDTAjustes.Rows(IndexAjuste)("CvePS") = DdlPSAjuste.SelectedValue
|
||||
@@ -6440,6 +6617,11 @@ Partial Class PV
|
||||
TmpDTAjustes.Rows(IndexAjuste)("CveVenta") = DdlFacturas.SelectedValue
|
||||
TmpDTAjustes.Rows(IndexAjuste)("PUFactura") = TxtPrecio.Text.ToDouble
|
||||
TmpDTAjustes.Rows(IndexAjuste)("Cantidad") = 1
|
||||
TmpDTAjustes.Rows(IndexAjuste)("CveBCIAjuste") = DdlBCIAjuste.SelectedValue.ToEntero()
|
||||
TmpDTAjustes.Rows(IndexAjuste)("Etiqueta") = TxtEtiqueta.Text.TrimStart.TrimEnd
|
||||
TmpDTAjustes.Rows(IndexAjuste)("CveClienteDistribuidor") = DdlDistribuidor.SelectedValue.ToEntero()
|
||||
TmpDTAjustes.Rows(IndexAjuste)("CveModeloAuto") = DdlModeloAuto.SelectedValue.ToEntero()
|
||||
TmpDTAjustes.Rows(IndexAjuste)("Año") = TxtAnioVehiculo.Text.TrimStart.TrimEnd
|
||||
Dim CveUM As Integer = -1
|
||||
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
|
||||
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).Rows(0)
|
||||
@@ -7028,11 +7210,19 @@ Partial Class PV
|
||||
If (DdlDistribuidor.SelectedValue.ToEntero > 0) Then
|
||||
|
||||
Dim DatosClienteSeleccionado As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", DdlDistribuidor.SelectedValue.ToEntero))
|
||||
Dim Ciudad As String = DatosClienteSeleccionado.Item("Ciudad").ToString
|
||||
Dim Estado As String = DatosClienteSeleccionado.Item("Estado").ToString
|
||||
params.Add(New ReportParameter("NombreDistribuidor", DdlDistribuidor.SelectedText))
|
||||
params.Add(New ReportParameter("CiudadEstado", String.Format("{0}, {1}", Ciudad.Trim, Estado)))
|
||||
params.Add(New ReportParameter("TelCliente", DatosClienteSeleccionado.Item("Telefono").ToString))
|
||||
Dim CiudadEstado As String = ""
|
||||
Dim Telefono As String = ""
|
||||
Dim Nombre As String = ""
|
||||
|
||||
If DatosClienteSeleccionado IsNot Nothing Then
|
||||
CiudadEstado = String.Format("{0}, {1}", DatosClienteSeleccionado("Ciudad"), DatosClienteSeleccionado("Estado"))
|
||||
Telefono = DatosClienteSeleccionado("Telefono").ToString
|
||||
Nombre = DatosClienteSeleccionado("Nombre").ToString
|
||||
End If
|
||||
|
||||
params.Add(New ReportParameter("NombreDistribuidor", Nombre))
|
||||
params.Add(New ReportParameter("CiudadEstado", CiudadEstado))
|
||||
params.Add(New ReportParameter("TelCliente", Telefono))
|
||||
|
||||
End If
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
@@ -7052,14 +7242,26 @@ Partial Class PV
|
||||
params.Add(New ReportParameter("CodInspeccion", TxtCodInspeccion.Text.Trim))
|
||||
params.Add(New ReportParameter("Tipo", DdlBCIAjuste.SelectedItem.Text))
|
||||
params.Add(New ReportParameter("Marca", MarcaPS))
|
||||
params.Add(New ReportParameter("Etiqueta", TxtEtiqueta.Text))
|
||||
|
||||
'Informacion Vehiculo
|
||||
params.Add(New ReportParameter("MarcaAuto", If(DdlPS.SelectedValue.ToEntero > 0, DtModelosAuto.FiltroPrimeroValor("Marca", $"CveModeloAuto ={DdlModeloAuto.SelectedValue}"), "")))
|
||||
params.Add(New ReportParameter("TipoAuto", If(DdlPS.SelectedValue.ToEntero > 0, DtModelosAuto.FiltroPrimeroValor("Modelo", $"CveModeloAuto ={DdlModeloAuto.SelectedValue}"), "")))
|
||||
|
||||
'Informacion Consumidor
|
||||
params.Add(New ReportParameter("NombreCliente", LtlCliente.Text))
|
||||
params.Add(New ReportParameter("Direccion", LblDireccion.Text))
|
||||
'Informacion Distribuidor
|
||||
If (CveCliente > 0) Then
|
||||
|
||||
Dim DatosClienteSeleccionado As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", DdlDistribuidor.SelectedValue.ToEntero))
|
||||
Dim Ciudad As String = DatosClienteSeleccionado.Item("Ciudad").ToString
|
||||
Dim Estado As String = DatosClienteSeleccionado.Item("Estado").ToString
|
||||
|
||||
params.Add(New ReportParameter("NombreCliente", LtlCliente.Text))
|
||||
params.Add(New ReportParameter("Direccion", LblDireccion.Text))
|
||||
params.Add(New ReportParameter("CiudadEstadoConsumidor", String.Format("{0}, {1}", Ciudad.Trim, Estado)))
|
||||
params.Add(New ReportParameter("TelConsumidor", DatosClienteSeleccionado.Item("Telefono").ToString))
|
||||
|
||||
End If
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
@@ -7067,6 +7269,10 @@ Partial Class PV
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
params.Add(New ReportParameter("Anio", TxtAnioVehiculo.Text))
|
||||
params.Add(New ReportParameter("Comprobante", TxtComprobante.Text))
|
||||
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Ajuste.rdlc", DtDatos, params, "Reporte de Ajuste", "PDF")
|
||||
|
||||
End Sub
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -659,27 +659,6 @@ Partial Class Ventas_RepVentas
|
||||
|
||||
Protected Sub ImgImprimir_Click(sender As Object, e As EventArgs) Handles ImgImprimir.Click
|
||||
GenerarPDF()
|
||||
End Sub
|
||||
|
||||
Private Sub LnkRepHP_Click(sender As Object, e As EventArgs) Handles LnkRepHP.Click
|
||||
|
||||
Dim Rep As New ClsVentas
|
||||
Dim Str As New StringBuilder
|
||||
Str.AppendLine("Header Section,,,,,,,,,,,End Customer Identification ,,,,,,,,,,,,, Ship To Identification,,,,,,,,,,,,, Sold To Identification,,,,,,,,,,,,, Bill To Identification,,,,,,,,,,,,, Salesperson Detail,,,,,, Line Item Detail,,,,,,,,,,,,,,,,,,,,,,,,,,,, New FIELDS,,,,,,,,,,,,,,,,,,,,,,,,,, ")
|
||||
Str.AppendLine("Partner Purchase Price Currency Code, Exchange Rate, Reporter_id, Reported Partner Type, Reporter Company Name , Sell From Address line 1, Sell From Address line 2, Sell From City, Reported Partner State/Province, Sell from postal code, Sell from Country code,End User Customer Name,End User Company Tax ID,End User Address Line 1,End User Address Line 2,End User City,End User State/Province Code,End User Postal Code,End User Country Code,End User ID,End Customer Department,End Customer Contact Name,End Customer Contact Phone,End Customer County, Ship To Customer Name, Ship To Company Tax ID, Ship To Address Line 1, Ship To Address Line 2, Ship To City, Ship To State/Province Code, Ship To Postal Code, Ship To Country Code, Ship To Customer ID, Ship To Department, Ship To Contact Name, Ship To Contact Phone, Ship To County, Sold To Customer Name, Sold To Company Tax ID, Sold To Address Line 1, Sold To Address Line 2, Sold To City, Sold To State/Province Code, Sold To Postal Code, Sold To Country Code, Sold To Customer ID, Sold To Department, Sold To Contact Name, Sold To Contact Phone, Sold To County, Bill To Customer Name, Bill To Company Tax ID, Bill To Address Line 1 , Bill To Address Line 2, Bill To City, Bill To State/Province Code, Bill To Postal Code, Bill To Country Code, Bill To Customer ID, Bill To Agreement Number, Bill To Contact Name, Bill To Contact Phone, Bill To County, HP Representative Name, HP Sales Rep Email, Salesperson2 Name, Salesperson2 Unique Employee ID, Salesperson's Manager's Name,Salesperson's Manager Unique Employee ID,Quantity Qualifier,Product Quantity Shipped/Sold,Line Item ID,Partner Reported Product ID,Product Description,Date Type Qualifier,Channel Partner to Customer Transaction Date,Reseller’’s Product Number,Partner Purchase Price,Extended Price,Partner Sell Price,Extended Resale Price,Transaction Type,Rebate Tracking #,Partner Requested Rebate Amount,Extended Rebate Amount,Debit Number,Channel Partner to Customer Invoice ID,Reference Number,Customer to Channel Partner Purchase Order ID,Deal ID #1,Deal ID #2,Deal ID #3,Deal ID #4,Deal ID #5,Deal ID #6,Marketing Subprogram Code,Product Serial ID assigned by HP,Purchasing Source wholesaler indicator,Drop Ship Flag,Distributor's Invoice Number,Partner Internal transaction ID,Partner Comment,Deal Bundle ID #1,Deal Bundle ID #2,Deal Bundle ID #3,Deal Bundle ID #4,Deal Bundle ID #5,Deal Bundle ID #6,NMSO NAME,Sales Type,Purchase Agreement,Product Origin,Partner Reported CBN#,Partner Reference,Supplies Tracking ID (QR Code),Sell From Location ID (assigned by HP or Partner-assigned),Sell from name,Comment Deal ID #1,Comment Deal ID #2,Comment Deal ID #3,Comment Deal ID #4,Comment Deal ID #5,Comment Deal ID #6,Partner Sell Price Currency Code")
|
||||
If Rep.GetReporteHP(72, Now.AddMonths(-1).FirstDayOfMonth, Now.AddMonths(-1).LastDayOfMonth) Then
|
||||
For Each dr As DataRow In Rep.DtResultados.Rows
|
||||
Str.AppendLine($"MXN,,AM30089,,""COMPUPROVEEDORES, S.A.DE C.V."",,,,,,,,,,,,,,,,,,,,{dr("Nombre")},{dr("RFC")},{dr("Direccion")},,{dr("Ciudad")},{dr("Estado")},{dr("CP")},MX,{dr("RFC")},,,,,{dr("Nombre")},{dr("RFC")},{dr("Direccion")},,{dr("Ciudad")},{dr("Estado")},{dr("CP")},MX,{dr("RFC")},,,,,,,,,,,,,,,,,,,,,,,,,{dr("Cantidad")},,{dr("Codigo")},,,{dr("Fecha")},,,,{dr("PU")},,,,,,,{dr("SerieFolio")},,,,,,,,,,{dr("Serie")},,,,,,,,,,,,,,,{dr("Proveedor")},,,,,,,,,,,,MXN")
|
||||
Next
|
||||
End If
|
||||
|
||||
Rep.Dispose()
|
||||
'GenerarPDF una salida
|
||||
Response.Clear()
|
||||
Response.ContentType = "text/csv"
|
||||
Response.AppendHeader("Content-Disposition", "attachment; filename=ReporteHP.csv")
|
||||
Response.Write(Str.ToString)
|
||||
Context.Response.End()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
@@ -860,5 +839,58 @@ Partial Class Ventas_RepVentas
|
||||
|
||||
#End Region
|
||||
|
||||
Private Sub LnkRepHP_Click(sender As Object, e As EventArgs) Handles LnkRepHP.Click
|
||||
CalcularIntervaloRepHP()
|
||||
RegistraScript("$('#DivRepHP').modal('show');")
|
||||
End Sub
|
||||
Protected Sub RblIntervaloHP_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CalcularIntervaloRepHP()
|
||||
End Sub
|
||||
|
||||
Private Sub CalcularIntervaloRepHP()
|
||||
Dim PrevMondayDate = DateTime.Today.AddDays(-Weekday(Today.AddDays(-1), Microsoft.VisualBasic.FirstDayOfWeek.Monday))
|
||||
Dim Sunday As DateTime = PrevMondayDate.AddDays(6)
|
||||
|
||||
txtFechaIHP.Text = PrevMondayDate.ToString("dd/MM/yyyy")
|
||||
txtFechaFHP.Text = Sunday.ToString("dd/MM/yyyy")
|
||||
'Select Case RblIntervaloHP.SelectedValue
|
||||
' Case "1" ' SEMANAL
|
||||
' Dim PrevMondayDate = DateTime.Today.AddDays(-Weekday(Today.AddDays(-1), Microsoft.VisualBasic.FirstDayOfWeek.Monday))
|
||||
' Dim Sunday As DateTime = PrevMondayDate.AddDays(6)
|
||||
|
||||
' txtFechaIHP.Text = PrevMondayDate.ToString("dd/MM/yyyy")
|
||||
' txtFechaFHP.Text = Sunday.ToString("dd/MM/yyyy")
|
||||
' Case "2" ' MENSUAL
|
||||
' Dim FechaRef As DateTime = Now
|
||||
' Dim LastDayOfMonth = DateTime.DaysInMonth(FechaRef.Year, FechaRef.Month)
|
||||
|
||||
' txtFechaIHP.Text = $"01/{FechaRef.Month}/{FechaRef.Year}"
|
||||
' txtFechaFHP.Text = $"{LastDayOfMonth}/{FechaRef.Month}/{FechaRef.Year}"
|
||||
'End Select
|
||||
UpHP.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnGenerarRepHP_Click(sender As Object, e As EventArgs)
|
||||
Dim FechaI As DateTime = txtFechaIHP.Text.ToDate()
|
||||
Dim FechaF As DateTime = txtFechaFHP.Text.ToDate()
|
||||
|
||||
Dim Rep As New ClsVentas
|
||||
Dim Str As New StringBuilder
|
||||
Str.AppendLine("Header Section,,,,,,,,,,,End Customer Identification ,,,,,,,,,,,,, Ship To Identification,,,,,,,,,,,,, Sold To Identification,,,,,,,,,,,,, Bill To Identification,,,,,,,,,,,,, Salesperson Detail,,,,,, Line Item Detail,,,,,,,,,,,,,,,,,,,,,,,,,,,, New FIELDS,,,,,,,,,,,,,,,,,,,,,,,,,, ")
|
||||
Str.AppendLine("Partner Purchase Price Currency Code, Exchange Rate, Reporter_id, Reported Partner Type, Reporter Company Name , Sell From Address line 1, Sell From Address line 2, Sell From City, Reported Partner State/Province, Sell from postal code, Sell from Country code,End User Customer Name,End User Company Tax ID,End User Address Line 1,End User Address Line 2,End User City,End User State/Province Code,End User Postal Code,End User Country Code,End User ID,End Customer Department,End Customer Contact Name,End Customer Contact Phone,End Customer County, Ship To Customer Name, Ship To Company Tax ID, Ship To Address Line 1, Ship To Address Line 2, Ship To City, Ship To State/Province Code, Ship To Postal Code, Ship To Country Code, Ship To Customer ID, Ship To Department, Ship To Contact Name, Ship To Contact Phone, Ship To County, Sold To Customer Name, Sold To Company Tax ID, Sold To Address Line 1, Sold To Address Line 2, Sold To City, Sold To State/Province Code, Sold To Postal Code, Sold To Country Code, Sold To Customer ID, Sold To Department, Sold To Contact Name, Sold To Contact Phone, Sold To County, Bill To Customer Name, Bill To Company Tax ID, Bill To Address Line 1 , Bill To Address Line 2, Bill To City, Bill To State/Province Code, Bill To Postal Code, Bill To Country Code, Bill To Customer ID, Bill To Agreement Number, Bill To Contact Name, Bill To Contact Phone, Bill To County, HP Representative Name, HP Sales Rep Email, Salesperson2 Name, Salesperson2 Unique Employee ID, Salesperson's Manager's Name,Salesperson's Manager Unique Employee ID,Quantity Qualifier,Product Quantity Shipped/Sold,Line Item ID,Partner Reported Product ID,Product Description,Date Type Qualifier,Channel Partner to Customer Transaction Date,Reseller’’s Product Number,Partner Purchase Price,Extended Price,Partner Sell Price,Extended Resale Price,Transaction Type,Rebate Tracking #,Partner Requested Rebate Amount,Extended Rebate Amount,Debit Number,Channel Partner to Customer Invoice ID,Reference Number,Customer to Channel Partner Purchase Order ID,Deal ID #1,Deal ID #2,Deal ID #3,Deal ID #4,Deal ID #5,Deal ID #6,Marketing Subprogram Code,Product Serial ID assigned by HP,Purchasing Source wholesaler indicator,Drop Ship Flag,Distributor's Invoice Number,Partner Internal transaction ID,Partner Comment,Deal Bundle ID #1,Deal Bundle ID #2,Deal Bundle ID #3,Deal Bundle ID #4,Deal Bundle ID #5,Deal Bundle ID #6,NMSO NAME,Sales Type,Purchase Agreement,Product Origin,Partner Reported CBN#,Partner Reference,Supplies Tracking ID (QR Code),Sell From Location ID (assigned by HP or Partner-assigned),Sell from name,Comment Deal ID #1,Comment Deal ID #2,Comment Deal ID #3,Comment Deal ID #4,Comment Deal ID #5,Comment Deal ID #6,Partner Sell Price Currency Code")
|
||||
If Rep.GetReporteHP(UsuarioActual.CveEmpresa, FechaI, FechaF) Then
|
||||
For Each dr As DataRow In Rep.DtResultados.Rows
|
||||
Str.AppendLine($"MXN,,AM30089,,""COMPUPROVEEDORES, S.A.DE C.V."",,,,,,,,,,,,,,,,,,,,{dr("Nombre")},{dr("RFC")},{dr("Direccion")},,{dr("Ciudad")},{dr("Estado")},{dr("CP")},MX,{dr("RFC")},,,,,{dr("Nombre")},{dr("RFC")},{dr("Direccion")},,{dr("Ciudad")},{dr("Estado")},{dr("CP")},MX,{dr("RFC")},,,,,,,,,,,,,,,,,,,,,,,,,{dr("Cantidad")},,{dr("Codigo")},,,{dr("Fecha")},,,,{dr("PU")},,,,,,,{dr("SerieFolio")},,,,,,,,,,{dr("Serie")},,,,,,,,,,,,,,,{dr("Proveedor")},,,,,,,,,,,,MXN")
|
||||
Next
|
||||
End If
|
||||
|
||||
Rep.Dispose()
|
||||
'GenerarPDF una salida
|
||||
Response.Clear()
|
||||
Response.ContentType = "text/csv"
|
||||
Response.AppendHeader("Content-Disposition", $"attachment; filename=ReporteHP_{FechaI.ToString("dd_MM_yyyy")} a {FechaF.ToString("dd_MM_yyyy")}.csv")
|
||||
Response.Write(Str.ToString)
|
||||
Context.Response.End()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -6291,8 +6291,22 @@ Partial Class Ventas
|
||||
If ObjVentasAplciar.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
If tCveSucursalCliente > 0 Then
|
||||
Retorno = ObjVentasAplciar.DtResultados(0)("LimiteRestanteSucursal").ToString().ToDecimal
|
||||
PorcentajeCredito = ObjVentasAplciar.DtResultados(0)("PorcentajeSaldoSucursal").ToString().ToDecimal
|
||||
|
||||
Dim LimiteRestanteSucursal As Decimal = ObjVentasAplciar.DtResultados(0)("LimiteRestanteSucursal").ToString().ToDecimal
|
||||
Dim PorcentajeSaldoSucursal As Decimal = ObjVentasAplciar.DtResultados(0)("PorcentajeSaldoSucursal").ToString().ToDecimal
|
||||
|
||||
Dim LimiteRestanteCliente As Decimal = ObjVentasAplciar.DtResultados(0)("LimiteRestanteCliente").ToString().ToDecimal
|
||||
Dim PorcentajeSaldoCliente As Decimal = ObjVentasAplciar.DtResultados(0)("PorcentajeSaldoCliente").ToString().ToDecimal
|
||||
|
||||
'SI EL LIMITE DE LA SUCURSAL ES MAYOR AL DEL CLIENTE DEBE LIMITAR AL DEL CLIENTE
|
||||
If LimiteRestanteSucursal > LimiteRestanteCliente Then
|
||||
Retorno = LimiteRestanteCliente
|
||||
PorcentajeCredito = PorcentajeSaldoCliente
|
||||
ElseIf LimiteRestanteSucursal < LimiteRestanteCliente Then
|
||||
Retorno = LimiteRestanteSucursal
|
||||
PorcentajeCredito = PorcentajeSaldoSucursal
|
||||
End If
|
||||
|
||||
Else
|
||||
Retorno = ObjVentasAplciar.DtResultados(0)("LimiteRestanteCliente").ToString().ToDecimal
|
||||
PorcentajeCredito = ObjVentasAplciar.DtResultados(0)("PorcentajeSaldoCliente").ToString().ToDecimal
|
||||
@@ -14402,7 +14416,7 @@ Partial Class Ventas
|
||||
' Alert("El importe registrado como descuento no coincide con el importe seleccionado de anticipo.", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
Dim TotalCalculableImpuestos As Decimal = 0
|
||||
Dim TotalCalculableImpuestos As Decimal = 0, TotalCalculableImpuestosIVA As Decimal = 0
|
||||
Dim TotalDescuentosRound As Decimal = 0
|
||||
Dim Cantidad, PU, Descuento, DescuentoRound As Decimal
|
||||
|
||||
@@ -14416,14 +14430,19 @@ Partial Class Ventas
|
||||
TotalDescuentosRound += DescuentoRound
|
||||
|
||||
TotalCalculableImpuestos = (Cantidad * (PU)) - Descuento
|
||||
TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + dr("PorcentajeIEPS").ToString().ToDecimal)
|
||||
|
||||
dr("Descuento") = DescuentoRound
|
||||
dr("TotalImporte") = Math.Round(Cantidad * PU, NumeroDecimales)
|
||||
dr("ImporteIVA") = Math.Round(dr("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestos, NumeroDecimales)
|
||||
dr("ImporteIEPS") = Math.Round(dr("PorcentajeIEPS").ToString().ToDecimal * TotalCalculableImpuestos, NumeroDecimales)
|
||||
dr("ImporteRetIVA") = Math.Round(ClienteRetIVA * TotalCalculableImpuestos, NumeroDecimales)
|
||||
dr("ImporteRetISR") = Math.Round(ClienteRetISR * TotalCalculableImpuestos, NumeroDecimales)
|
||||
|
||||
dr("Total") = (Cantidad * PU)
|
||||
dr("TotalImporte") = (Cantidad * PU).RoundSQL
|
||||
dr("ImporteIVA") = (dr("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestosIVA).RoundSQL(NumeroDecimales)
|
||||
dr("ImporteIEPS") = (dr("PorcentajeIEPS").ToString().ToDecimal * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
|
||||
dr("ImporteRetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
|
||||
dr("ImporteRetISR") = (ClienteRetISR * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
|
||||
dr("PorcentajeRetIVA") = ClienteRetIVA
|
||||
dr("PorcentajeRetISR") = ClienteRetISR
|
||||
|
||||
Next
|
||||
|
||||
'REVISA SI EXISTEN DIFERENCIAS ENTRE EL DESCUENTO Y LO AMORTIZADO PARA REALIZAR UN AJUSTE EN EL ULTIMO CONCEPTO AGREGADO
|
||||
@@ -15685,11 +15704,10 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Rem") Then
|
||||
' IPP 15 Julio 2017 - ERA FALSE
|
||||
ImgAntiPend.Visible = False
|
||||
ElseIf Opcion <> "Op" Then
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing") Then
|
||||
ImgAntiPend.Visible = True
|
||||
Else
|
||||
ImgAntiPend.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
@@ -15709,6 +15727,10 @@ Partial Class Ventas
|
||||
TrVistaPrevia.Visible = EstatusCliente
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "Ing" Then
|
||||
ImgAntiPend.Visible = True
|
||||
End If
|
||||
|
||||
MostrarOpcioensPaqueteria()
|
||||
|
||||
TrAtencionA.Visible = True
|
||||
@@ -15724,9 +15746,7 @@ Partial Class Ventas
|
||||
End Sub
|
||||
Protected Sub DdlSucursalCliente_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSucursalCliente.SelectedIndexChanged
|
||||
CargaClienteSucursal(DdlSucursalCliente.SelectedValue.ToEntero())
|
||||
'If Me.CveVenta > 0 Then
|
||||
' CargaRestriccionesCreditoCliente(Alertas:=True)
|
||||
'End If
|
||||
CargaRestriccionesCreditoCliente(Alertas:=True, CveVenta:=Me.CveVenta)
|
||||
End Sub
|
||||
Protected Sub DdlCCEdit_SelectedIndexChanged(sender As Object, e As System.EventArgs)
|
||||
Dim gvr As GridViewRow = DirectCast(DirectCast(sender, DropDownList).BindingContainer, GridViewRow)
|
||||
@@ -27838,6 +27858,8 @@ Partial Class Ventas
|
||||
' BtnCrearApartirDe.Visible = False
|
||||
'End If
|
||||
|
||||
HdnCveVenta.Value = ""
|
||||
|
||||
BtnCrearApartirDe.Visible = False '[IPP-2Novimebre2018] REEMPLAZA LO COMENTADO ARRIBA
|
||||
EsCreaApartirDe = True
|
||||
ModalidadEdicion = True
|
||||
@@ -27885,6 +27907,7 @@ Partial Class Ventas
|
||||
'Cuando es cotización, Genera nueva cotizacion
|
||||
If DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||
BtnEmitirImprimir.Text = "Cotizar"
|
||||
ImgAntiPend.Visible = False
|
||||
'TdReferencia.Style.Add("display", "none")
|
||||
End If
|
||||
|
||||
@@ -28015,6 +28038,8 @@ Partial Class Ventas
|
||||
|
||||
GvFacturasRelacionadas.Columns(2).Visible = True
|
||||
|
||||
CalculaTotalesVenta()
|
||||
|
||||
UpnTools.Update()
|
||||
UpCliente.Update()
|
||||
UpParametros.Update()
|
||||
|
||||
@@ -21,22 +21,35 @@ Public Class WsTSoft
|
||||
<WebMethod()>
|
||||
Public Function AddRemision(FolioRemision As String, NoEconomico As String, CveEstatus As Integer, GeoInicial As String, GeoCarga As String, GeoEntrega As String, Fecha As String) As String
|
||||
Dim retorno As String = ""
|
||||
Dim Continuar As Boolean = False
|
||||
|
||||
Dim objTsoft As New ClsTSoft
|
||||
objTsoft.IniciaTransacSQL()
|
||||
Dim Continuar As Boolean = objTsoft.AddRemisiones(FolioRemision, NoEconomico, CveEstatus, GeoInicial, GeoCarga, GeoEntrega, Fecha)
|
||||
Dim objRem As New addRemisionObj
|
||||
If Continuar Then
|
||||
objTsoft.Commit()
|
||||
objRem.CveRemision = objTsoft.DtResultados.Rows(0)("CveRemision").ToString().ToEntero()
|
||||
objRem.CurrentError = ""
|
||||
Else
|
||||
objTsoft.RollBack()
|
||||
objRem.CveRemision = 0
|
||||
objRem.CurrentError = objTsoft.MyCurrentError
|
||||
End If
|
||||
objTsoft.IniciaTransacSQL()
|
||||
Try
|
||||
Continuar = objTsoft.AddRemisiones(FolioRemision, NoEconomico, CveEstatus, GeoInicial, GeoCarga, GeoEntrega, Fecha)
|
||||
|
||||
Dim objRem As New addRemisionObj
|
||||
If Continuar Then
|
||||
objRem.CveRemision = objTsoft.DtResultados.Rows(0)("CveRemision").ToString().ToEntero()
|
||||
objRem.CurrentError = ""
|
||||
Else
|
||||
objRem.CveRemision = 0
|
||||
objRem.CurrentError = objTsoft.MyCurrentError
|
||||
End If
|
||||
|
||||
retorno = JsonConvert.SerializeObject(objRem)
|
||||
objRem = Nothing
|
||||
Catch ex As Exception
|
||||
Continuar = False
|
||||
Finally
|
||||
If Continuar Then
|
||||
objTsoft.Commit()
|
||||
Else
|
||||
objTsoft.RollBack()
|
||||
End If
|
||||
End Try
|
||||
objTsoft.Dispose()
|
||||
retorno = JsonConvert.SerializeObject(objRem)
|
||||
objRem = Nothing
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
@@ -69,22 +82,29 @@ Public Class WsTSoft
|
||||
DtPosicion = ObjGPS.DtResultados.Copy()
|
||||
Continuar = True
|
||||
End If
|
||||
End Using
|
||||
|
||||
Dim ObjPos As New LatLng
|
||||
|
||||
If Continuar AndAlso DtPosicion IsNot Nothing Then
|
||||
'CONSULTA DIRECCIONES
|
||||
Try
|
||||
End Using
|
||||
|
||||
Dim ObjPos As New LatLng
|
||||
|
||||
Try
|
||||
|
||||
If Continuar AndAlso DtPosicion IsNot Nothing Then
|
||||
'CONSULTA DIRECCIONES
|
||||
|
||||
If DtPosicion IsNot Nothing AndAlso DtPosicion.Rows.Count > 0 Then
|
||||
Try
|
||||
|
||||
Dim Direcciones As JArray = ConsultarDirecciones(DtPosicion, "Lat", "Lng")
|
||||
Dim Direcciones As JArray = ConsultarDirecciones(DtPosicion, "Lat", "Lng")
|
||||
|
||||
If Direcciones IsNot Nothing Then
|
||||
For Each Dir As JObject In Direcciones
|
||||
DtPosicion.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
||||
Next
|
||||
End If
|
||||
If Direcciones IsNot Nothing Then
|
||||
For Each Dir As JObject In Direcciones
|
||||
DtPosicion.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
||||
Next
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ObjPos.CurrentError = "No se pudo obtener la posición."
|
||||
OnError("Ocurrió un error al asignar las direcciones", ex)
|
||||
End Try
|
||||
|
||||
Dim RowPosicion As DataRow = DtPosicion.Rows("0")
|
||||
|
||||
@@ -96,20 +116,20 @@ Public Class WsTSoft
|
||||
ObjPos.CurrentError = "No se encontraron resultados."
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
Else
|
||||
ObjPos.CurrentError = "No se pudo obtener la posición."
|
||||
OnError("Ocurrió un error al asignar las direcciones", ex)
|
||||
End Try
|
||||
Else
|
||||
ObjPos.CurrentError = "No se pudo obtener la posición."
|
||||
End If
|
||||
End If
|
||||
|
||||
If DtPosicion IsNot Nothing Then
|
||||
DtPosicion.Dispose()
|
||||
DtPosicion = Nothing
|
||||
End If
|
||||
If DtPosicion IsNot Nothing Then
|
||||
DtPosicion.Dispose()
|
||||
DtPosicion = Nothing
|
||||
End If
|
||||
|
||||
retorno = JsonConvert.SerializeObject(ObjPos)
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los datos", ex)
|
||||
End Try
|
||||
|
||||
retorno = JsonConvert.SerializeObject(ObjPos)
|
||||
ObjPos = Nothing
|
||||
Return retorno
|
||||
End Function
|
||||
@@ -135,36 +155,43 @@ Public Class WsTSoft
|
||||
<WebMethod()>
|
||||
Public Function GetRemisionHistorial(FolioRemision As String, NoEconomico As String) As String
|
||||
Dim retorno As String = ""
|
||||
Dim objTsoft As New ClsTSoft
|
||||
Dim Continuar As Boolean = objTsoft.GETRemisionesHistorial(FolioRemision, NoEconomico)
|
||||
Dim objRem As New GetRemisionHistorialesObj
|
||||
If Continuar Then
|
||||
Try
|
||||
Dim objTsoft As New ClsTSoft
|
||||
Try
|
||||
Dim Continuar As Boolean = objTsoft.GETRemisionesHistorial(FolioRemision, NoEconomico)
|
||||
Dim objRem As New GetRemisionHistorialesObj
|
||||
If Continuar Then
|
||||
Dim Dt = objTsoft.DtResultados.Copy()
|
||||
Dt.Columns.Add("Direccion", GetType(String))
|
||||
Try
|
||||
Dt.Columns.Add("Direccion", GetType(String))
|
||||
|
||||
'CONSULTA DIRECCIONES
|
||||
Dim Direcciones As JArray = ConsultarDirecciones(Dt, "Lat", "Lon")
|
||||
If Direcciones IsNot Nothing Then
|
||||
For Each Dir As JObject In Direcciones
|
||||
Dt.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
||||
Next
|
||||
End If
|
||||
'CONSULTA DIRECCIONES
|
||||
Dim Direcciones As JArray = ConsultarDirecciones(Dt, "Lat", "Lon")
|
||||
If Direcciones IsNot Nothing Then
|
||||
For Each Dir As JObject In Direcciones
|
||||
Dt.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
||||
Next
|
||||
End If
|
||||
|
||||
objRem.CurrentError = ""
|
||||
Catch ex As Exception
|
||||
objRem.CurrentError = "Ocurrió un error al asignar las direcciones"
|
||||
OnError("Ocurrió un error al asignar las direcciones", ex)
|
||||
End Try
|
||||
|
||||
objRem.Historial = Dt.DataTableToObject(Of GetRemisionHistorialsObj)
|
||||
objRem.CurrentError = ""
|
||||
Catch ex As Exception
|
||||
objRem.CurrentError = "Ocurrió un error al asignar las direcciones"
|
||||
OnError("Ocurrió un error al asignar las direcciones", ex)
|
||||
End Try
|
||||
|
||||
Else
|
||||
objRem.Historial = New List(Of GetRemisionHistorialsObj)
|
||||
objRem.CurrentError = objTsoft.MyCurrentError
|
||||
End If
|
||||
Dt.Dispose()
|
||||
Dt = Nothing
|
||||
Else
|
||||
objRem.Historial = New List(Of GetRemisionHistorialsObj)
|
||||
objRem.CurrentError = objTsoft.MyCurrentError
|
||||
End If
|
||||
retorno = JsonConvert.SerializeObject(objRem)
|
||||
objRem = Nothing
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los datos", ex)
|
||||
End Try
|
||||
objTsoft.Dispose()
|
||||
retorno = JsonConvert.SerializeObject(objRem)
|
||||
retorno = Nothing
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
<WebMethod()>
|
||||
@@ -172,27 +199,32 @@ Public Class WsTSoft
|
||||
Dim retorno As String = "[]"
|
||||
|
||||
Dim objTsoft As New ClsTSoft
|
||||
If objTsoft.GetInfoEventosPenske(FechaInicio.ToDateTime(), FechaFin.ToDateTime()) Then
|
||||
If objTsoft.DtResultados.Rows.Count > 0 Then
|
||||
Try
|
||||
'CONSULTA DIRECCIONES
|
||||
Dim Direcciones As JArray = ConsultarDirecciones(objTsoft.DtResultados)
|
||||
If Direcciones IsNot Nothing Then
|
||||
For Each Dir As JObject In Direcciones
|
||||
objTsoft.DtResultados.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
||||
Next
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al asignar las direcciones", ex)
|
||||
End Try
|
||||
Try
|
||||
If objTsoft.GetInfoEventosPenske(FechaInicio.ToDateTime(), FechaFin.ToDateTime()) Then
|
||||
If objTsoft.DtResultados.Rows.Count > 0 Then
|
||||
Try
|
||||
'CONSULTA DIRECCIONES
|
||||
Dim Direcciones As JArray = ConsultarDirecciones(objTsoft.DtResultados)
|
||||
If Direcciones IsNot Nothing Then
|
||||
For Each Dir As JObject In Direcciones
|
||||
objTsoft.DtResultados.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
||||
Next
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al asignar las direcciones", ex)
|
||||
End Try
|
||||
|
||||
retorno = objTsoft.DtResultados.DataTableToJSONIPP()
|
||||
retorno = objTsoft.DtResultados.DataTableToJSONIPP()
|
||||
Else
|
||||
retorno = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.Mensaje = "No se encontraron resultados"})
|
||||
End If
|
||||
Else
|
||||
retorno = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.Mensaje = "No se encontraron resultados"})
|
||||
retorno = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.Mensaje = "Ocurrío un error al consultar los datos"})
|
||||
End If
|
||||
Else
|
||||
retorno = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.Mensaje = "Ocurrío un error al consultar los datos"})
|
||||
End If
|
||||
Catch ex As Exception
|
||||
retorno = "[]"
|
||||
OnError("Ocurrió un error al obtener los datos", ex)
|
||||
End Try
|
||||
objTsoft.Dispose()
|
||||
|
||||
Return retorno
|
||||
@@ -202,17 +234,22 @@ Public Class WsTSoft
|
||||
Dim retorno As String = ""
|
||||
Dim Continuar As Boolean = False
|
||||
|
||||
Dim ObjTSoft As New ClsTSoft
|
||||
Continuar = ObjTSoft.TieneRemisionesActivas(NoEconomico)
|
||||
|
||||
Dim objRem As New MTieneRemisiones With
|
||||
{
|
||||
.TieneRemisiones = Continuar,
|
||||
.CurrentError = ObjTSoft.MyCurrentError
|
||||
}
|
||||
ObjTSoft.Dispose()
|
||||
retorno = JsonConvert.SerializeObject(objRem)
|
||||
objRem = Nothing
|
||||
Dim ObjTSoft As New ClsTSoft
|
||||
Try
|
||||
If ObjTSoft.TieneRemisionesActivas(NoEconomico) Then
|
||||
Dim objRem As New MTieneRemisiones With
|
||||
{
|
||||
.TieneRemisiones = Continuar,
|
||||
.CurrentError = ObjTSoft.MyCurrentError
|
||||
}
|
||||
retorno = JsonConvert.SerializeObject(objRem)
|
||||
objRem = Nothing
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los datos", ex)
|
||||
End Try
|
||||
ObjTSoft.Dispose()
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
|
||||
Reference in New Issue
Block a user