Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -3058,7 +3058,7 @@
|
|||||||
<script type="text/javascript" src="/Scripts/jquery.timers-1.2.js"></script>
|
<script type="text/javascript" src="/Scripts/jquery.timers-1.2.js"></script>
|
||||||
<script type="text/javascript" src="/Scripts/jquery.easing.1.3.js"></script>
|
<script type="text/javascript" src="/Scripts/jquery.easing.1.3.js"></script>
|
||||||
<script src="/Metronic/assets/global/plugins/jquery.pulsate.min.js"></script>
|
<script src="/Metronic/assets/global/plugins/jquery.pulsate.min.js"></script>
|
||||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAJnZ1CoEUX425C20aqzFw4dYxFL_LfThk&libraries=places"></script>
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"></script>
|
||||||
<script src="/GPS/AF/JS/AF.js"></script>
|
<script src="/GPS/AF/JS/AF.js"></script>
|
||||||
<!-- Third, add the GalleryView Javascript and CSS files -->
|
<!-- Third, add the GalleryView Javascript and CSS files -->
|
||||||
<script type="text/javascript" src="/Scripts/jquery.galleryview-3.0-dev.js"></script>
|
<script type="text/javascript" src="/Scripts/jquery.galleryview-3.0-dev.js"></script>
|
||||||
|
|||||||
@@ -4446,5 +4446,312 @@ Public Class ClsBancos
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
#Region "N O T I F I C A C I O N E S D E P A G O P R O V E E D O R E S"
|
||||||
|
|
||||||
|
Public Function NotificacionPago(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActual As Usuario) As Boolean
|
||||||
|
|
||||||
|
Dim RutaComprobante As String = ""
|
||||||
|
If GetBancosIE(CveIENotificar, UsuarioActual.CveEmpresa) Then
|
||||||
|
RutaComprobante = Comprobante
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Dim Body As String = GeneraCorreo(CveIENotificar, UsuarioActual)
|
||||||
|
'Dim Comprobante As String = ""
|
||||||
|
|
||||||
|
Dim File As Byte() = Nothing
|
||||||
|
|
||||||
|
|
||||||
|
'If MostrarConfirmacion Then
|
||||||
|
Return MandaCorreo(CorreoNotificarA, "Notificaciones de pago", Body, RutaComprobante, File, UsuarioActual, CopiaPara)
|
||||||
|
'Else
|
||||||
|
' Dim Hilo As New Threading.Thread(Sub() MandaCorreo(CorreoNotificarA, "Notificaciones de pago", Body, RutaComprobante, File, UsuarioActual, MostrarConfirmacion, CopiaPara))
|
||||||
|
' Hilo.Start()
|
||||||
|
'End If
|
||||||
|
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function MandaCorreo(Para As String, Asunto As String, Body As String, RutaComprobante As String, File As Byte(), UsuarioActual As Usuario, CopiaPara As String) As Boolean
|
||||||
|
|
||||||
|
Dim Respuesta As Boolean = False
|
||||||
|
|
||||||
|
Try
|
||||||
|
Dim Mail As New ClsSisMail()
|
||||||
|
Para = If(Para IsNot Nothing, Para, "")
|
||||||
|
Asunto = If(Asunto IsNot Nothing, Asunto, "")
|
||||||
|
Body = If(Body IsNot Nothing, Body, "")
|
||||||
|
|
||||||
|
Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail)
|
||||||
|
|
||||||
|
If RutaComprobante IsNot Nothing AndAlso RutaComprobante <> "" Then
|
||||||
|
ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.Ruta = RutaComprobante})
|
||||||
|
End If
|
||||||
|
|
||||||
|
If File IsNot Nothing Then
|
||||||
|
ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = File, .NombreArchivo = "EstadoCuentaCxP.pdf"})
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim separador As Char() = {";"c, ","c}
|
||||||
|
Dim strArray As String() = Para.Split(separador)
|
||||||
|
|
||||||
|
Para = ""
|
||||||
|
|
||||||
|
For Each sCorreo As String In strArray
|
||||||
|
If ClsSisMail.IsMailShared(sCorreo) And sCorreo.Trim.Length > 0 Then
|
||||||
|
Para = $"{Para}{sCorreo};"
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
If Para.Length > 0 Then
|
||||||
|
|
||||||
|
Para = Para.Substring(0, Para.Length - 1)
|
||||||
|
|
||||||
|
If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, Archivos:=ListaArchivos, Displayname:=$"SIG Notificaciones: Pago de {UsuarioActual.Empresa.Empresa}", CCP:=CopiaPara) Then
|
||||||
|
|
||||||
|
Respuesta = True
|
||||||
|
'If MostrarConfirmacion Then
|
||||||
|
' Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion)
|
||||||
|
'End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'If MostrarConfirmacion Then
|
||||||
|
' Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError)
|
||||||
|
'End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrio un error al enviar el correo", ex)
|
||||||
|
|
||||||
|
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Respuesta
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function GeneraCorreo(CveIENotificar As Integer, UsuarioActual As Usuario) As String
|
||||||
|
|
||||||
|
Dim strBody As New StringBuilder
|
||||||
|
|
||||||
|
|
||||||
|
If GetBancosIE(CveIENotificar, UsuarioActual.CveEmpresa) Then
|
||||||
|
strBody.Append("<html xmlns=""http://www.w3.org/1999/xhtml""> ")
|
||||||
|
strBody.Append("<head> ")
|
||||||
|
strBody.Append(" <style type=""text/css""> ")
|
||||||
|
strBody.Append(" body ")
|
||||||
|
strBody.Append(" { ")
|
||||||
|
strBody.Append(" margin:0px; ")
|
||||||
|
strBody.Append(" padding:0px 0px 0px 0px; ")
|
||||||
|
strBody.Append(" font-family: Verdana, Arial, Helvetica, sans-serif; ")
|
||||||
|
strBody.Append(" font-size: 10px; ")
|
||||||
|
strBody.Append(" background-color:#F0F0F0; ")
|
||||||
|
strBody.Append(" } ")
|
||||||
|
strBody.Append(" a.Texto ")
|
||||||
|
strBody.Append(" { ")
|
||||||
|
strBody.Append(" font-size:11px; ")
|
||||||
|
strBody.Append(" background-color:#F7F6F3; ")
|
||||||
|
strBody.Append(" text-decoration:none; ")
|
||||||
|
strBody.Append(" font-weight:bold; ")
|
||||||
|
strBody.Append(" } ")
|
||||||
|
strBody.Append(" .Texto ")
|
||||||
|
strBody.Append(" { ")
|
||||||
|
strBody.Append(" background-color:#F7F6F3; color:Black; font-family:Verdana; font-size:10px; text-align:center; vertical-align:middle; height:20px;")
|
||||||
|
strBody.Append(" } ")
|
||||||
|
strBody.Append(" .TextoAlterno ")
|
||||||
|
strBody.Append(" { ")
|
||||||
|
strBody.Append(" background-color:White; color:Black; font-family:Verdana; font-size:10px; text-align:center; ")
|
||||||
|
strBody.Append(" vertical-align:middle; height:20px;")
|
||||||
|
strBody.Append(" } ")
|
||||||
|
strBody.Append(" .BarraIdentidad ")
|
||||||
|
strBody.Append(" { ")
|
||||||
|
strBody.Append(" color:#FFFFFF; ")
|
||||||
|
strBody.Append(" background:#F0F0F0; ")
|
||||||
|
strBody.Append(" font-weight:bold; ")
|
||||||
|
strBody.Append(" font-size:19px; ")
|
||||||
|
strBody.Append(" font-style:oblique; ")
|
||||||
|
strBody.Append(" } ")
|
||||||
|
strBody.Append(" .Titulos ")
|
||||||
|
strBody.Append(" { ")
|
||||||
|
strBody.Append(" background-color: Gray;")
|
||||||
|
strBody.Append(" color:White; ")
|
||||||
|
strBody.Append(" font-family:Verdana; font-size:12px; text-align:center; ")
|
||||||
|
strBody.Append(" vertical-align:middle; font-weight:bold; height:30px; ")
|
||||||
|
strBody.Append(" text-decoration:none; ")
|
||||||
|
strBody.Append(" } ")
|
||||||
|
strBody.Append(" .Verde {color: #00CC00;} ")
|
||||||
|
strBody.Append(" .Negro {color: #000000;} ")
|
||||||
|
strBody.Append(" .Rojo {color: #FF0000;} ")
|
||||||
|
strBody.Append(" </style> ")
|
||||||
|
strBody.Append("</head> ")
|
||||||
|
strBody.Append("<body> ")
|
||||||
|
strBody.AppendFormat("<div id='C_div' style='width: 600px'>")
|
||||||
|
strBody.AppendFormat(" <fieldset>")
|
||||||
|
strBody.AppendFormat(" <legend><b>{0}</b></legend>", UsuarioActual.Empresa.Empresa)
|
||||||
|
strBody.AppendFormat(" <table class='TextoG' border='0' cellpadding='0' cellspacing='0' width='100%'>")
|
||||||
|
strBody.AppendFormat(" <tr>")
|
||||||
|
strBody.AppendFormat(" <td style='width:100px'>{0}</td>", UsuarioActual.Empresa.Direccion)
|
||||||
|
strBody.AppendFormat(" </tr>")
|
||||||
|
strBody.AppendFormat(" <tr>")
|
||||||
|
strBody.AppendFormat(" <td>Col. {0}</td>", UsuarioActual.Empresa.Colonia)
|
||||||
|
strBody.AppendFormat(" </tr>")
|
||||||
|
strBody.AppendFormat(" <tr>")
|
||||||
|
strBody.AppendFormat(" <td>{0}, {1}, C.P.{2}</td>", UsuarioActual.Empresa.Ciudad, UsuarioActual.Empresa.Estado, UsuarioActual.Empresa.CP)
|
||||||
|
strBody.AppendFormat(" </tr>")
|
||||||
|
strBody.AppendFormat(" <tr>")
|
||||||
|
strBody.AppendFormat(" <td>RFC {0}</td>", UsuarioActual.Empresa.RFC)
|
||||||
|
strBody.AppendFormat(" </tr>")
|
||||||
|
strBody.AppendFormat(" </table>")
|
||||||
|
strBody.AppendFormat(" </fieldset>")
|
||||||
|
strBody.AppendFormat("</div><br/><br/>")
|
||||||
|
|
||||||
|
strBody.AppendFormat("<div style='width: 600px'>")
|
||||||
|
strBody.AppendFormat(" <fieldset>")
|
||||||
|
strBody.AppendFormat(" <legend><b> </b></legend>")
|
||||||
|
strBody.AppendFormat(" <table class='TextoG' style='width:100%'>")
|
||||||
|
|
||||||
|
If CveTipoTransaccion = 1 Then ' cuando es cheque
|
||||||
|
strBody.Append(" <tr style=""height: 22px""> ")
|
||||||
|
strBody.Append(" <td>Favor de pasar a nuestras oficinas por el cheque con la siguientes instrucciones.</td> ")
|
||||||
|
strBody.Append(" </tr> ")
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CveTipoTransaccion.Contiene(2, 9, 17) Then ' cuando es transf
|
||||||
|
strBody.Append(" <tr style=""height: 22px""> ")
|
||||||
|
strBody.Append(" <td>Notificación de transferencia de pago realizada.</td> ")
|
||||||
|
strBody.Append(" </tr> ")
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
strBody.Append(" <tr style=""height: 22px""> ")
|
||||||
|
strBody.AppendFormat(" <td> </td> ")
|
||||||
|
strBody.Append(" </tr> ")
|
||||||
|
strBody.Append(" </table> ")
|
||||||
|
strBody.AppendFormat(" </fieldset>")
|
||||||
|
strBody.Append(" </div> ")
|
||||||
|
|
||||||
|
|
||||||
|
strBody.AppendFormat("<div style='width: 600px'>")
|
||||||
|
strBody.AppendFormat(" <table style='width:100%'>")
|
||||||
|
strBody.AppendFormat(" <tr>")
|
||||||
|
strBody.AppendFormat(" <td style='vertical-align: top'>")
|
||||||
|
strBody.AppendFormat(" <fieldset>")
|
||||||
|
strBody.AppendFormat(" <legend>Beneficiario:<b>{0}</b> </legend>", PagueseA)
|
||||||
|
strBody.AppendFormat(" <table width='100%'>")
|
||||||
|
strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
|
||||||
|
strBody.AppendFormat(" <th scope='col' style='width:150px;'></th>")
|
||||||
|
strBody.AppendFormat(" <th scope='col' style='width:450px;'></th>")
|
||||||
|
strBody.AppendFormat(" </tr>")
|
||||||
|
strBody.AppendFormat(" <tr class='Texto'>")
|
||||||
|
strBody.AppendFormat(" <td>Movimiento:</td>")
|
||||||
|
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", TipoTransaccion)
|
||||||
|
strBody.AppendFormat(" </tr>")
|
||||||
|
strBody.AppendFormat(" <tr class='Texto'>")
|
||||||
|
strBody.AppendFormat(" <td>Banco:</td>")
|
||||||
|
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", Banco)
|
||||||
|
strBody.AppendFormat(" </tr>")
|
||||||
|
strBody.AppendFormat(" <tr class='Texto'>")
|
||||||
|
strBody.AppendFormat(" <td>Cuenta:</td>")
|
||||||
|
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", NumCuenta)
|
||||||
|
strBody.AppendFormat(" </tr>")
|
||||||
|
If CuentaDepositado.ToString <> "" Then
|
||||||
|
strBody.AppendFormat(" <tr class='Texto'>")
|
||||||
|
strBody.AppendFormat(" <td>Cuenta Destino:</td>")
|
||||||
|
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", CuentaDepositado)
|
||||||
|
strBody.AppendFormat(" </tr>")
|
||||||
|
End If
|
||||||
|
|
||||||
|
strBody.AppendFormat(" <tr class='Texto'>")
|
||||||
|
strBody.AppendFormat(" <td>Fecha:</td>")
|
||||||
|
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", FechaDocumento.ToString("dd/MM/yyyy"))
|
||||||
|
strBody.AppendFormat(" </tr>")
|
||||||
|
strBody.AppendFormat(" <tr class='Texto'>")
|
||||||
|
strBody.AppendFormat(" <td>Importe:</td>")
|
||||||
|
strBody.AppendFormat(" <td style='text-align: left'>$ {0} {1}</td>", Importe.FormatoNumero, Moneda)
|
||||||
|
strBody.AppendFormat(" </tr>")
|
||||||
|
strBody.AppendFormat(" <tr class='Texto'>")
|
||||||
|
strBody.AppendFormat(" <td>Observaciones:</td>")
|
||||||
|
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", Observaciones)
|
||||||
|
strBody.AppendFormat(" </tr>")
|
||||||
|
strBody.AppendFormat(" <tr class='Texto'>")
|
||||||
|
strBody.AppendFormat(" <td colspan='2'>")
|
||||||
|
strBody.AppendFormat(" <hr />")
|
||||||
|
strBody.AppendFormat(" </td>")
|
||||||
|
strBody.AppendFormat(" </tr>")
|
||||||
|
strBody.AppendFormat(" </table>")
|
||||||
|
strBody.AppendFormat(" </fieldset>")
|
||||||
|
strBody.AppendFormat(" </td>")
|
||||||
|
strBody.AppendFormat(" </tr>")
|
||||||
|
strBody.AppendFormat(" </table>")
|
||||||
|
strBody.AppendFormat("</div>")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'MOVIMIENTOS CHEQUE
|
||||||
|
If GetBancosIEMovimientos(CveIENotificar, UsuarioActual.CveEmpresa) Then
|
||||||
|
Dim Textov33 As String = ""
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then
|
||||||
|
Textov33 = "Favor de emitir complemento de pago de los siguientes documentos"
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
strBody.AppendFormat("<div style='width: 1000px'>")
|
||||||
|
strBody.AppendFormat(" <table style='width:1000px'>")
|
||||||
|
strBody.AppendFormat(" <tr>")
|
||||||
|
strBody.AppendFormat(" <td style='vertical-align: top'>")
|
||||||
|
strBody.AppendFormat(" <fieldset>")
|
||||||
|
strBody.AppendFormat(" <legend><b>Documentos abonados o pagados <br/>{0}</b> </legend>", Textov33)
|
||||||
|
strBody.AppendFormat(" <table width='1000px'>")
|
||||||
|
strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
|
||||||
|
strBody.AppendFormat(" <th scope='col' style='width: 10%'>Fecha</th>")
|
||||||
|
strBody.AppendFormat(" <th scope='col' style='width: 20%'>Factura</th>")
|
||||||
|
strBody.AppendFormat(" <th scope='col' style='width: 20%'>Importe ($)</th>")
|
||||||
|
strBody.AppendFormat(" <th scope='col' style='width: 40%'>Folio Fiscal</th>")
|
||||||
|
strBody.AppendFormat(" <th scope='col' style='width: 15%'>NC Aplicadas</th>")
|
||||||
|
strBody.AppendFormat(" </tr>")
|
||||||
|
|
||||||
|
|
||||||
|
For Each dr As DataRow In DtResultados.FiltraParametros("CveConceptoContable IN (17) AND CveCompra > 0").Rows
|
||||||
|
strBody.AppendFormat(" <tr class='Texto'>")
|
||||||
|
strBody.AppendFormat(" <td>{0}</td>", dr("Fecha").ToString.ToDate.ToShortDateString())
|
||||||
|
strBody.AppendFormat(" <td>{0}</td>", dr("SerieFolio").ToString)
|
||||||
|
strBody.AppendFormat(" <td style='text-align: right'>$ {0}</td>", dr("Importe").ToString.FormatoNumero)
|
||||||
|
strBody.AppendFormat(" <td>{0}</td>", dr("FolioFiscal"))
|
||||||
|
strBody.AppendFormat(" <td>{0}</td>", dr("ImporteNC").ToString.FormatoNumero)
|
||||||
|
strBody.AppendFormat(" </tr>")
|
||||||
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
strBody.AppendFormat(" <tr class='Texto'>")
|
||||||
|
strBody.AppendFormat(" <td colspan='5'>")
|
||||||
|
strBody.AppendFormat(" <hr />")
|
||||||
|
strBody.AppendFormat(" </td>")
|
||||||
|
strBody.AppendFormat(" </tr>")
|
||||||
|
strBody.AppendFormat(" </table>")
|
||||||
|
strBody.AppendFormat(" </fieldset>")
|
||||||
|
strBody.AppendFormat(" </td>")
|
||||||
|
strBody.AppendFormat(" </tr>")
|
||||||
|
strBody.AppendFormat(" </table>")
|
||||||
|
strBody.AppendFormat("</div>")
|
||||||
|
End If
|
||||||
|
|
||||||
|
strBody.Append(" <div> Favor de no responder a este correo. </div> ")
|
||||||
|
|
||||||
|
strBody.Append("</body></html>")
|
||||||
|
End If
|
||||||
|
|
||||||
|
'objIE.Dispose()
|
||||||
|
Return strBody.ToString
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -166,6 +166,7 @@ Public Class ClsClientes
|
|||||||
|
|
||||||
Public Property CargoUsados As Boolean
|
Public Property CargoUsados As Boolean
|
||||||
Public Property BonificacionUsado As Boolean
|
Public Property BonificacionUsado As Boolean
|
||||||
|
Public Property CveSATEstado As Integer
|
||||||
|
|
||||||
|
|
||||||
Public ReadOnly Property DtResultados() As DataTable
|
Public ReadOnly Property DtResultados() As DataTable
|
||||||
@@ -426,6 +427,7 @@ Public Class ClsClientes
|
|||||||
_RequiereOC = CBool(Data(0)("RequiereOC"))
|
_RequiereOC = CBool(Data(0)("RequiereOC"))
|
||||||
_CargoUsados = CBool(Data(0)("CargoUsado"))
|
_CargoUsados = CBool(Data(0)("CargoUsado"))
|
||||||
_BonificacionUsado = CBool(Data(0)("BonificacionUsado"))
|
_BonificacionUsado = CBool(Data(0)("BonificacionUsado"))
|
||||||
|
_CveSATEstado = Data(0)("CveSATEstado").ToString.ToEntero
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Retorno = True
|
Retorno = True
|
||||||
@@ -574,7 +576,7 @@ Public Class ClsClientes
|
|||||||
Optional AplicaComercioExterior As Boolean = False, Optional CveTipoOperacion As Integer = -1, Optional CvePedimento As Integer = -1, Optional CveIncoterm As Integer = -1, 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 CveTipoOperacion As Integer = -1, Optional CvePedimento As Integer = -1, Optional CveIncoterm As Integer = -1, Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1,
|
||||||
Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1", Optional RequiereOC As Boolean = False,
|
Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1", Optional RequiereOC As Boolean = False,
|
||||||
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0,
|
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0,
|
||||||
Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1") As Boolean
|
Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
|
||||||
@@ -714,6 +716,9 @@ Public Class ClsClientes
|
|||||||
|
|
||||||
.Add("@CorreoEntregaCompras", SqlDbType.VarChar).Value = CorreoEntregaCompras
|
.Add("@CorreoEntregaCompras", SqlDbType.VarChar).Value = CorreoEntregaCompras
|
||||||
.Add("@CorreoEntregaAlmacen", SqlDbType.VarChar).Value = CorreoEntregaAlmacen
|
.Add("@CorreoEntregaAlmacen", SqlDbType.VarChar).Value = CorreoEntregaAlmacen
|
||||||
|
.Add("@CveSATEstado", SqlDbType.Int).Value = CveSATEstado
|
||||||
|
|
||||||
|
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
@@ -757,7 +762,8 @@ Public Class ClsClientes
|
|||||||
Optional AplicaComercioExterior As Boolean = False, Optional CveTipoOperacion As Integer = -1, Optional CvePedimento As Integer = -1, Optional CveIncoterm As Integer = -1, 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 CveTipoOperacion As Integer = -1, Optional CvePedimento As Integer = -1, Optional CveIncoterm As Integer = -1, Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1,
|
||||||
Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "-1", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1",
|
Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "-1", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1",
|
||||||
Optional ApellidoPaternoPF As String = "-1", Optional ApellidoMaternoPF As String = "-1", Optional NombresPF As String = "-1", Optional RequiereOC As Boolean = False,
|
Optional ApellidoPaternoPF As String = "-1", Optional ApellidoMaternoPF As String = "-1", Optional NombresPF As String = "-1", Optional RequiereOC As Boolean = False,
|
||||||
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1") As Boolean
|
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1",
|
||||||
|
Optional CveSATEstado As Integer = -1) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -911,6 +917,10 @@ Public Class ClsClientes
|
|||||||
|
|
||||||
.Add("@CorreoEntregaCompras", SqlDbType.VarChar).Value = CorreoEntregaCompras
|
.Add("@CorreoEntregaCompras", SqlDbType.VarChar).Value = CorreoEntregaCompras
|
||||||
.Add("@CorreoEntregaAlmacen", SqlDbType.VarChar).Value = CorreoEntregaAlmacen
|
.Add("@CorreoEntregaAlmacen", SqlDbType.VarChar).Value = CorreoEntregaAlmacen
|
||||||
|
.Add("@CveSATEstado", SqlDbType.Int).Value = CveSATEstado
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
@@ -1011,6 +1021,26 @@ Public Class ClsClientes
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
'Public Function GetEstados(Optional ClaveSATPais As String = "-1") As Boolean
|
||||||
|
' Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
' DataAdapter("PA_ClientesEstadosGet")
|
||||||
|
|
||||||
|
' SqlAdapter.SelectCommand.Parameters.Add("@ClaveSATPais", SqlDbType.VarChar).Value = ClaveSATPais
|
||||||
|
|
||||||
|
' Try
|
||||||
|
' SqlAdapter.Fill(Data)
|
||||||
|
' Retorno = True
|
||||||
|
' Catch ex As Exception
|
||||||
|
' OnError("Ocurrió un error al obtener el los estados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
' End Try
|
||||||
|
|
||||||
|
' Return Retorno
|
||||||
|
'End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'Public Function GetSucursales(CveCliente As Integer, CveClienteSucursal As Integer) As Boolean
|
'Public Function GetSucursales(CveCliente As Integer, CveClienteSucursal As Integer) As Boolean
|
||||||
' Dim Retorno As Boolean = False
|
' Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -1566,8 +1596,8 @@ Public Class ClsClientes
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function AgregarClienteNoFrecuente(Nombre As String, Direccion As String, NoExt As String, NoInt As String, Colonia As String, Localidad As String, Ciudad As String, Estado As String,
|
Public Function AgregarClienteNoFrecuente(Nombre As String, Direccion As String, NoExt As String, NoInt As String, Colonia As String, Localidad As String, Ciudad As String, CveEstado As Integer,
|
||||||
Pais As String, RFC As String, CP As String, Telefono As String, Mail As String, CveSubProyecto As Integer, CveUsuario As Integer, CveEmpresa As Integer,
|
RFC As String, CP As String, Telefono As String, Mail As String, CveSubProyecto As Integer, CveUsuario As Integer, CveEmpresa As Integer,
|
||||||
NumCuentaPago As String, CveMetodoPago33 As Integer, CveFormaPago33 As Integer, Optional CvePrecioLista As Integer = -1) As Boolean
|
NumCuentaPago As String, CveMetodoPago33 As Integer, CveFormaPago33 As Integer, Optional CvePrecioLista As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_ClientesNoFrecuenteAdd")
|
DataAdapter("PA_ClientesNoFrecuenteAdd")
|
||||||
@@ -1580,8 +1610,8 @@ Public Class ClsClientes
|
|||||||
.Add("@Colonia", SqlDbType.VarChar).Value = Colonia
|
.Add("@Colonia", SqlDbType.VarChar).Value = Colonia
|
||||||
.Add("@Localidad", SqlDbType.VarChar).Value = Localidad
|
.Add("@Localidad", SqlDbType.VarChar).Value = Localidad
|
||||||
.Add("@Ciudad", SqlDbType.VarChar).Value = Ciudad
|
.Add("@Ciudad", SqlDbType.VarChar).Value = Ciudad
|
||||||
.Add("@Estado", SqlDbType.VarChar).Value = Estado
|
.Add("@CveEstado", SqlDbType.Int).Value = CveEstado
|
||||||
.Add("@Pais", SqlDbType.VarChar).Value = Pais
|
' .Add("@Pais", SqlDbType.VarChar).Value = Pais
|
||||||
.Add("@RFC", SqlDbType.VarChar).Value = RFC
|
.Add("@RFC", SqlDbType.VarChar).Value = RFC
|
||||||
.Add("@CP", SqlDbType.VarChar).Value = CP
|
.Add("@CP", SqlDbType.VarChar).Value = CP
|
||||||
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
|
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ Public Class ClsFISConfiguracion
|
|||||||
Private SqlConexion As SqlConnection
|
Private SqlConexion As SqlConnection
|
||||||
Private SqlAdapter As SqlDataAdapter
|
Private SqlAdapter As SqlDataAdapter
|
||||||
Private SqlCommand As SqlCommand
|
Private SqlCommand As SqlCommand
|
||||||
|
Private SqlTransacc As SqlTransaction
|
||||||
Private Data As DataTable
|
Private Data As DataTable
|
||||||
|
|
||||||
'Atributos de la clase
|
'Atributos de la clase
|
||||||
@@ -23,6 +24,7 @@ Public Class ClsFISConfiguracion
|
|||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
'REGISTRAR CONEXIONES ABIERTAS
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
Private CveConexion As Integer = 0
|
Private CveConexion As Integer = 0
|
||||||
|
Private EsTransaccionCompartida As Boolean = False
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
@@ -42,20 +44,38 @@ Public Class ClsFISConfiguracion
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Sub New()
|
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
|
||||||
SqlConexion = New SqlConnection
|
|
||||||
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
|
If TransaccionCompartida Is Nothing Then
|
||||||
Try
|
SqlConexion = New SqlConnection
|
||||||
SqlConexion.Open()
|
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
|
||||||
Catch ex As Exception
|
Try
|
||||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
SqlConexion.Open()
|
||||||
End Try
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||||
|
End Try
|
||||||
|
Else
|
||||||
|
SqlConexion = TransaccionCompartida.Connection
|
||||||
|
SqlTransacc = TransaccionCompartida
|
||||||
|
EsTransaccionCompartida = True
|
||||||
|
End If
|
||||||
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
ConexionAdd()
|
ConexionAdd()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
Private Sub DataAdapter(ByVal pStrSQL As String, Optional ByVal TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
|
With SqlAdapter.SelectCommand
|
||||||
|
.Parameters.Clear()
|
||||||
|
.CommandText = pStrSQL
|
||||||
|
.CommandType = TipoComando
|
||||||
|
End With
|
||||||
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
|
Data = New DataTable
|
||||||
End Sub
|
End Sub
|
||||||
#Region "Conexiones"
|
#Region "Conexiones"
|
||||||
|
|
||||||
Private Sub ConexionAdd()
|
Private Sub ConexionAdd()
|
||||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||||
Try
|
Try
|
||||||
DataAdapter("PA_Sis_RegistrarConexion")
|
DataAdapter("PA_Sis_RegistrarConexion")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
@@ -87,21 +107,14 @@ Public Class ClsFISConfiguracion
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
|
||||||
With SqlAdapter.SelectCommand
|
|
||||||
.Parameters.Clear()
|
|
||||||
.CommandText = StrSQL
|
|
||||||
.CommandType = TipoComando
|
|
||||||
End With
|
|
||||||
Data = New DataTable
|
|
||||||
End Sub
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Public Function GetConfiguracion(CveEmpresa As Integer) As Boolean
|
Public Function GetConfiguracion(CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
Data = New DataTable
|
|
||||||
SqlAdapter = New SqlDataAdapter("PA_Fis_CuentaContablesGet", SqlConexion)
|
DataAdapter("PA_Fis_CuentaContablesGet")
|
||||||
SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure
|
|
||||||
SqlAdapter.SelectCommand.Parameters.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
SqlAdapter.SelectCommand.Parameters.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
@@ -117,16 +130,15 @@ Public Class ClsFISConfiguracion
|
|||||||
Catch ex As SqlException
|
Catch ex As SqlException
|
||||||
OnError("Ocurrió un error al consultar las Configuraciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al consultar las Configuraciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
End Try
|
||||||
SqlAdapter.Dispose()
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function AddConfiguracion(ActIVAAcreditable As Integer, ActIVAxAcreditar As Integer, PasIVAPagar As Integer, PasIVAxPagar As Integer,
|
Public Function AddConfiguracion(ActIVAAcreditable As Integer, ActIVAxAcreditar As Integer, PasIVAPagar As Integer, PasIVAxPagar As Integer,
|
||||||
EROtrosIngresos As Integer, ERDSV As Integer, CveEmpresa As Integer) As Boolean
|
EROtrosIngresos As Integer, ERDSV As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
Data = New DataTable
|
|
||||||
SqlAdapter = New SqlDataAdapter("PA_Fis_CuentaContablesAdd", SqlConexion)
|
DataAdapter("PA_Fis_CuentaContablesAdd")
|
||||||
SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure
|
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@ActIVAAcreditable", SqlDbType.VarChar).Value = ActIVAAcreditable
|
.Add("@ActIVAAcreditable", SqlDbType.VarChar).Value = ActIVAAcreditable
|
||||||
@@ -150,7 +162,7 @@ Public Class ClsFISConfiguracion
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al Guardar la Configuración.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al Guardar la Configuración.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
End Try
|
||||||
SqlAdapter.Dispose()
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
@@ -5363,6 +5363,109 @@ Public Class ClsGPS
|
|||||||
Return sw.ToString()
|
Return sw.ToString()
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
#Region "R E C U R S O - C O N F I A B L E"
|
||||||
|
Public Function AddRCTracking(Nombre As String, CveDispositivo As Integer, Shipment As String, CveUsuarioIngreso As Integer, CveCliente As Integer, CveEmpresa As Integer) As Integer
|
||||||
|
Dim retorno As Integer = -1
|
||||||
|
DataAdapter("PA_GPS_RC_TrackingAdd", CommandType.StoredProcedure)
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@Nombre", SqlDbType.VarChar).Value = Nombre
|
||||||
|
.Add("@CveDispositivo", SqlDbType.Int).Value = CveDispositivo
|
||||||
|
.Add("@Shipment", SqlDbType.VarChar).Value = Shipment
|
||||||
|
.Add("@CveUsuarioIngreso", SqlDbType.Int).Value = CveUsuarioIngreso
|
||||||
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveRCTracking", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
retorno = SqlAdapter.SelectCommand.Parameters("@CveRCTracking").Value.ToString.ToEntero
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al agregar un tracking.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function UpdateRCTrackingEstatus(CveRCTracking As Integer, CveEstatus As Boolean, CveUsuarioModifico As Integer) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
DataAdapter("PA_GPS_RC_TrackingEstatusUpdate", CommandType.StoredProcedure)
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveRCTracking", SqlDbType.Int).Value = CveRCTracking
|
||||||
|
.Add("@CveEstatus", SqlDbType.Bit).Value = CveEstatus
|
||||||
|
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al actualizar un tracking.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function GetRCTracking(CveRCTracking As Integer, CveDispositivo As Integer, CveEstatus As Integer, CveCliente As Integer, CveEmpresa As Integer, Optional FechaI As DateTime = ModExtensiones.MinFecha, Optional FechaF As DateTime = ModExtensiones.MaxFecha) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
DataAdapter("PA_GPS_RC_TrackingGet", CommandType.StoredProcedure)
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveRCTracking", SqlDbType.Int).Value = CveRCTracking
|
||||||
|
.Add("@CveDispositivo", SqlDbType.Int).Value = CveDispositivo
|
||||||
|
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
|
||||||
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@FechaI", SqlDbType.DateTime).Value = FechaI
|
||||||
|
.Add("@FechaF", SqlDbType.DateTime).Value = FechaF
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener un tracking.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function GetRCTrackingDatos(CveRCTracking As Integer) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
DataAdapter("PA_GPS_RC_TrackingDatosGet", CommandType.StoredProcedure)
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveRCTracking", SqlDbType.Int).Value = CveRCTracking
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener los datos de un tracking.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function RemoveRCTracking(CveRCTracking As Integer) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
DataAdapter("PA_GPS_RC_TrackingEstatusRemove", CommandType.StoredProcedure)
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveRCTracking", SqlDbType.Int).Value = CveRCTracking
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al eliminar un tracking.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub addParameters(name As String, tipo As SqlDbType, valor As Object)
|
Protected Sub addParameters(name As String, tipo As SqlDbType, valor As Object)
|
||||||
|
|||||||
@@ -1627,7 +1627,7 @@ Public Class ClsPaginas
|
|||||||
'sino existe, recarga los datos
|
'sino existe, recarga los datos
|
||||||
If Application(AppNombre) Is Nothing Then
|
If Application(AppNombre) Is Nothing Then
|
||||||
Dim ObjVendedores As New ClsVtaVendedores
|
Dim ObjVendedores As New ClsVtaVendedores
|
||||||
If ObjVendedores.GetVendedores(-1) Then Application(AppNombre) = ObjVendedores.DtResultados
|
If ObjVendedores.GetVendedores(CveEmpresa) Then Application(AppNombre) = ObjVendedores.DtResultados
|
||||||
ObjVendedores.Dispose()
|
ObjVendedores.Dispose()
|
||||||
End If
|
End If
|
||||||
If CveEmpresa <> -1 Then
|
If CveEmpresa <> -1 Then
|
||||||
@@ -3351,7 +3351,7 @@ Public Class ClsPaginas
|
|||||||
Application("GlobalDTClasificacionPorcentaje") = value
|
Application("GlobalDTClasificacionPorcentaje") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTPaqueterias(CveEmpresa As Integer, Optional TipoPaquteria As Integer = -1) As DataTable
|
Property GlobalDTPaqueterias(CveEmpresa As Integer, Optional TipoPaqueteria As Integer = -1) As DataTable
|
||||||
Get
|
Get
|
||||||
Dim AppNombre As String = String.Format("GlobalDTPaqueterias-{0}", CveEmpresa)
|
Dim AppNombre As String = String.Format("GlobalDTPaqueterias-{0}", CveEmpresa)
|
||||||
If Application(AppNombre) Is Nothing Then
|
If Application(AppNombre) Is Nothing Then
|
||||||
@@ -3361,7 +3361,7 @@ Public Class ClsPaginas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Str As StringBuilder = New StringBuilder()
|
Dim Str As StringBuilder = New StringBuilder()
|
||||||
If TipoPaquteria <> -1 Then Str.AppendFormat("TipoPaqueteria = {0}", TipoPaquteria)
|
If TipoPaqueteria <> -1 Then Str.AppendFormat("TipoPaqueteria = {0}", TipoPaqueteria)
|
||||||
|
|
||||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
||||||
GlobalDTPaqueterias = Dv.ToTable
|
GlobalDTPaqueterias = Dv.ToTable
|
||||||
@@ -4372,6 +4372,7 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/GPS/Notificaciones.aspx".ToUpper(), -1)
|
PaginaDict.Add("/GPS/Notificaciones.aspx".ToUpper(), -1)
|
||||||
PaginaDict.Add("/GPS/Shipments.aspx".ToUpper(), 673)
|
PaginaDict.Add("/GPS/Shipments.aspx".ToUpper(), 673)
|
||||||
PaginaDict.Add("/GPS/RepGastos.aspx".ToUpper(), 685)
|
PaginaDict.Add("/GPS/RepGastos.aspx".ToUpper(), 685)
|
||||||
|
PaginaDict.Add("/GPS/RecursoConfiableTracking.aspx".ToUpper(), 692)
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
'INVENTARIOS
|
'INVENTARIOS
|
||||||
@@ -4819,6 +4820,7 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/Ventas/RepVentasMensualesDetalle.aspx".ToUpper(), 721)
|
PaginaDict.Add("/Ventas/RepVentasMensualesDetalle.aspx".ToUpper(), 721)
|
||||||
PaginaDict.Add("/Ventas/MetasVendedores.aspx".ToUpper(), 722)
|
PaginaDict.Add("/Ventas/MetasVendedores.aspx".ToUpper(), 722)
|
||||||
PaginaDict.Add("/Ventas/CatMetasVendedores.aspx".ToUpper(), 723)
|
PaginaDict.Add("/Ventas/CatMetasVendedores.aspx".ToUpper(), 723)
|
||||||
|
PaginaDict.Add("/Ventas/RepAuxiliarFacturas.aspx".ToUpper(), 704)
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -460,7 +460,8 @@ Public Class ClsVentas
|
|||||||
Optional TipoDocto As String = "Cot", Optional Vigencia As Date = MinFecha, Optional CondicionesPago As Integer = -1,
|
Optional TipoDocto As String = "Cot", Optional Vigencia As Date = MinFecha, Optional CondicionesPago As Integer = -1,
|
||||||
Optional AtencionA As String = "-1", Optional PedidoContrato As String = "-1", Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1,
|
Optional AtencionA As String = "-1", Optional PedidoContrato As String = "-1", Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1,
|
||||||
Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional OrdenCompra As String = "-1", Optional RetIVA As Double = -1,
|
Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional OrdenCompra As String = "-1", Optional RetIVA As Double = -1,
|
||||||
Optional RetISR As Double = -1, Optional Kilometraje As Double = 0) As Boolean
|
Optional RetISR As Double = -1, Optional Kilometraje As Double = 0, Optional CveVendedor As Integer = -1, Optional ObsAlm As String = "", Optional FormaPaqueteria As Integer = -1,
|
||||||
|
Optional CorreoNot As String = "-1") As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Vta_VentasUpdate")
|
DataAdapter("PA_Vta_VentasUpdate")
|
||||||
|
|
||||||
@@ -491,6 +492,10 @@ Public Class ClsVentas
|
|||||||
.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
|
.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
|
||||||
.Add("@OrdenCompra", SqlDbType.VarChar).Value = OrdenCompra
|
.Add("@OrdenCompra", SqlDbType.VarChar).Value = OrdenCompra
|
||||||
.Add("@Kilometraje", SqlDbType.Float).Value = Kilometraje
|
.Add("@Kilometraje", SqlDbType.Float).Value = Kilometraje
|
||||||
|
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||||
|
.Add("@ObservacionesAlm", SqlDbType.NVarChar).Value = ObsAlm
|
||||||
|
.Add("@FormaPaqueteria", SqlDbType.Int).Value = FormaPaqueteria
|
||||||
|
.Add("@CorreoNotificacion", SqlDbType.NVarChar).Value = CorreoNot
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -1638,6 +1643,43 @@ Public Class ClsVentas
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
'Reporte de Ventas - Auxiliar Facturas
|
||||||
|
Public Function GetRepAuxliarFacturas(CveProyecto As Integer, CveSubProyecto As Integer, CveClasificacion As Integer, CvePS As Integer, FechaI As Date, FechaF As Date,
|
||||||
|
CveCliente As Integer, CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, CveEmpresa As Integer,
|
||||||
|
Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = -1, Optional CveUsuarioConsulta As Integer = -1, Optional TipoDocto As String = "-1") As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_RepAuxiliarGet")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
|
||||||
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
|
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||||
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
|
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||||
|
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||||
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
|
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio
|
||||||
|
.Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico
|
||||||
|
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||||
|
.Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto
|
||||||
|
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener el reporte auxiliar de facturas de venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "V E N T A S - P R E C I O L I S T A S" 'Hecho por Charlie 1/9/2016
|
#Region "V E N T A S - P R E C I O L I S T A S" 'Hecho por Charlie 1/9/2016
|
||||||
@@ -4463,11 +4505,11 @@ Public Class ClsVentas
|
|||||||
Return retorno
|
Return retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetOCRelacionadas(CveVentasDetalles As String) As Boolean
|
Public Function GetOCRelacionadas(CveVenta As Integer) As Boolean
|
||||||
Dim retorno As Boolean = False
|
Dim retorno As Boolean = False
|
||||||
DataAdapter("PA_Vta_OrdenCompraRelacionada", CommandType.StoredProcedure)
|
DataAdapter("PA_Vta_OrdenCompraRelacionada", CommandType.StoredProcedure)
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveVentasDetalles", SqlDbType.NVarChar).Value = CveVentasDetalles
|
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
|
|||||||
4
App_WebReferences/RCGPSService/RCService.disco
Normal file
4
App_WebReferences/RCGPSService/RCService.disco
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/">
|
||||||
|
<contractRef ref="http://gps.rcontrol.com.mx/Tracking/wcf/RCService.svc?wsdl" docRef="http://gps.rcontrol.com.mx/Tracking/wcf/RCService.svc" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
|
||||||
|
</discovery>
|
||||||
59
App_WebReferences/RCGPSService/RCService.wsdl
Normal file
59
App_WebReferences/RCGPSService/RCService.wsdl
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<wsdl:definitions xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://tempuri.org/" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="RCService" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||||
|
<wsdl:types>
|
||||||
|
<xsd:schema targetNamespace="http://tempuri.org/Imports">
|
||||||
|
<xsd:import schemaLocation="http://gps.rcontrol.com.mx/Tracking/wcf/RCService.svc?xsd=xsd0" namespace="http://tempuri.org/" />
|
||||||
|
<xsd:import schemaLocation="http://gps.rcontrol.com.mx/Tracking/wcf/RCService.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
|
||||||
|
<xsd:import schemaLocation="http://gps.rcontrol.com.mx/Tracking/wcf/RCService.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/IronTracking" />
|
||||||
|
<xsd:import schemaLocation="http://gps.rcontrol.com.mx/Tracking/wcf/RCService.svc?xsd=xsd3" namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
|
||||||
|
</xsd:schema>
|
||||||
|
</wsdl:types>
|
||||||
|
<wsdl:message name="IRCService_GetUserToken_InputMessage">
|
||||||
|
<wsdl:part name="parameters" element="tns:GetUserToken" />
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="IRCService_GetUserToken_OutputMessage">
|
||||||
|
<wsdl:part name="parameters" element="tns:GetUserTokenResponse" />
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="IRCService_GPSAssetTracking_InputMessage">
|
||||||
|
<wsdl:part name="parameters" element="tns:GPSAssetTracking" />
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="IRCService_GPSAssetTracking_OutputMessage">
|
||||||
|
<wsdl:part name="parameters" element="tns:GPSAssetTrackingResponse" />
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:portType name="IRCService">
|
||||||
|
<wsdl:operation name="GetUserToken">
|
||||||
|
<wsdl:input wsaw:Action="http://tempuri.org/IRCService/GetUserToken" message="tns:IRCService_GetUserToken_InputMessage" />
|
||||||
|
<wsdl:output wsaw:Action="http://tempuri.org/IRCService/GetUserTokenResponse" message="tns:IRCService_GetUserToken_OutputMessage" />
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="GPSAssetTracking">
|
||||||
|
<wsdl:input wsaw:Action="http://tempuri.org/IRCService/GPSAssetTracking" message="tns:IRCService_GPSAssetTracking_InputMessage" />
|
||||||
|
<wsdl:output wsaw:Action="http://tempuri.org/IRCService/GPSAssetTrackingResponse" message="tns:IRCService_GPSAssetTracking_OutputMessage" />
|
||||||
|
</wsdl:operation>
|
||||||
|
</wsdl:portType>
|
||||||
|
<wsdl:binding name="BasicHttpBinding_IRCService" type="tns:IRCService">
|
||||||
|
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
|
||||||
|
<wsdl:operation name="GetUserToken">
|
||||||
|
<soap:operation soapAction="http://tempuri.org/IRCService/GetUserToken" style="document" />
|
||||||
|
<wsdl:input>
|
||||||
|
<soap:body use="literal" />
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<soap:body use="literal" />
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="GPSAssetTracking">
|
||||||
|
<soap:operation soapAction="http://tempuri.org/IRCService/GPSAssetTracking" style="document" />
|
||||||
|
<wsdl:input>
|
||||||
|
<soap:body use="literal" />
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<soap:body use="literal" />
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
</wsdl:binding>
|
||||||
|
<wsdl:service name="RCService">
|
||||||
|
<wsdl:port name="BasicHttpBinding_IRCService" binding="tns:BasicHttpBinding_IRCService">
|
||||||
|
<soap:address location="http://gps.rcontrol.com.mx/Tracking/wcf/RCService.svc" />
|
||||||
|
</wsdl:port>
|
||||||
|
</wsdl:service>
|
||||||
|
</wsdl:definitions>
|
||||||
21
App_WebReferences/RCGPSService/RCService.xsd
Normal file
21
App_WebReferences/RCGPSService/RCService.xsd
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xs:schema xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/Arrays" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||||
|
<xs:complexType name="ArrayOfKeyValueOfstringstring">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:appinfo>
|
||||||
|
<IsDictionary xmlns="http://schemas.microsoft.com/2003/10/Serialization/">true</IsDictionary>
|
||||||
|
</xs:appinfo>
|
||||||
|
</xs:annotation>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element minOccurs="0" maxOccurs="unbounded" name="KeyValueOfstringstring">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Key" nillable="true" type="xs:string" />
|
||||||
|
<xs:element name="Value" nillable="true" type="xs:string" />
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:element name="ArrayOfKeyValueOfstringstring" nillable="true" type="tns:ArrayOfKeyValueOfstringstring" />
|
||||||
|
</xs:schema>
|
||||||
57
App_WebReferences/RCGPSService/RCService1.xsd
Normal file
57
App_WebReferences/RCGPSService/RCService1.xsd
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/IronTracking" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/IronTracking" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||||
|
<xs:import schemaLocation="http://gps.rcontrol.com.mx/Tracking/wcf/RCService.svc?xsd=xsd3" namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
|
||||||
|
<xs:complexType name="UserTokenResult">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element xmlns:q1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="exception" nillable="true" type="q1:ArrayOfKeyValueOfstringstring" />
|
||||||
|
<xs:element minOccurs="0" name="token" nillable="true" type="xs:string" />
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:element name="UserTokenResult" nillable="true" type="tns:UserTokenResult" />
|
||||||
|
<xs:complexType name="ArrayOfEvent">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element minOccurs="0" maxOccurs="unbounded" name="Event" nillable="true" type="tns:Event" />
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:element name="ArrayOfEvent" nillable="true" type="tns:ArrayOfEvent" />
|
||||||
|
<xs:complexType name="Event">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element minOccurs="0" name="altitude" nillable="true" type="xs:string" />
|
||||||
|
<xs:element minOccurs="0" name="asset" nillable="true" type="xs:string" />
|
||||||
|
<xs:element minOccurs="0" name="battery" nillable="true" type="xs:string" />
|
||||||
|
<xs:element minOccurs="0" name="code" nillable="true" type="xs:string" />
|
||||||
|
<xs:element minOccurs="0" name="course" nillable="true" type="xs:string" />
|
||||||
|
<xs:element minOccurs="0" name="customer" nillable="true" type="tns:Customer" />
|
||||||
|
<xs:element minOccurs="0" name="date" nillable="true" type="xs:dateTime" />
|
||||||
|
<xs:element minOccurs="0" name="direction" nillable="true" type="xs:string" />
|
||||||
|
<xs:element minOccurs="0" name="ignition" nillable="true" type="xs:string" />
|
||||||
|
<xs:element minOccurs="0" name="latitude" nillable="true" type="xs:string" />
|
||||||
|
<xs:element minOccurs="0" name="longitude" nillable="true" type="xs:string" />
|
||||||
|
<xs:element minOccurs="0" name="odometer" nillable="true" type="xs:string" />
|
||||||
|
<xs:element minOccurs="0" name="serialNumber" nillable="true" type="xs:string" />
|
||||||
|
<xs:element minOccurs="0" name="shipment" nillable="true" type="xs:string" />
|
||||||
|
<xs:element minOccurs="0" name="speed" nillable="true" type="xs:string" />
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:element name="Event" nillable="true" type="tns:Event" />
|
||||||
|
<xs:complexType name="Customer">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string" />
|
||||||
|
<xs:element minOccurs="0" name="name" nillable="true" type="xs:string" />
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:element name="Customer" nillable="true" type="tns:Customer" />
|
||||||
|
<xs:complexType name="ArrayOfAppointResult">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element minOccurs="0" maxOccurs="unbounded" name="AppointResult" nillable="true" type="tns:AppointResult" />
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:element name="ArrayOfAppointResult" nillable="true" type="tns:ArrayOfAppointResult" />
|
||||||
|
<xs:complexType name="AppointResult">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element xmlns:q2="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="exception" nillable="true" type="q2:ArrayOfKeyValueOfstringstring" />
|
||||||
|
<xs:element minOccurs="0" name="idJob" type="xs:int" />
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:element name="AppointResult" nillable="true" type="tns:AppointResult" />
|
||||||
|
</xs:schema>
|
||||||
34
App_WebReferences/RCGPSService/RCService2.xsd
Normal file
34
App_WebReferences/RCGPSService/RCService2.xsd
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xs:schema xmlns:tns="http://tempuri.org/" elementFormDefault="qualified" targetNamespace="http://tempuri.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||||
|
<xs:import schemaLocation="http://gps.rcontrol.com.mx/Tracking/wcf/RCService.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/IronTracking" />
|
||||||
|
<xs:element name="GetUserToken">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element minOccurs="0" name="userId" nillable="true" type="xs:string" />
|
||||||
|
<xs:element minOccurs="0" name="password" nillable="true" type="xs:string" />
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="GetUserTokenResponse">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element xmlns:q1="http://schemas.datacontract.org/2004/07/IronTracking" minOccurs="0" name="GetUserTokenResult" nillable="true" type="q1:UserTokenResult" />
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="GPSAssetTracking">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element minOccurs="0" name="token" nillable="true" type="xs:string" />
|
||||||
|
<xs:element xmlns:q2="http://schemas.datacontract.org/2004/07/IronTracking" minOccurs="0" name="events" nillable="true" type="q2:ArrayOfEvent" />
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="GPSAssetTrackingResponse">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element xmlns:q3="http://schemas.datacontract.org/2004/07/IronTracking" minOccurs="0" name="GPSAssetTrackingResult" nillable="true" type="q3:ArrayOfAppointResult" />
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:schema>
|
||||||
42
App_WebReferences/RCGPSService/RCService3.xsd
Normal file
42
App_WebReferences/RCGPSService/RCService3.xsd
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xs:schema xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||||
|
<xs:element name="anyType" nillable="true" type="xs:anyType" />
|
||||||
|
<xs:element name="anyURI" nillable="true" type="xs:anyURI" />
|
||||||
|
<xs:element name="base64Binary" nillable="true" type="xs:base64Binary" />
|
||||||
|
<xs:element name="boolean" nillable="true" type="xs:boolean" />
|
||||||
|
<xs:element name="byte" nillable="true" type="xs:byte" />
|
||||||
|
<xs:element name="dateTime" nillable="true" type="xs:dateTime" />
|
||||||
|
<xs:element name="decimal" nillable="true" type="xs:decimal" />
|
||||||
|
<xs:element name="double" nillable="true" type="xs:double" />
|
||||||
|
<xs:element name="float" nillable="true" type="xs:float" />
|
||||||
|
<xs:element name="int" nillable="true" type="xs:int" />
|
||||||
|
<xs:element name="long" nillable="true" type="xs:long" />
|
||||||
|
<xs:element name="QName" nillable="true" type="xs:QName" />
|
||||||
|
<xs:element name="short" nillable="true" type="xs:short" />
|
||||||
|
<xs:element name="string" nillable="true" type="xs:string" />
|
||||||
|
<xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte" />
|
||||||
|
<xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt" />
|
||||||
|
<xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong" />
|
||||||
|
<xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort" />
|
||||||
|
<xs:element name="char" nillable="true" type="tns:char" />
|
||||||
|
<xs:simpleType name="char">
|
||||||
|
<xs:restriction base="xs:int" />
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:element name="duration" nillable="true" type="tns:duration" />
|
||||||
|
<xs:simpleType name="duration">
|
||||||
|
<xs:restriction base="xs:duration">
|
||||||
|
<xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?" />
|
||||||
|
<xs:minInclusive value="-P10675199DT2H48M5.4775808S" />
|
||||||
|
<xs:maxInclusive value="P10675199DT2H48M5.4775807S" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:element name="guid" nillable="true" type="tns:guid" />
|
||||||
|
<xs:simpleType name="guid">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
<xs:attribute name="FactoryType" type="xs:QName" />
|
||||||
|
<xs:attribute name="Id" type="xs:ID" />
|
||||||
|
<xs:attribute name="Ref" type="xs:IDREF" />
|
||||||
|
</xs:schema>
|
||||||
35
App_WebReferences/RCGPSService/Reference.svcmap
Normal file
35
App_WebReferences/RCGPSService/Reference.svcmap
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ReferenceGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ID="649e5396-f046-40a9-8edd-bcc3a93e3bfc" xmlns="urn:schemas-microsoft-com:xml-wcfservicemap">
|
||||||
|
<ClientOptions>
|
||||||
|
<GenerateAsynchronousMethods>false</GenerateAsynchronousMethods>
|
||||||
|
<EnableDataBinding>true</EnableDataBinding>
|
||||||
|
<ExcludedTypes />
|
||||||
|
<ImportXmlTypes>false</ImportXmlTypes>
|
||||||
|
<GenerateInternalTypes>false</GenerateInternalTypes>
|
||||||
|
<GenerateMessageContracts>false</GenerateMessageContracts>
|
||||||
|
<NamespaceMappings />
|
||||||
|
<CollectionMappings />
|
||||||
|
<GenerateSerializableTypes>true</GenerateSerializableTypes>
|
||||||
|
<Serializer>Auto</Serializer>
|
||||||
|
<UseSerializerForFaults>true</UseSerializerForFaults>
|
||||||
|
<ReferenceAllAssemblies>true</ReferenceAllAssemblies>
|
||||||
|
<ReferencedAssemblies />
|
||||||
|
<ReferencedDataContractTypes />
|
||||||
|
<ServiceContractMappings />
|
||||||
|
</ClientOptions>
|
||||||
|
<MetadataSources>
|
||||||
|
<MetadataSource Address="http://gps.rcontrol.com.mx/Tracking/wcf/RCService.svc" Protocol="http" SourceId="1" />
|
||||||
|
</MetadataSources>
|
||||||
|
<Metadata>
|
||||||
|
<MetadataFile FileName="RCService.xsd" MetadataType="Schema" ID="ef269bf5-8135-4c5e-9786-14eff95b6e0f" SourceId="1" SourceUrl="http://gps.rcontrol.com.mx/Tracking/wcf/RCService.svc?xsd=xsd3" />
|
||||||
|
<MetadataFile FileName="RCService1.xsd" MetadataType="Schema" ID="cc775d26-6884-407e-b436-645a9cf70898" SourceId="1" SourceUrl="http://gps.rcontrol.com.mx/Tracking/wcf/RCService.svc?xsd=xsd2" />
|
||||||
|
<MetadataFile FileName="RCService.wsdl" MetadataType="Wsdl" ID="5460450a-87b8-4ec3-8be1-f7c57c6d55a3" SourceId="1" SourceUrl="http://gps.rcontrol.com.mx/Tracking/wcf/RCService.svc?wsdl" />
|
||||||
|
<MetadataFile FileName="RCService2.xsd" MetadataType="Schema" ID="604d109e-7f23-41dc-ac3c-bfea0e162a25" SourceId="1" SourceUrl="http://gps.rcontrol.com.mx/Tracking/wcf/RCService.svc?xsd=xsd0" />
|
||||||
|
<MetadataFile FileName="RCService.disco" MetadataType="Disco" ID="1ff8e1be-626f-4255-8d8a-5d5e5fe07155" SourceId="1" SourceUrl="http://gps.rcontrol.com.mx/Tracking/wcf/RCService.svc?disco" />
|
||||||
|
<MetadataFile FileName="RCService3.xsd" MetadataType="Schema" ID="a4e6a383-7115-41d4-a793-24a192a14fd5" SourceId="1" SourceUrl="http://gps.rcontrol.com.mx/Tracking/wcf/RCService.svc?xsd=xsd1" />
|
||||||
|
</Metadata>
|
||||||
|
<Extensions>
|
||||||
|
<ExtensionFile FileName="configuration91.svcinfo" Name="configuration91.svcinfo" />
|
||||||
|
<ExtensionFile FileName="configuration.svcinfo" Name="configuration.svcinfo" />
|
||||||
|
</Extensions>
|
||||||
|
</ReferenceGroup>
|
||||||
10
App_WebReferences/RCGPSService/configuration.svcinfo
Normal file
10
App_WebReferences/RCGPSService/configuration.svcinfo
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configurationSnapshot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:schemas-microsoft-com:xml-wcfconfigurationsnapshot">
|
||||||
|
<behaviors />
|
||||||
|
<bindings>
|
||||||
|
<binding digest="System.ServiceModel.Configuration.BasicHttpBindingElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:<?xml version="1.0" encoding="utf-16"?><Data name="BasicHttpBinding_IRCService" />" bindingType="basicHttpBinding" name="BasicHttpBinding_IRCService" />
|
||||||
|
</bindings>
|
||||||
|
<endpoints>
|
||||||
|
<endpoint normalizedDigest="<?xml version="1.0" encoding="utf-16"?><Data address="http://gps.rcontrol.com.mx/Tracking/wcf/RCService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IRCService" contract="RCGPSService.IRCService" name="BasicHttpBinding_IRCService" />" digest="<?xml version="1.0" encoding="utf-16"?><Data address="http://gps.rcontrol.com.mx/Tracking/wcf/RCService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IRCService" contract="RCGPSService.IRCService" name="BasicHttpBinding_IRCService" />" contractName="RCGPSService.IRCService" name="BasicHttpBinding_IRCService" />
|
||||||
|
</endpoints>
|
||||||
|
</configurationSnapshot>
|
||||||
201
App_WebReferences/RCGPSService/configuration91.svcinfo
Normal file
201
App_WebReferences/RCGPSService/configuration91.svcinfo
Normal file
@@ -0,0 +1,201 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="lQzXnMYzJj9Lq03SQ9fuwegTyb4=">
|
||||||
|
<bindingConfigurations>
|
||||||
|
<bindingConfiguration bindingType="basicHttpBinding" name="BasicHttpBinding_IRCService">
|
||||||
|
<properties>
|
||||||
|
<property path="/name" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>BasicHttpBinding_IRCService</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/closeTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue />
|
||||||
|
</property>
|
||||||
|
<property path="/openTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue />
|
||||||
|
</property>
|
||||||
|
<property path="/receiveTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue />
|
||||||
|
</property>
|
||||||
|
<property path="/sendTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue />
|
||||||
|
</property>
|
||||||
|
<property path="/allowCookies" isComplexType="false" isExplicitlyDefined="true" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue />
|
||||||
|
</property>
|
||||||
|
<property path="/bypassProxyOnLocal" isComplexType="false" isExplicitlyDefined="true" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue />
|
||||||
|
</property>
|
||||||
|
<property path="/hostNameComparisonMode" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.HostNameComparisonMode, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>StrongWildcard</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/maxBufferPoolSize" isComplexType="false" isExplicitlyDefined="true" clrType="System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue />
|
||||||
|
</property>
|
||||||
|
<property path="/maxBufferSize" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>65536</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/maxReceivedMessageSize" isComplexType="false" isExplicitlyDefined="true" clrType="System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue />
|
||||||
|
</property>
|
||||||
|
<property path="/proxyAddress" isComplexType="false" isExplicitlyDefined="false" clrType="System.Uri, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue />
|
||||||
|
</property>
|
||||||
|
<property path="/readerQuotas" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/readerQuotas/maxDepth" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>0</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/readerQuotas/maxStringContentLength" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>0</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/readerQuotas/maxArrayLength" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>0</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/readerQuotas/maxBytesPerRead" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>0</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/readerQuotas/maxNameTableCharCount" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>0</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/textEncoding" isComplexType="false" isExplicitlyDefined="false" clrType="System.Text.Encoding, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>System.Text.UTF8Encoding</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/transferMode" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.TransferMode, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>Buffered</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/useDefaultWebProxy" isComplexType="false" isExplicitlyDefined="true" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue />
|
||||||
|
</property>
|
||||||
|
<property path="/messageEncoding" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.WSMessageEncoding, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>Text</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/security" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.BasicHttpSecurityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>System.ServiceModel.Configuration.BasicHttpSecurityElement</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/security/mode" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.BasicHttpSecurityMode, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>None</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/security/transport" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.HttpTransportSecurityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>System.ServiceModel.Configuration.HttpTransportSecurityElement</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/security/transport/clientCredentialType" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.HttpClientCredentialType, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>None</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/security/transport/proxyCredentialType" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.HttpProxyCredentialType, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>None</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/security/transport/extendedProtectionPolicy" isComplexType="true" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/security/transport/extendedProtectionPolicy/policyEnforcement" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.PolicyEnforcement, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>Never</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/security/transport/extendedProtectionPolicy/protectionScenario" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.ProtectionScenario, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>TransportSelected</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/security/transport/extendedProtectionPolicy/customServiceNames" isComplexType="true" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.Configuration.ServiceNameElementCollection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>(Collection)</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/security/transport/realm" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue />
|
||||||
|
</property>
|
||||||
|
<property path="/security/message" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.BasicHttpMessageSecurityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>System.ServiceModel.Configuration.BasicHttpMessageSecurityElement</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/security/message/clientCredentialType" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.BasicHttpMessageCredentialType, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>UserName</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/security/message/algorithmSuite" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.Security.SecurityAlgorithmSuite, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>Default</serializedValue>
|
||||||
|
</property>
|
||||||
|
</properties>
|
||||||
|
</bindingConfiguration>
|
||||||
|
</bindingConfigurations>
|
||||||
|
<endpoints>
|
||||||
|
<endpoint name="BasicHttpBinding_IRCService" contract="RCGPSService.IRCService" bindingType="basicHttpBinding" address="http://gps.rcontrol.com.mx/Tracking/wcf/RCService.svc" bindingConfiguration="BasicHttpBinding_IRCService">
|
||||||
|
<properties>
|
||||||
|
<property path="/address" isComplexType="false" isExplicitlyDefined="true" clrType="System.Uri, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>http://gps.rcontrol.com.mx/Tracking/wcf/RCService.svc</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/behaviorConfiguration" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue />
|
||||||
|
</property>
|
||||||
|
<property path="/binding" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>basicHttpBinding</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/bindingConfiguration" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>BasicHttpBinding_IRCService</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/contract" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>RCGPSService.IRCService</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/headers" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.AddressHeaderCollectionElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>System.ServiceModel.Configuration.AddressHeaderCollectionElement</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/headers/headers" isComplexType="false" isExplicitlyDefined="true" clrType="System.ServiceModel.Channels.AddressHeaderCollection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue><Header /></serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/identity" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.IdentityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>System.ServiceModel.Configuration.IdentityElement</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/identity/userPrincipalName" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.UserPrincipalNameElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>System.ServiceModel.Configuration.UserPrincipalNameElement</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/identity/userPrincipalName/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue />
|
||||||
|
</property>
|
||||||
|
<property path="/identity/servicePrincipalName" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.ServicePrincipalNameElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>System.ServiceModel.Configuration.ServicePrincipalNameElement</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/identity/servicePrincipalName/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue />
|
||||||
|
</property>
|
||||||
|
<property path="/identity/dns" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.DnsElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>System.ServiceModel.Configuration.DnsElement</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/identity/dns/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue />
|
||||||
|
</property>
|
||||||
|
<property path="/identity/rsa" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.RsaElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>System.ServiceModel.Configuration.RsaElement</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/identity/rsa/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue />
|
||||||
|
</property>
|
||||||
|
<property path="/identity/certificate" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.CertificateElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>System.ServiceModel.Configuration.CertificateElement</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/identity/certificate/encodedValue" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue />
|
||||||
|
</property>
|
||||||
|
<property path="/identity/certificateReference" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.CertificateReferenceElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>System.ServiceModel.Configuration.CertificateReferenceElement</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/identity/certificateReference/storeName" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Cryptography.X509Certificates.StoreName, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>My</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/identity/certificateReference/storeLocation" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Cryptography.X509Certificates.StoreLocation, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>LocalMachine</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/identity/certificateReference/x509FindType" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Cryptography.X509Certificates.X509FindType, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>FindBySubjectDistinguishedName</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/identity/certificateReference/findValue" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue />
|
||||||
|
</property>
|
||||||
|
<property path="/identity/certificateReference/isChainIncluded" isComplexType="false" isExplicitlyDefined="false" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>False</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/name" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue>BasicHttpBinding_IRCService</serializedValue>
|
||||||
|
</property>
|
||||||
|
<property path="/kind" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue />
|
||||||
|
</property>
|
||||||
|
<property path="/endpointConfiguration" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<serializedValue />
|
||||||
|
</property>
|
||||||
|
</properties>
|
||||||
|
</endpoint>
|
||||||
|
</endpoints>
|
||||||
|
</SavedWcfConfigurationInformation>
|
||||||
158
Ashx/SIGGPSRCService.ashx
Normal file
158
Ashx/SIGGPSRCService.ashx
Normal file
@@ -0,0 +1,158 @@
|
|||||||
|
<%@ WebHandler Language="C#" Class="SIGGPSRCService" %>
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.SessionState;
|
||||||
|
using System.Data;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using Extensiones;
|
||||||
|
using System.Collections.Specialized;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
public class SIGGPSRCService : IHttpHandler, IRequiresSessionState
|
||||||
|
{
|
||||||
|
public bool EsProduccion
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (System.Configuration.ConfigurationManager.AppSettings["EsProduccion"] == null)
|
||||||
|
return false;
|
||||||
|
else
|
||||||
|
return (System.Configuration.ConfigurationManager.AppSettings["EsProduccion"].ToString() == "1");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsReusable => false;
|
||||||
|
|
||||||
|
public void ProcessRequest(HttpContext context)
|
||||||
|
{
|
||||||
|
context.Response.ContentType = "text/plain";
|
||||||
|
bool retorno = false;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
string Metodo = context.Request["Metodo"] == null ? "" : context.Request["Metodo"];
|
||||||
|
switch (Metodo)
|
||||||
|
{
|
||||||
|
case "EjecutaServicio":
|
||||||
|
ModExtensiones.GuardaLogAD("Servicio Ejecutado...........", "LogServicioConfiable");
|
||||||
|
retorno = IniciarTransmision();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (retorno)
|
||||||
|
{
|
||||||
|
context.Response.Write("True");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
context.Response.Write("False");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
ex.GuardaLog(ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
context.Response.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool IniciarTransmision()
|
||||||
|
{
|
||||||
|
var retorno = false;
|
||||||
|
var TieneError = false;
|
||||||
|
|
||||||
|
var WS = new RCGPSService.RCServiceClient();
|
||||||
|
|
||||||
|
RCGPSService.UserTokenResult Token = WS.GetUserToken(UserService, PasswordService);
|
||||||
|
List<RCGPSService.Event> ListaEventos = new List<RCGPSService.Event>();
|
||||||
|
|
||||||
|
DataTable DtTrackings = null;
|
||||||
|
var ObjGPS = new ClsGPS();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (ObjGPS.GetRCTracking(-1, -1, 1, -1, -1))
|
||||||
|
{
|
||||||
|
DtTrackings = ObjGPS.DtResultados.Copy();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TieneError = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DtTrackings != null)
|
||||||
|
{
|
||||||
|
foreach (DataRow RowTrack in DtTrackings.Rows)
|
||||||
|
{
|
||||||
|
DataTable dtTracking = null;
|
||||||
|
if (ObjGPS.GetRCTrackingDatos(RowTrack["CveRCTracking"].ToString().ToEntero()))
|
||||||
|
{
|
||||||
|
dtTracking = ObjGPS.DtResultados.Copy();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TieneError = true;
|
||||||
|
}
|
||||||
|
if (dtTracking != null)
|
||||||
|
{
|
||||||
|
foreach (DataRow Row in dtTracking.Rows)
|
||||||
|
{
|
||||||
|
ListaEventos.Add(new RCGPSService.Event()
|
||||||
|
{
|
||||||
|
code = "STT",
|
||||||
|
date = Row["Fecha"].ToString().ToDateTime(),
|
||||||
|
latitude = Row["Latitud"].ToString(),
|
||||||
|
longitude = Row["Longitud"].ToString(),
|
||||||
|
asset = Row["PlacasVehiculo"].ToString(),
|
||||||
|
speed = Row["Velocidad"].ToString(),
|
||||||
|
shipment = Row["Shipment"].ToString()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dtTracking.Dispose();
|
||||||
|
dtTracking = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
TieneError = true;
|
||||||
|
this.OnError("Ocurrió un error al enviar los datos", ex);
|
||||||
|
}
|
||||||
|
ObjGPS.Dispose();
|
||||||
|
|
||||||
|
DtTrackings.Dispose();
|
||||||
|
DtTrackings = null;
|
||||||
|
|
||||||
|
if (ListaEventos.Count > 0 && !TieneError)
|
||||||
|
{
|
||||||
|
var respuesta = WS.GPSAssetTracking(Token.token, ListaEventos.ToArray());
|
||||||
|
if (respuesta.Length > 0)
|
||||||
|
{
|
||||||
|
retorno = !TieneError;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
retorno = !TieneError;
|
||||||
|
}
|
||||||
|
|
||||||
|
WS.Close();
|
||||||
|
|
||||||
|
return retorno;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private string UserService => EsProduccion ? "ws_avl_opsat" : "demo_cedis_corp";
|
||||||
|
private string PasswordService => EsProduccion ? "eiHv##889iWfz#&2" : "xxxxxxxx";
|
||||||
|
|
||||||
|
}
|
||||||
@@ -585,7 +585,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
|
|
||||||
|
|
||||||
'verifica existencias
|
'verifica existencias
|
||||||
If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141) Then
|
If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141, 152) Then
|
||||||
UsaGlobal = False
|
UsaGlobal = False
|
||||||
|
|
||||||
Dim objInv As New ClsInventarios
|
Dim objInv As New ClsInventarios
|
||||||
|
|||||||
151
Bancos/IE.aspx
151
Bancos/IE.aspx
@@ -441,6 +441,115 @@
|
|||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="portlet light xspadding bordered " runat="server" id="DVDevolucion" visible="false">
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption font-green">
|
||||||
|
<i class="icon-pin font-green"></i>
|
||||||
|
<span class="caption-subject bold uppercase">Notas de Crédito</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tools">
|
||||||
|
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||||
|
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
|
||||||
|
<a href="javascript:;" class="remove" data-original-title="" title=""></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="actions">
|
||||||
|
<div class="btn-group">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body ">
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
|
||||||
|
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpGvNotas" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:GridView ID="GvA" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Notas de Crédito" DataKeyNames="CveCompra,Saldo,SerieFolio,Fecha"
|
||||||
|
CssClass="table table-striped table-hover Widthall ScrollAD" data-sort="true" GridLines="None" BorderColor="#D3D3D3" BorderWidth="1">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
|
||||||
|
|
||||||
|
<HeaderTemplate>
|
||||||
|
<input type="checkbox" class="form-check-input" id="ChkSelector" onclick="SelectorNotas(this)">
|
||||||
|
</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:CheckBox ID="Chk" runat="server" CssClass="CssSelector" onclick="FCSumaTotalesNotas()" />
|
||||||
|
</ItemTemplate>
|
||||||
|
|
||||||
|
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField ItemStyle-Width="100px" HeaderText="NC">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="HplFactura" runat="server" CssClass="Texto" Text='<%# Eval("SerieFolio")%>' NavigateUrl='<%# If(Eval("CveCompra").ToString <> "0", Eval("CveCompra", "/Compras/Compras.aspx?CveCompra={0}"), If(Eval("CveIE").ToString <> "0", Eval("CveIE", "/Bancos/IE.aspx?CveIE={0}"), ""))%>'></asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Fecha">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Original" ItemStyle-HorizontalAlign="Right">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlOriginal" runat="server" Text='<%# Eval("Original", "{0:N2}")%>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Saldo" ItemStyle-HorizontalAlign="Right">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField Visible="False" HeaderText="Abonar">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Image ID="ImgAbonar" runat="server" ImageUrl="~/Imagenes/Money_add.png" AlternateText="Registrar Pago/Abono" Style="cursor: pointer;" Visible="False" />
|
||||||
|
<%-- Visible='<%# Eval("CveCompra").ToString <> "" andalso CDbl(Eval("Saldo")) > 0%>' />--%>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Devolución" ItemStyle-HorizontalAlign="Center" Visible="false" ItemStyle-Width="50px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="HLDevolverDinero" Visible="false" NavigateUrl="#" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-usd'></i>" runat="server" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
|
||||||
|
</Columns>
|
||||||
|
<RowStyle CssClass="Texto" />
|
||||||
|
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||||
|
<HeaderStyle CssClass="Titulos" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</asp:GridView>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="ModalUpload" class="modal ADS fade" role="dialog">
|
<div id="ModalUpload" class="modal ADS fade" role="dialog">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
|
|
||||||
@@ -873,6 +982,8 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
@@ -1163,6 +1274,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%-- COMPLEMENTOS PAGO --%>
|
<%-- COMPLEMENTOS PAGO --%>
|
||||||
|
|
||||||
<div id="ModalComplementoPagos" class="modal ADS fade" role="dialog">
|
<div id="ModalComplementoPagos" class="modal ADS fade" role="dialog">
|
||||||
<asp:UpdatePanel ID="UpComplementoPagos" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpComplementoPagos" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
@@ -1571,5 +1683,44 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function SelectorNotas(Chk) {
|
||||||
|
|
||||||
|
$(`.CssSelector input[type=checkbox]`).each(function () {
|
||||||
|
$(this).prop('checked', Chk.checked);
|
||||||
|
});
|
||||||
|
|
||||||
|
FCSumaTotalesNotas()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function FCSumaTotalesNotas() {
|
||||||
|
var Total = 0.0;
|
||||||
|
|
||||||
|
$(`.CssSelector input[type=checkbox]`).each(function () {
|
||||||
|
if ($(this).is(":checked")) {
|
||||||
|
Total += parseFloat($(this).attr("data-saldo"));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
if (Total > 0) {
|
||||||
|
|
||||||
|
$(`#TxtImporte`).val(Total);
|
||||||
|
|
||||||
|
FormatoMoneda( $get("TxtImporte"));
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$(`#TxtImporte`).val("");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function DeshabilitarTxt(){
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -148,7 +148,14 @@ Partial Class Bancos_IE
|
|||||||
End Property
|
End Property
|
||||||
Private Property SerieFolioDeCDin As String
|
Private Property SerieFolioDeCDin As String
|
||||||
Get
|
Get
|
||||||
Return ViewState("SerieFolioDeCDin").ToString
|
|
||||||
|
If ViewState("SerieFolioDeCDin") Is Nothing Then
|
||||||
|
Return ""
|
||||||
|
Else
|
||||||
|
Return ViewState("SerieFolioDeCDin").ToString
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
ViewState("SerieFolioDeCDin") = value
|
ViewState("SerieFolioDeCDin") = value
|
||||||
@@ -438,7 +445,12 @@ Partial Class Bancos_IE
|
|||||||
End Property
|
End Property
|
||||||
Private Property CveCorte As Integer
|
Private Property CveCorte As Integer
|
||||||
Get
|
Get
|
||||||
Return IfNull(ViewState("CveCorte"), -1, ViewState("CveCorte").ToString().ToString()).ToString().ToEntero()
|
If ViewState("CveCorte") Is Nothing Then
|
||||||
|
Return -1
|
||||||
|
Else
|
||||||
|
Return ViewState("CveCorte").ToString().ToEntero()
|
||||||
|
End If
|
||||||
|
|
||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
ViewState("CveCorte") = value
|
ViewState("CveCorte") = value
|
||||||
@@ -446,6 +458,21 @@ Partial Class Bancos_IE
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Private Property Masivonotas As Boolean
|
||||||
|
Get
|
||||||
|
|
||||||
|
If ViewState("Masivonotas") Is Nothing Then
|
||||||
|
Return False
|
||||||
|
Else
|
||||||
|
Return Boolean.Parse(ViewState("Masivonotas").ToString)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
ViewState("Masivonotas") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
#Region "CANCELACIÓN COMPLEMENTO MODAL V2"
|
#Region "CANCELACIÓN COMPLEMENTO MODAL V2"
|
||||||
|
|
||||||
Property CveComplementoPagoCancelar As Integer
|
Property CveComplementoPagoCancelar As Integer
|
||||||
@@ -544,7 +571,7 @@ Partial Class Bancos_IE
|
|||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
|
Me.CveCorte = -1
|
||||||
Folio = ""
|
Folio = ""
|
||||||
IDCtaBeneficiario = 0
|
IDCtaBeneficiario = 0
|
||||||
IDCtaBeneficiarioComplementaria = 0
|
IDCtaBeneficiarioComplementaria = 0
|
||||||
@@ -572,6 +599,8 @@ Partial Class Bancos_IE
|
|||||||
'Guarda el modo actual de la pagina
|
'Guarda el modo actual de la pagina
|
||||||
Opcion = If(Request("Opcion") IsNot Nothing, Request("Opcion").ToString, "-1")
|
Opcion = If(Request("Opcion") IsNot Nothing, Request("Opcion").ToString, "-1")
|
||||||
|
|
||||||
|
Masivonotas = If(Request("Masivo") IsNot Nothing, True, False)
|
||||||
|
|
||||||
Session("FileUpload") = ""
|
Session("FileUpload") = ""
|
||||||
TRCveIE.Visible = False
|
TRCveIE.Visible = False
|
||||||
|
|
||||||
@@ -604,6 +633,18 @@ Partial Class Bancos_IE
|
|||||||
CargaProveedor(CveProveedor, "-1")
|
CargaProveedor(CveProveedor, "-1")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If Request("Opcion") IsNot Nothing AndAlso Request("Opcion") = "DevDinC" AndAlso Request("CveProveedor") IsNot Nothing AndAlso IsNumeric(Request("CveProveedor")) AndAlso Request("CveProveedor").ToEntero > 0 Then
|
||||||
|
If Masivonotas Then
|
||||||
|
'CargaNotas()
|
||||||
|
DVDevolucion.Visible = True
|
||||||
|
HdnCveProveedor.Value = Request("CveProveedor")
|
||||||
|
DivOtrosIngresosEgresos.Visible = False
|
||||||
|
End If
|
||||||
|
TxtImporte.Attributes.Add("onkeypress", "javascript: return false;")
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString.Contiene("EGSCREDITO") Then
|
If Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString.Contiene("EGSCREDITO") Then
|
||||||
LblPagueseA.Text = ""
|
LblPagueseA.Text = ""
|
||||||
LblPagueseA.Visible = False
|
LblPagueseA.Visible = False
|
||||||
@@ -1225,6 +1266,7 @@ Partial Class Bancos_IE
|
|||||||
Dim EsDevolucion As Boolean = False
|
Dim EsDevolucion As Boolean = False
|
||||||
|
|
||||||
If Request("Opcion") IsNot Nothing AndAlso Request("Opcion") = "DevDinC" Then
|
If Request("Opcion") IsNot Nothing AndAlso Request("Opcion") = "DevDinC" Then
|
||||||
|
CveIE = -1
|
||||||
EsDevolucion = True
|
EsDevolucion = True
|
||||||
RBL.SelectedValue = "P"
|
RBL.SelectedValue = "P"
|
||||||
RBL.Enabled = False
|
RBL.Enabled = False
|
||||||
@@ -1237,6 +1279,8 @@ Partial Class Bancos_IE
|
|||||||
DdlProveedores.SelectedValue = ObjProveedor.CveProveedor.ToString
|
DdlProveedores.SelectedValue = ObjProveedor.CveProveedor.ToString
|
||||||
DivOtrosIngresosEgresos.Visible = True
|
DivOtrosIngresosEgresos.Visible = True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Select Case RBL.SelectedValue
|
Select Case RBL.SelectedValue
|
||||||
@@ -1289,6 +1333,78 @@ Partial Class Bancos_IE
|
|||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub CargaNotas(CvemonedaInterna As Integer)
|
||||||
|
Dim ObjMovtos As New ClsMovimientos()
|
||||||
|
|
||||||
|
If CvemonedaInterna > 0 Then
|
||||||
|
If ObjMovtos.GetAnticiposProveedor(CveProveedor, -1, CvemonedaInterna, -1) AndAlso ObjMovtos.DtResultados.FiltraParametros("TipoDocto = 'NC'").Rows.Count > 0 Then
|
||||||
|
GvA.DataSource = ObjMovtos.DtResultados.FiltraParametros("TipoDocto = 'NC' and Saldo > 0 and CveCompra > 0")
|
||||||
|
|
||||||
|
Else
|
||||||
|
GvA.DataSource = Nothing
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
GvA.DataSource = Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
ObjMovtos.Dispose()
|
||||||
|
|
||||||
|
|
||||||
|
GvA.DataBind()
|
||||||
|
UpGvNotas.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub GvAH_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvA.RowDataBound
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
|
If e.Row.RowIndex = 0 Then 'e.Row.BackColor = Drawing.Color.LightGray
|
||||||
|
|
||||||
|
e.Row.Cells(1).Width = Unit.Pixel(120)
|
||||||
|
e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||||
|
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||||
|
e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||||
|
End If
|
||||||
|
|
||||||
|
'If e.Row.DBCampo("TipoDocto") = "Egsc" AndAlso e.Row.DBCampo("SerieFolio") = "" Then
|
||||||
|
' e.Row.CssClass = "Totales TextCenter"
|
||||||
|
' e.Row.Cells(1).Text = "Egreso Por Comprobar"
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'If e.Row.DBCampo("TipoDocto") = "Ant" AndAlso e.Row.DBCampo("SerieFolio") = "" Then
|
||||||
|
' e.Row.CssClass = "Totales TextCenter"
|
||||||
|
' e.Row.Cells(1).Text = "Anticipos"
|
||||||
|
'End If
|
||||||
|
|
||||||
|
If e.Row.DBCampo("TipoDocto") = "NC" AndAlso e.Row.DataKey("CveCompra").ToString.ToEntero > 0 Then
|
||||||
|
e.Row.FCCheckBox("Chk").InputAttributes.Add("data-saldo", e.Row.DataKey("Saldo"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
'If e.Row.DBCampo("TipoDocto") = "DEV" AndAlso e.Row.DBCampo("SerieFolio") = "" Then
|
||||||
|
' e.Row.CssClass = "Totales TextCenter"
|
||||||
|
' e.Row.Cells(0).Text = "Devolución"
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'If e.Row.DBCampo("CveProveedor") = "" Then
|
||||||
|
' e.Row.BackColor = Drawing.Color.LightGray
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'If UsuarioActual.TienePermisoProceso(273) Then
|
||||||
|
' If CType(sender, GridView).ID = "GvA" And e.Row.DBCampo("CveCompra").ToEntero > 0 And e.Row.DBCampo("TipoDocto") = "NC" Then
|
||||||
|
' Dim Parametros = Encripta($"CveCompra={e.Row.DBCampo("CveCompra").ToEntero}&SerieFolio={e.Row.DBCampo("SerieFolio")}&CveMoneda={e.Row.DBCampo("CveMoneda")}&CveProveedor={CveProveedor}&Saldo={e.Row.DBCampo("Saldo")}&Original={e.Row.DBCampo("Original")}&CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}&FechaCompra={e.Row.DBCampo("Fecha")}")
|
||||||
|
' e.Row.FCHyperLink("HLDevolverDinero").Visible = True
|
||||||
|
' e.Row.FCHyperLink("HLDevolverDinero").NavigateUrl = $"/Bancos/IE.aspx?Opcion=DevDinC&P={Parametros}"
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Region " CARGA CLIENTE "
|
#Region " CARGA CLIENTE "
|
||||||
Protected Sub DdlCliente_selectedindexchange(sender As Object, e As EventArgs)
|
Protected Sub DdlCliente_selectedindexchange(sender As Object, e As EventArgs)
|
||||||
HdnCveCliente.Value = DdlCliente.SelectedValue
|
HdnCveCliente.Value = DdlCliente.SelectedValue
|
||||||
@@ -1445,6 +1561,15 @@ Partial Class Bancos_IE
|
|||||||
Banco.Dispose()
|
Banco.Dispose()
|
||||||
TxtFolio.Text = Folio.ToString
|
TxtFolio.Text = Folio.ToString
|
||||||
|
|
||||||
|
Dim drI As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltroPrimero(String.Format("CveCuenta={0}", DdlCuenta.SelectedValue))
|
||||||
|
|
||||||
|
If drI IsNot Nothing Then
|
||||||
|
CargaNotas(drI("CveMoneda").ToString.ToEntero)
|
||||||
|
Else
|
||||||
|
CargaNotas(-1)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
TxtFolio.Text = ""
|
TxtFolio.Text = ""
|
||||||
End If
|
End If
|
||||||
@@ -1676,7 +1801,7 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Opcion = "DevDinC" AndAlso Request("P") IsNot Nothing AndAlso Request("P").Length > 0 Then
|
If Opcion = "DevDinC" AndAlso Request("P") IsNot Nothing AndAlso Request("P").Length > 0 Or Opcion = "DevDinC" AndAlso Masivonotas Then
|
||||||
DdlTipoTransaccion.DataSource = dt.FiltraParametros("Tipo = 'Ing' ")
|
DdlTipoTransaccion.DataSource = dt.FiltraParametros("Tipo = 'Ing' ")
|
||||||
Else
|
Else
|
||||||
DdlTipoTransaccion.DataSource = dt
|
DdlTipoTransaccion.DataSource = dt
|
||||||
@@ -2864,20 +2989,7 @@ Partial Class Bancos_IE
|
|||||||
Dim TCCompra As Decimal = 1
|
Dim TCCompra As Decimal = 1
|
||||||
Dim TCDocumento As Decimal = 1
|
Dim TCDocumento As Decimal = 1
|
||||||
|
|
||||||
If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
|
|
||||||
|
|
||||||
TCCompra = GlobalTipoCambio(FechaCompra).ToDecimal
|
|
||||||
TCDocumento = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).ToDecimal
|
|
||||||
|
|
||||||
If TCCompra <= 0 Then
|
|
||||||
Alert("No se pudo obtener el tipo de cambio de la nota de crédito.", TipoMensaje.MsgAdvertencia)
|
|
||||||
End If
|
|
||||||
|
|
||||||
If TCCompra <= 0 Then
|
|
||||||
Alert("No se pudo obtener el tipo de cambio del documentpo.", TipoMensaje.MsgAdvertencia)
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -2889,207 +3001,498 @@ Partial Class Bancos_IE
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'BANCOS COMPLEMENTARIA
|
If Masivonotas Then
|
||||||
If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
|
|
||||||
ImporteAplicarMN = ((ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TCDocumento)) - ImporteAplicar).RoundSQL()
|
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteAplicar, ReferenciaAplicar, 204, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicarME, CveCuenta:=CveCuentaConta, TipoCambio:=TCDocumento) Then
|
|
||||||
MsgError = "Ocurrió un error al registrara el asiento de bancos complementaria de devolución"
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'OTROS INGRESOS/EGRESOS
|
For Each GvRow As GridViewRow In GvA.Rows
|
||||||
If TxtOtrosIngresosEgresos.Text.ToDecimal <> 0 Then
|
If GvRow.RowType = DataControlRowType.DataRow AndAlso GvRow.FCCheckBox("Chk").Checked Then
|
||||||
Dim Impo As Decimal = TxtOtrosIngresosEgresos.Text.ToDecimal
|
|
||||||
Dim TipoMovtoIE As Boolean = False
|
|
||||||
Dim CveConcIE As Integer = 78
|
|
||||||
If Impo > 0 Then
|
|
||||||
TipoMovtoIE = True
|
|
||||||
Impo = Math.Abs(Impo)
|
|
||||||
CveConcIE = 78
|
|
||||||
IdCtaContableAplicar = UsuarioActual.Empresa.IdCuentaOtrosIngresos
|
|
||||||
Else
|
|
||||||
TipoMovtoIE = False
|
|
||||||
Impo = Math.Abs(Impo)
|
|
||||||
CveConcIE = 211
|
|
||||||
IdCtaContableAplicar = UsuarioActual.Empresa.Funcionalidad(266).ToEntero
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoIE, Impo, ReferenciaAplicar, CveConcIE, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=Impo, ImporteME:=0, CveCuenta:=CveCuentaConta, TipoCambio:=TCDocumento) Then
|
Dim FechaCompraNota As Date = GvRow.DataKey("Fecha").ToDate
|
||||||
MsgError = "Ocurrió un error al registrar el asiento de pago de devolución"
|
|
||||||
Exit Select
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'CANCELA NC
|
If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
|
||||||
IdCtaContableAplicar = IDCtaBeneficiario
|
|
||||||
ImporteAplicar = ImporteAplicar - TxtOtrosIngresosEgresos.Text.ToDecimal
|
|
||||||
ImporteAplicarMN = ImporteAplicar ' (ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL()
|
|
||||||
|
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -(ImporteAplicar), ReferenciaAplicar, 18, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=(ImporteAplicarMN), ImporteME:=ImporteAplicarME, TipoCambio:=TCCompra) Then
|
TCCompra = GlobalTipoCambio(FechaCompraNota).ToDecimal
|
||||||
MsgError = "Ocurrió un error al registrar el asiento de pago de devolución"
|
TCDocumento = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).ToDecimal
|
||||||
Exit Select
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
If TCCompra <= 0 Then
|
||||||
|
Alert("No se pudo obtener el tipo de cambio de la nota de crédito.", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
'NC COMPLEMENTARIA
|
If TCDocumento <= 0 Then
|
||||||
If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
|
Alert("No se pudo obtener el tipo de cambio del documentpo.", TipoMensaje.MsgAdvertencia)
|
||||||
|
|
||||||
ImporteAplicarMN = ((ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TCCompra)) - ImporteAplicar).RoundSQL()
|
|
||||||
|
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -(ImporteAplicar), ReferenciaAplicar, 201, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-(ImporteAplicarMN), ImporteME:=-(ImporteAplicarME), CveCuenta:=CveCuentaConta, TipoCambio:=TCCompra) Then
|
|
||||||
MsgError = "Ocurrió un error al registrar el asiento de bancos complementaria de devolución"
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
If TCCompra <> TCDocumento Then
|
|
||||||
|
|
||||||
Dim DiferenciaTC As Decimal = TCCompra - TCDocumento
|
|
||||||
|
|
||||||
Dim DiferenciaImportes As Decimal = Math.Abs((ImporteAplicar * TCCompra) - (ImporteAplicar * TCDocumento))
|
|
||||||
|
|
||||||
If DiferenciaTC < 0 Then
|
|
||||||
'64
|
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaImportes, ReferenciaAplicar, 64, ConceptoAplicar, Now, UsuarioActual.Empresa.IdCuentaGananciaCambiaria, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=DiferenciaImportes, ImporteME:=0, CveCuenta:=CveCuentaConta, TipoCambio:=TCCompra) Then
|
|
||||||
MsgError = "Ocurrió un error al registrar el asiento de ganancia cambiaria"
|
|
||||||
Exit Select
|
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
|
||||||
'65
|
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, DiferenciaImportes, ReferenciaAplicar, 65, ConceptoAplicar, Now, UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=DiferenciaImportes, ImporteME:=0, CveCuenta:=CveCuentaConta, TipoCambio:=TCCompra) Then
|
|
||||||
MsgError = "Ocurrió un error al registrar el asiento de perdidada cfambiaria"
|
|
||||||
Exit Select
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
'IMPUESTOS
|
|
||||||
|
|
||||||
Dim PorcentajePagoDevDin = (TxtImporte.Text.ToDecimal / ImporteOriginalDevDin).RoundSQL(6)
|
|
||||||
Dim CveConceptoContableAplciar = -1
|
|
||||||
Dim TipoMovtoAplicar = False
|
|
||||||
|
|
||||||
|
|
||||||
Dim ObjCompras As New ClsCompras()
|
|
||||||
If ObjCompras.GetCompras(CveCompraDeCDin, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
|
||||||
|
|
||||||
Dim dr As DataRow = ObjCompras.DtResultados.Rows(0)
|
|
||||||
If dr IsNot Nothing Then
|
|
||||||
|
|
||||||
Dim CveMonedaDev As Integer = dr("CveMoneda").ToString.ToEntero
|
|
||||||
Dim TotalCompraDev As Decimal = dr("Total").ToString.ToDecimal
|
|
||||||
|
|
||||||
Dim IVADev As Decimal = dr("IVA").ToString.ToDecimal
|
|
||||||
Dim IEPSDev As Decimal = dr("IEPS").ToString.ToDecimal
|
|
||||||
PorcentajeCompraDevDinC = ObjCompras.DtResultados.Rows(0)("PorcentajeIVA").ToString.ToDecimal
|
|
||||||
|
|
||||||
Dim DTCuentas As DataTable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeCompraDevDinC)
|
|
||||||
Dim CveCuentaIVAxAcreditarDevDinC = 0
|
|
||||||
Dim CveCuentaIVAAcreditableDevDinC = 0
|
|
||||||
Dim IdCtaIVAXAcreditarDevDinC = DTCuentas.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
|
|
||||||
Dim IdCtaIVAAcreditableDevDinC = DTCuentas.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
|
|
||||||
|
|
||||||
|
|
||||||
Dim IVADevMN As Decimal = 0
|
|
||||||
Dim IEPSDevMN As Decimal = 0
|
|
||||||
|
|
||||||
|
|
||||||
Dim PorcentajeDevolucion As Decimal = ((TxtImporte.Text.ToDecimal * 100D / TotalCompraDev) / 100).RoundSQL(2)
|
|
||||||
|
|
||||||
IVADev = Math.Round(IVADev * PorcentajeDevolucion, 2)
|
|
||||||
IEPSDev = Math.Round(IEPSDev * PorcentajeDevolucion, 2)
|
|
||||||
|
|
||||||
Dim CveCuentaDevolucionIMPUESTOS As Integer = -1
|
|
||||||
Dim IdCtaIVADevolucionIMPUESTOS As Integer = -1
|
|
||||||
|
|
||||||
|
|
||||||
If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
|
|
||||||
IVADevMN = IVADev
|
|
||||||
IEPSDevMN = IEPSDev
|
|
||||||
Else
|
|
||||||
IVADevMN = (IVADev * If(CveMonedaDev = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL(2)
|
|
||||||
IEPSDevMN = (IEPSDev * If(CveMonedaDev = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL(2)
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
Dim ErrorDevolucionImpuestos As Boolean = False
|
|
||||||
|
|
||||||
If IVADev > 0 Then
|
|
||||||
|
|
||||||
CveCuentaDevolucionIMPUESTOS = CveCuentaIVAxAcreditarDevDinC
|
|
||||||
IdCtaIVADevolucionIMPUESTOS = IdCtaIVAXAcreditarDevDinC
|
|
||||||
|
|
||||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoAplicar, -IVADev, ReferenciaAplicar, 14, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
|
||||||
|
|
||||||
CveCuentaDevolucionIMPUESTOS = CveCuentaIVAAcreditableDevDinC
|
|
||||||
IdCtaIVADevolucionIMPUESTOS = IdCtaIVAAcreditableDevDinC
|
|
||||||
|
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoAplicar, -IVADev, ReferenciaAplicar, 19, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
|
||||||
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
|
|
||||||
ErrorDevolucionImpuestos = True
|
|
||||||
End If
|
End If
|
||||||
Else
|
|
||||||
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
|
|
||||||
ErrorDevolucionImpuestos = True
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
If IEPSDev > 0 Then
|
|
||||||
'Dim ObjContabilidad As New ClsContabilidad
|
|
||||||
If ObjMov.GetRetCuenta(25, UsuarioActual.CveEmpresa) Then
|
|
||||||
Try
|
|
||||||
CveCuentaDevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditarSIG").ToString.ToEntero
|
|
||||||
IdCtaIVADevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
|
|
||||||
|
|
||||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoAplicar, -IEPSDev, ReferenciaAplicar, 25, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IEPSDevMN, ImporteME:=-IEPSDev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
ImporteAplicar = GvRow.DataKey("Saldo").ToDecimal
|
||||||
|
ImporteAplicarME = ImporteAplicar
|
||||||
|
|
||||||
If ObjMov.GetRetCuenta(26, UsuarioActual.CveEmpresa) Then
|
|
||||||
|
'CONSIDERA COMPLEMENTARIA
|
||||||
|
If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
|
||||||
|
ImporteAplicarMN = ImporteAplicar
|
||||||
|
Else
|
||||||
|
ImporteAplicarMN = (ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL()
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
|
||||||
|
|
||||||
|
TCCompra = GlobalTipoCambio(GvRow.DataKey("Fecha").ToDate).ToDecimal
|
||||||
|
TCDocumento = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).ToDecimal
|
||||||
|
|
||||||
|
If TCCompra <= 0 Then
|
||||||
|
Alert("No se pudo obtener el tipo de cambio de la nota de crédito.", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If TCDocumento <= 0 Then
|
||||||
|
Alert("No se pudo obtener el tipo de cambio del documentpo.", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
ConceptoAplicar = $"Devolución de Proveedor {PagueseA} {ImporteAplicar} NC:{GvRow.DataKey("SerieFolio")}"
|
||||||
|
|
||||||
|
CveCompraDeCDin = GvRow.DataKey("CveCompra").ToEntero
|
||||||
|
|
||||||
|
''
|
||||||
|
|
||||||
|
'BANCOS COMPLEMENTARIA
|
||||||
|
If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
|
||||||
|
ImporteAplicarMN = ((ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TCDocumento)) - ImporteAplicar).RoundSQL()
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteAplicar, ReferenciaAplicar, 204, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicarME, CveCuenta:=CveCuentaConta, TipoCambio:=TCDocumento) Then
|
||||||
|
MsgError = "Ocurrió un error al registrara el asiento de bancos complementaria de devolución"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
''OTROS INGRESOS/EGRESOS
|
||||||
|
'If TxtOtrosIngresosEgresos.Text.ToDecimal <> 0 Then
|
||||||
|
' Dim Impo As Decimal = TxtOtrosIngresosEgresos.Text.ToDecimal
|
||||||
|
' Dim TipoMovtoIE As Boolean = False
|
||||||
|
' Dim CveConcIE As Integer = 78
|
||||||
|
' If Impo > 0 Then
|
||||||
|
' TipoMovtoIE = True
|
||||||
|
' Impo = Math.Abs(Impo)
|
||||||
|
' CveConcIE = 78
|
||||||
|
' IdCtaContableAplicar = UsuarioActual.Empresa.IdCuentaOtrosIngresos
|
||||||
|
' Else
|
||||||
|
' TipoMovtoIE = False
|
||||||
|
' Impo = Math.Abs(Impo)
|
||||||
|
' CveConcIE = 211
|
||||||
|
' IdCtaContableAplicar = UsuarioActual.Empresa.Funcionalidad(266).ToEntero
|
||||||
|
' End If
|
||||||
|
|
||||||
|
|
||||||
|
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoIE, Impo, ReferenciaAplicar, CveConcIE, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=Impo, ImporteME:=0, CveCuenta:=CveCuentaConta, TipoCambio:=TCDocumento) Then
|
||||||
|
' MsgError = "Ocurrió un error al registrar el asiento de pago de devolución"
|
||||||
|
' Exit Select
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'CANCELA NC
|
||||||
|
IdCtaContableAplicar = IDCtaBeneficiario
|
||||||
|
ImporteAplicar = ImporteAplicar '- TxtOtrosIngresosEgresos.Text.ToDecimal
|
||||||
|
ImporteAplicarMN = ImporteAplicar ' (ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL()
|
||||||
|
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -(ImporteAplicar), ReferenciaAplicar, 18, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=(ImporteAplicarMN), ImporteME:=ImporteAplicarME, TipoCambio:=TCCompra) Then
|
||||||
|
MsgError = "Ocurrió un error al registrar el asiento de pago de devolución"
|
||||||
|
Exit Select
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'NC COMPLEMENTARIA
|
||||||
|
If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
|
||||||
|
|
||||||
|
ImporteAplicarMN = ((ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TCCompra)) - ImporteAplicar).RoundSQL()
|
||||||
|
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -(ImporteAplicar), ReferenciaAplicar, 201, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-(ImporteAplicarMN), ImporteME:=-(ImporteAplicarME), CveCuenta:=CveCuentaConta, TipoCambio:=TCCompra) Then
|
||||||
|
MsgError = "Ocurrió un error al registrar el asiento de bancos complementaria de devolución"
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
If TCCompra <> TCDocumento Then
|
||||||
|
|
||||||
|
Dim DiferenciaTC As Decimal = TCCompra - TCDocumento
|
||||||
|
|
||||||
|
Dim DiferenciaImportes As Decimal = Math.Abs((ImporteAplicar * TCCompra) - (ImporteAplicar * TCDocumento))
|
||||||
|
|
||||||
|
If DiferenciaTC < 0 Then
|
||||||
|
'64
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaImportes, ReferenciaAplicar, 64, ConceptoAplicar, Now, UsuarioActual.Empresa.IdCuentaGananciaCambiaria, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=DiferenciaImportes, ImporteME:=0, CveCuenta:=CveCuentaConta, TipoCambio:=TCCompra) Then
|
||||||
|
MsgError = "Ocurrió un error al registrar el asiento de ganancia cambiaria"
|
||||||
|
Exit Select
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
'65
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, DiferenciaImportes, ReferenciaAplicar, 65, ConceptoAplicar, Now, UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=DiferenciaImportes, ImporteME:=0, CveCuenta:=CveCuentaConta, TipoCambio:=TCCompra) Then
|
||||||
|
MsgError = "Ocurrió un error al registrar el asiento de perdidada cfambiaria"
|
||||||
|
Exit Select
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
'IMPUESTOS
|
||||||
|
|
||||||
|
Dim PorcentajePagoDevDin = (ImporteAplicar / ImporteAplicar).RoundSQL(6)
|
||||||
|
Dim CveConceptoContableAplciar = -1
|
||||||
|
'Dim TipoMovtoAplicar = False
|
||||||
|
|
||||||
|
|
||||||
|
Dim ObjCompras As New ClsCompras()
|
||||||
|
If ObjCompras.GetCompras(CveCompraDeCDin, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
|
Dim dr As DataRow = ObjCompras.DtResultados.Rows(0)
|
||||||
|
If dr IsNot Nothing Then
|
||||||
|
|
||||||
|
Dim CveMonedaDev As Integer = dr("CveMoneda").ToString.ToEntero
|
||||||
|
Dim TotalCompraDev As Decimal = dr("Total").ToString.ToDecimal
|
||||||
|
|
||||||
|
Dim IVADev As Decimal = dr("IVA").ToString.ToDecimal
|
||||||
|
Dim IEPSDev As Decimal = dr("IEPS").ToString.ToDecimal
|
||||||
|
PorcentajeCompraDevDinC = ObjCompras.DtResultados.Rows(0)("PorcentajeIVA").ToString.ToDecimal
|
||||||
|
|
||||||
|
Dim DTCuentas As DataTable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeCompraDevDinC)
|
||||||
|
Dim CveCuentaIVAxAcreditarDevDinC = 0
|
||||||
|
Dim CveCuentaIVAAcreditableDevDinC = 0
|
||||||
|
Dim IdCtaIVAXAcreditarDevDinC = DTCuentas.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
|
||||||
|
Dim IdCtaIVAAcreditableDevDinC = DTCuentas.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
|
||||||
|
|
||||||
|
|
||||||
|
Dim IVADevMN As Decimal = 0
|
||||||
|
Dim IEPSDevMN As Decimal = 0
|
||||||
|
|
||||||
|
|
||||||
|
Dim PorcentajeDevolucion As Decimal = ((ImporteAplicar * 100D / TotalCompraDev) / 100).RoundSQL(2)
|
||||||
|
|
||||||
|
IVADev = Math.Round(IVADev * PorcentajeDevolucion, 2)
|
||||||
|
IEPSDev = Math.Round(IEPSDev * PorcentajeDevolucion, 2)
|
||||||
|
|
||||||
|
Dim CveCuentaDevolucionIMPUESTOS As Integer = -1
|
||||||
|
Dim IdCtaIVADevolucionIMPUESTOS As Integer = -1
|
||||||
|
|
||||||
|
|
||||||
|
If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
|
||||||
|
IVADevMN = IVADev
|
||||||
|
IEPSDevMN = IEPSDev
|
||||||
|
Else
|
||||||
|
IVADevMN = (IVADev * If(CveMonedaDev = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL(2)
|
||||||
|
IEPSDevMN = (IEPSDev * If(CveMonedaDev = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL(2)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Dim ErrorDevolucionImpuestos As Boolean = False
|
||||||
|
|
||||||
|
If IVADev > 0 Then
|
||||||
|
|
||||||
|
CveCuentaDevolucionIMPUESTOS = CveCuentaIVAxAcreditarDevDinC
|
||||||
|
IdCtaIVADevolucionIMPUESTOS = IdCtaIVAXAcreditarDevDinC
|
||||||
|
|
||||||
|
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not True, -IVADev, ReferenciaAplicar, 14, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
||||||
|
|
||||||
|
CveCuentaDevolucionIMPUESTOS = CveCuentaIVAAcreditableDevDinC
|
||||||
|
IdCtaIVADevolucionIMPUESTOS = IdCtaIVAAcreditableDevDinC
|
||||||
|
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IVADev, ReferenciaAplicar, 19, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
||||||
|
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
|
||||||
|
ErrorDevolucionImpuestos = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
|
||||||
|
ErrorDevolucionImpuestos = True
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If IEPSDev > 0 Then
|
||||||
|
'Dim ObjContabilidad As New ClsContabilidad
|
||||||
|
If ObjMov.GetRetCuenta(25, UsuarioActual.CveEmpresa) Then
|
||||||
Try
|
Try
|
||||||
CveCuentaDevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditableSIG").ToString.ToEntero
|
CveCuentaDevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditarSIG").ToString.ToEntero
|
||||||
IdCtaIVADevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
|
IdCtaIVADevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
|
||||||
|
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoAplicar, -IEPSDev, ReferenciaAplicar, 26, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IEPSDevMN, ImporteME:=-IEPSDev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IEPSDev, ReferenciaAplicar, 25, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IEPSDevMN, ImporteME:=-IEPSDev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
||||||
|
|
||||||
|
If ObjMov.GetRetCuenta(26, UsuarioActual.CveEmpresa) Then
|
||||||
|
Try
|
||||||
|
CveCuentaDevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditableSIG").ToString.ToEntero
|
||||||
|
IdCtaIVADevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
|
||||||
|
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IEPSDev, ReferenciaAplicar, 26, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IEPSDevMN, ImporteME:=-IEPSDev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
||||||
|
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
|
||||||
|
ErrorDevolucionImpuestos = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
Alert("Se presento un error al obtener las cuentas de IEPS acreditable.")
|
||||||
|
ErrorDevolucionImpuestos = True
|
||||||
|
End Try
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
|
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
|
||||||
ErrorDevolucionImpuestos = True
|
ErrorDevolucionImpuestos = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Alert("Se presento un error al obtener las cuentas de IEPS acreditable.")
|
Alert("Se presento un error al obtener las cuentas de IEPS acreditable.")
|
||||||
ErrorDevolucionImpuestos = True
|
ErrorDevolucionImpuestos = True
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
|
||||||
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
|
|
||||||
ErrorDevolucionImpuestos = True
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
If ErrorDevolucionImpuestos Then
|
||||||
Alert("Se presento un error al obtener las cuentas de IEPS acreditable.")
|
MsgError = MsgError & " Error en devolución compra."
|
||||||
ErrorDevolucionImpuestos = True
|
End If
|
||||||
End Try
|
|
||||||
|
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
''
|
||||||
|
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Else
|
||||||
|
|
||||||
|
If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
|
||||||
|
|
||||||
|
TCCompra = GlobalTipoCambio(FechaCompra).ToDecimal
|
||||||
|
TCDocumento = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).ToDecimal
|
||||||
|
|
||||||
|
If TCCompra <= 0 Then
|
||||||
|
Alert("No se pudo obtener el tipo de cambio de la nota de crédito.", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ErrorDevolucionImpuestos Then
|
If TCDocumento <= 0 Then
|
||||||
MsgError = MsgError & " Error en devolución compra."
|
Alert("No se pudo obtener el tipo de cambio del documentpo.", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
'BANCOS COMPLEMENTARIA
|
||||||
|
If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
|
||||||
|
ImporteAplicarMN = ((ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TCDocumento)) - ImporteAplicar).RoundSQL()
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteAplicar, ReferenciaAplicar, 204, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicarME, CveCuenta:=CveCuentaConta, TipoCambio:=TCDocumento) Then
|
||||||
|
MsgError = "Ocurrió un error al registrara el asiento de bancos complementaria de devolución"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
'OTROS INGRESOS/EGRESOS
|
||||||
|
If TxtOtrosIngresosEgresos.Text.ToDecimal <> 0 Then
|
||||||
|
Dim Impo As Decimal = TxtOtrosIngresosEgresos.Text.ToDecimal
|
||||||
|
Dim TipoMovtoIE As Boolean = False
|
||||||
|
Dim CveConcIE As Integer = 78
|
||||||
|
If Impo > 0 Then
|
||||||
|
TipoMovtoIE = True
|
||||||
|
Impo = Math.Abs(Impo)
|
||||||
|
CveConcIE = 78
|
||||||
|
IdCtaContableAplicar = UsuarioActual.Empresa.IdCuentaOtrosIngresos
|
||||||
|
Else
|
||||||
|
TipoMovtoIE = False
|
||||||
|
Impo = Math.Abs(Impo)
|
||||||
|
CveConcIE = 211
|
||||||
|
IdCtaContableAplicar = UsuarioActual.Empresa.Funcionalidad(266).ToEntero
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoIE, Impo, ReferenciaAplicar, CveConcIE, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=Impo, ImporteME:=0, CveCuenta:=CveCuentaConta, TipoCambio:=TCDocumento) Then
|
||||||
|
MsgError = "Ocurrió un error al registrar el asiento de pago de devolución"
|
||||||
|
Exit Select
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
'CANCELA NC
|
||||||
|
IdCtaContableAplicar = IDCtaBeneficiario
|
||||||
|
ImporteAplicar = ImporteAplicar - TxtOtrosIngresosEgresos.Text.ToDecimal
|
||||||
|
ImporteAplicarMN = ImporteAplicar ' (ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL()
|
||||||
|
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -(ImporteAplicar), ReferenciaAplicar, 18, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=(ImporteAplicarMN), ImporteME:=ImporteAplicarME, TipoCambio:=TCCompra) Then
|
||||||
|
MsgError = "Ocurrió un error al registrar el asiento de pago de devolución"
|
||||||
|
Exit Select
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'NC COMPLEMENTARIA
|
||||||
|
If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
|
||||||
|
|
||||||
|
ImporteAplicarMN = ((ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TCCompra)) - ImporteAplicar).RoundSQL()
|
||||||
|
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -(ImporteAplicar), ReferenciaAplicar, 201, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-(ImporteAplicarMN), ImporteME:=-(ImporteAplicarME), CveCuenta:=CveCuentaConta, TipoCambio:=TCCompra) Then
|
||||||
|
MsgError = "Ocurrió un error al registrar el asiento de bancos complementaria de devolución"
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
If TCCompra <> TCDocumento Then
|
||||||
|
|
||||||
|
Dim DiferenciaTC As Decimal = TCCompra - TCDocumento
|
||||||
|
|
||||||
|
Dim DiferenciaImportes As Decimal = Math.Abs((ImporteAplicar * TCCompra) - (ImporteAplicar * TCDocumento))
|
||||||
|
|
||||||
|
If DiferenciaTC < 0 Then
|
||||||
|
'64
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaImportes, ReferenciaAplicar, 64, ConceptoAplicar, Now, UsuarioActual.Empresa.IdCuentaGananciaCambiaria, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=DiferenciaImportes, ImporteME:=0, CveCuenta:=CveCuentaConta, TipoCambio:=TCCompra) Then
|
||||||
|
MsgError = "Ocurrió un error al registrar el asiento de ganancia cambiaria"
|
||||||
|
Exit Select
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
'65
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, DiferenciaImportes, ReferenciaAplicar, 65, ConceptoAplicar, Now, UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=DiferenciaImportes, ImporteME:=0, CveCuenta:=CveCuentaConta, TipoCambio:=TCCompra) Then
|
||||||
|
MsgError = "Ocurrió un error al registrar el asiento de perdidada cfambiaria"
|
||||||
|
Exit Select
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'IMPUESTOS
|
||||||
|
|
||||||
|
Dim PorcentajePagoDevDin = (TxtImporte.Text.ToDecimal / ImporteOriginalDevDin).RoundSQL(6)
|
||||||
|
Dim CveConceptoContableAplciar = -1
|
||||||
|
'Dim TipoMovtoAplicar = False
|
||||||
|
|
||||||
|
|
||||||
|
Dim ObjCompras As New ClsCompras()
|
||||||
|
If ObjCompras.GetCompras(CveCompraDeCDin, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
|
Dim dr As DataRow = ObjCompras.DtResultados.Rows(0)
|
||||||
|
If dr IsNot Nothing Then
|
||||||
|
|
||||||
|
Dim CveMonedaDev As Integer = dr("CveMoneda").ToString.ToEntero
|
||||||
|
Dim TotalCompraDev As Decimal = dr("Total").ToString.ToDecimal
|
||||||
|
|
||||||
|
Dim IVADev As Decimal = dr("IVA").ToString.ToDecimal
|
||||||
|
Dim IEPSDev As Decimal = dr("IEPS").ToString.ToDecimal
|
||||||
|
PorcentajeCompraDevDinC = ObjCompras.DtResultados.Rows(0)("PorcentajeIVA").ToString.ToDecimal
|
||||||
|
|
||||||
|
Dim DTCuentas As DataTable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeCompraDevDinC)
|
||||||
|
Dim CveCuentaIVAxAcreditarDevDinC = 0
|
||||||
|
Dim CveCuentaIVAAcreditableDevDinC = 0
|
||||||
|
Dim IdCtaIVAXAcreditarDevDinC = DTCuentas.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
|
||||||
|
Dim IdCtaIVAAcreditableDevDinC = DTCuentas.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
|
||||||
|
|
||||||
|
|
||||||
|
Dim IVADevMN As Decimal = 0
|
||||||
|
Dim IEPSDevMN As Decimal = 0
|
||||||
|
|
||||||
|
|
||||||
|
Dim PorcentajeDevolucion As Decimal = ((TxtImporte.Text.ToDecimal * 100D / TotalCompraDev) / 100).RoundSQL(2)
|
||||||
|
|
||||||
|
IVADev = Math.Round(IVADev * PorcentajeDevolucion, 2)
|
||||||
|
IEPSDev = Math.Round(IEPSDev * PorcentajeDevolucion, 2)
|
||||||
|
|
||||||
|
Dim CveCuentaDevolucionIMPUESTOS As Integer = -1
|
||||||
|
Dim IdCtaIVADevolucionIMPUESTOS As Integer = -1
|
||||||
|
|
||||||
|
|
||||||
|
If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
|
||||||
|
IVADevMN = IVADev
|
||||||
|
IEPSDevMN = IEPSDev
|
||||||
|
Else
|
||||||
|
IVADevMN = (IVADev * If(CveMonedaDev = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL(2)
|
||||||
|
IEPSDevMN = (IEPSDev * If(CveMonedaDev = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL(2)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Dim ErrorDevolucionImpuestos As Boolean = False
|
||||||
|
|
||||||
|
If IVADev > 0 Then
|
||||||
|
|
||||||
|
CveCuentaDevolucionIMPUESTOS = CveCuentaIVAxAcreditarDevDinC
|
||||||
|
IdCtaIVADevolucionIMPUESTOS = IdCtaIVAXAcreditarDevDinC
|
||||||
|
|
||||||
|
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not True, -IVADev, ReferenciaAplicar, 14, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
||||||
|
|
||||||
|
CveCuentaDevolucionIMPUESTOS = CveCuentaIVAAcreditableDevDinC
|
||||||
|
IdCtaIVADevolucionIMPUESTOS = IdCtaIVAAcreditableDevDinC
|
||||||
|
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IVADev, ReferenciaAplicar, 19, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
||||||
|
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
|
||||||
|
ErrorDevolucionImpuestos = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
|
||||||
|
ErrorDevolucionImpuestos = True
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If IEPSDev > 0 Then
|
||||||
|
'Dim ObjContabilidad As New ClsContabilidad
|
||||||
|
If ObjMov.GetRetCuenta(25, UsuarioActual.CveEmpresa) Then
|
||||||
|
Try
|
||||||
|
CveCuentaDevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditarSIG").ToString.ToEntero
|
||||||
|
IdCtaIVADevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
|
||||||
|
|
||||||
|
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IEPSDev, ReferenciaAplicar, 25, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IEPSDevMN, ImporteME:=-IEPSDev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
||||||
|
|
||||||
|
If ObjMov.GetRetCuenta(26, UsuarioActual.CveEmpresa) Then
|
||||||
|
Try
|
||||||
|
CveCuentaDevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditableSIG").ToString.ToEntero
|
||||||
|
IdCtaIVADevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
|
||||||
|
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IEPSDev, ReferenciaAplicar, 26, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IEPSDevMN, ImporteME:=-IEPSDev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
||||||
|
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución "
|
||||||
|
ErrorDevolucionImpuestos = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
Alert("Se presento un error al obtener las cuentas de IEPS acreditable.")
|
||||||
|
ErrorDevolucionImpuestos = True
|
||||||
|
End Try
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
|
||||||
|
ErrorDevolucionImpuestos = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
Alert("Se presento un error al obtener las cuentas de IEPS acreditable.")
|
||||||
|
ErrorDevolucionImpuestos = True
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ErrorDevolucionImpuestos Then
|
||||||
|
MsgError = MsgError & " Error en devolución compra."
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
''''''''''''''''''''''''''''''''''''''''''''''
|
||||||
|
|
||||||
Case "EGSCREDITO"
|
Case "EGSCREDITO"
|
||||||
|
|
||||||
@@ -3276,7 +3679,7 @@ Partial Class Bancos_IE
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'Notificación de Pago
|
'Notificación de Pago
|
||||||
If TxtNotificarA.Text.Trim <> "" Then
|
If TxtNotificarA.Text.Trim <> "" And MsgError = "" Then
|
||||||
NotificacionPago(CveIE, TxtNotificarA.Text.Trim)
|
NotificacionPago(CveIE, TxtNotificarA.Text.Trim)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -5335,6 +5738,11 @@ Partial Class Bancos_IE
|
|||||||
TxtImporteLetra.Text = UrlParametros("SALDO").ToString.ToDouble.Texto2Letras(UrlParametros("CVEMONEDA").ToString.ToEntero)
|
TxtImporteLetra.Text = UrlParametros("SALDO").ToString.ToDouble.Texto2Letras(UrlParametros("CVEMONEDA").ToString.ToEntero)
|
||||||
|
|
||||||
CargaProveedor(CveProveedor, "-1")
|
CargaProveedor(CveProveedor, "-1")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'BuscarCliente()
|
'BuscarCliente()
|
||||||
|
|
||||||
DdlMoneda.SelectedValue = UrlParametros("CVEMONEDA").ToString
|
DdlMoneda.SelectedValue = UrlParametros("CVEMONEDA").ToString
|
||||||
|
|||||||
@@ -1227,7 +1227,6 @@ Partial Class Compras_Compras
|
|||||||
ClavesBorradas = New ArrayList()
|
ClavesBorradas = New ArrayList()
|
||||||
TxtFecha.Text = Now.ToShortDateString
|
TxtFecha.Text = Now.ToShortDateString
|
||||||
TxtFechaEjecucion.Text = Now.ToShortDateString
|
TxtFechaEjecucion.Text = Now.ToShortDateString
|
||||||
ViewState("CveCompra") = "0"
|
|
||||||
ViewState("CveFactura") = "0"
|
ViewState("CveFactura") = "0"
|
||||||
ViewState("IdPoliza") = "0"
|
ViewState("IdPoliza") = "0"
|
||||||
ViewState("CveCompra") = -1
|
ViewState("CveCompra") = -1
|
||||||
@@ -10761,7 +10760,7 @@ Partial Class Compras_Compras
|
|||||||
e.Row.FCLinkButton("ImgD").Visible = False
|
e.Row.FCLinkButton("ImgD").Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If e.Row.DBCampo("CvePS").ToEntero > 0 AndAlso e.Row.DBCampo("IEPSPSPorcentaje").ToDouble > 0 Then
|
If CveCompra <= 0 AndAlso e.Row.DBCampo("CvePS").ToEntero > 0 AndAlso e.Row.DBCampo("IEPSPSPorcentaje").ToDouble > 0 Then
|
||||||
If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=e.Row.DBCampo("CvePS").ToEntero).Rows.Count > 0 Then
|
If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=e.Row.DBCampo("CvePS").ToEntero).Rows.Count > 0 Then
|
||||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=e.Row.DBCampo("CvePS").ToEntero).Rows(0)
|
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=e.Row.DBCampo("CvePS").ToEntero).Rows(0)
|
||||||
If DrPS IsNot Nothing Then
|
If DrPS IsNot Nothing Then
|
||||||
@@ -10773,6 +10772,11 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If e.Row.DBCampo("CvePS").ToEntero > 0 AndAlso e.Row.DBCampo("NoDeducible") = "True" Then
|
||||||
|
e.Row.FCLabel("LblIVAPorcentaje").ToolTip = "IVA NO Deducible"
|
||||||
|
e.Row.FCLabel("LblIVAPorcentaje").ForeColor = Drawing.Color.Red
|
||||||
|
End If
|
||||||
|
|
||||||
'CargaPresupuestosEgresos
|
'CargaPresupuestosEgresos
|
||||||
If UsuarioActual.Empresa.UsaAC Then
|
If UsuarioActual.Empresa.UsaAC Then
|
||||||
e.Row.Cells(13).Visible = True
|
e.Row.Cells(13).Visible = True
|
||||||
@@ -19493,7 +19497,7 @@ Partial Class Compras_Compras
|
|||||||
Dim IdCtaContableRecepcionOCER = -1
|
Dim IdCtaContableRecepcionOCER = -1
|
||||||
Dim IdCtaContableRecepcionOCERME = -1
|
Dim IdCtaContableRecepcionOCERME = -1
|
||||||
Dim IdCtaContableRecepcionOCERComplementaria = -1
|
Dim IdCtaContableRecepcionOCERComplementaria = -1
|
||||||
Dim Fecha As Date = Now
|
Dim Fecha As Date = TxtFecha.Text.ToDate
|
||||||
Dim CveProveedorInvOC As Integer = -1
|
Dim CveProveedorInvOC As Integer = -1
|
||||||
Dim ProveedorNombre As String = ""
|
Dim ProveedorNombre As String = ""
|
||||||
Dim SerieFolio As String = ""
|
Dim SerieFolio As String = ""
|
||||||
@@ -19542,7 +19546,7 @@ Partial Class Compras_Compras
|
|||||||
PUCompra = DrDiferencias("PUCompra").ToString.ToDecimal
|
PUCompra = DrDiferencias("PUCompra").ToString.ToDecimal
|
||||||
PS = DrDiferencias("PS").ToString
|
PS = DrDiferencias("PS").ToString
|
||||||
|
|
||||||
Fecha = Now
|
Fecha = TxtFecha.Text.ToDate
|
||||||
SerieFolio = $"OC: {DrDiferencias("FolioOC").ToString}"
|
SerieFolio = $"OC: {DrDiferencias("FolioOC").ToString}"
|
||||||
CveProveedor = DrDiferencias("CveProveedor").ToString.ToEntero
|
CveProveedor = DrDiferencias("CveProveedor").ToString.ToEntero
|
||||||
ProveedorNombre = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("RazonSocial", $"CveProveedor = {CveProveedor}").ToString
|
ProveedorNombre = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("RazonSocial", $"CveProveedor = {CveProveedor}").ToString
|
||||||
|
|||||||
@@ -936,7 +936,9 @@ Partial Class PopUpVerFactura
|
|||||||
Vta.MonedaAbreviatura = dtVentas(0)("Abreviatura").ToString
|
Vta.MonedaAbreviatura = dtVentas(0)("Abreviatura").ToString
|
||||||
'se rellena la sucursal
|
'se rellena la sucursal
|
||||||
'Vta.Subproyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SucursalModel)
|
'Vta.Subproyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SucursalModel)
|
||||||
Vta.SubProyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SubProyectoModel)
|
Dim CveSubProyecto As Integer = dtVentas(0)("CveSubProyecto").ToString().ToEntero()
|
||||||
|
Vta.SubProyecto = GlobalDTSubProyectos(-1, CveSubProyecto).Rows(0).DataRowToObject(Of Modelos.SubProyectoModel)
|
||||||
|
'Vta.SubProyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SubProyectoModel)
|
||||||
Vta.Cliente = New Modelos.ClienteModel
|
Vta.Cliente = New Modelos.ClienteModel
|
||||||
Vta.Cliente.Nombre = dtVentas(0)("ClienteNombre").ToString
|
Vta.Cliente.Nombre = dtVentas(0)("ClienteNombre").ToString
|
||||||
Vta.Cliente.Telefono = dtVentas(0)("Telefono").ToString
|
Vta.Cliente.Telefono = dtVentas(0)("Telefono").ToString
|
||||||
|
|||||||
@@ -1669,6 +1669,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>--%>
|
</table>--%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="portlet light xspadding bordered ">
|
<div class="portlet light xspadding bordered ">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
@@ -1734,6 +1736,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
<div class="row">
|
||||||
|
<div class="pull-right">
|
||||||
|
<asp:HyperLink ID="HplAbonarMasivoNotas" Visible="False" runat="server" CssClass="Texto" NavigateUrl="#" ToolTip="Devolución múltiple">Devolución múltiple <img src="/Imagenes/Money_Add.png" alt="Pagar múltiples facturas" /></asp:HyperLink>  
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="portlet light xspadding bordered ">
|
<div class="portlet light xspadding bordered ">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
@@ -1816,6 +1824,7 @@
|
|||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="portlet light xspadding bordered ">
|
<div class="portlet light xspadding bordered ">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
|
|||||||
@@ -828,6 +828,8 @@ Partial Class Compras_Proveedores
|
|||||||
|
|
||||||
HplAbonarMasivo.NavigateUrl = String.Format("/Bancos/ProveedoresAbonar.aspx?CveProveedor={0}&Serie={1}&CveMoneda={2}", CveProveedor, Serie, CveMoneda)
|
HplAbonarMasivo.NavigateUrl = String.Format("/Bancos/ProveedoresAbonar.aspx?CveProveedor={0}&Serie={1}&CveMoneda={2}", CveProveedor, Serie, CveMoneda)
|
||||||
|
|
||||||
|
HplAbonarMasivoNotas.NavigateUrl = String.Format("/Bancos/IE.aspx?OPCION=DevDinC&CveProveedor={0}&Masivo={1}", CveProveedor, 1)
|
||||||
|
|
||||||
TxtCorreoCobranza.Text = ObjProveedor.CorreoCobranza
|
TxtCorreoCobranza.Text = ObjProveedor.CorreoCobranza
|
||||||
LblUsuarioPortalCliente.Text = ObjProveedor.CorreoCobranza
|
LblUsuarioPortalCliente.Text = ObjProveedor.CorreoCobranza
|
||||||
LblUsuarioPortalCliente.Attributes("style") = "font-weight: bold;"
|
LblUsuarioPortalCliente.Attributes("style") = "font-weight: bold;"
|
||||||
@@ -1112,6 +1114,14 @@ Partial Class Compras_Proveedores
|
|||||||
DtAntNCH = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Hist'")
|
DtAntNCH = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Hist'")
|
||||||
GvAH.DataSource = DtAntNCH
|
GvAH.DataSource = DtAntNCH
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
' e.Row.DBCampo("TipoDocto") = "NC"
|
||||||
|
If ObjMovtos.DtResultados.FiltraParametros("TipoDocto = 'NC'").Rows.Count > 0 And UsuarioActual.TienePermisoProceso(273) Then
|
||||||
|
HplAbonarMasivoNotas.Visible = True
|
||||||
|
UpAnticipos.Update()
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
GvA.DataSource = Nothing
|
GvA.DataSource = Nothing
|
||||||
GvAH.DataSource = Nothing
|
GvAH.DataSource = Nothing
|
||||||
|
|||||||
@@ -745,7 +745,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
|
|
||||||
Dim ImporteNOIVA As Decimal = gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago
|
Dim ImporteNOIVA As Decimal = gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago
|
||||||
|
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVANoAcreditable > 0, IdCtaContIVANoAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVA").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVANoAcreditable > 0, IdCtaContIVANoAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteNOIVA), ImporteMX:=(ImporteNOIVA) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
|
||||||
MsgError = "Detalle"
|
MsgError = "Detalle"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
153
GPS/RecursoConfiableTracking.aspx
Normal file
153
GPS/RecursoConfiableTracking.aspx
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RecursoConfiableTracking.aspx.vb" Inherits="GPS_RecursoConfiableTracking" %>
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
Recurso Confiable con Prestadores AVL
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
<asp:UpdatePanel runat="server" ID="UPPImportarSaldo" RenderMode="Inline" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkAgregarTracking" runat="server" OnClick="LnkAgregarTracking_Click" Text="<i class='fa fa-truck'></i> Agregar Tracking"></asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||||
|
<div class="portlet-title portlet-filterT smalltitle " style="">
|
||||||
|
<div class="tools">
|
||||||
|
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" OnClick="BtnConsultar_Click" class="btn btn-primary" />
|
||||||
|
</div>
|
||||||
|
<div class="titlefiltros caption" style="margin-top: -8px;">
|
||||||
|
<ul class="list-inline" style="font-size: 12px;">
|
||||||
|
<li>Vehículo:
|
||||||
|
<asp:DropDownList ID="DdlDispositivoFiltro" runat="server" Width="200px" DataTextField="Display" DataValueField="CveDispositivo" CssClass="form-control input-sm select2me">
|
||||||
|
</asp:DropDownList>
|
||||||
|
</li>
|
||||||
|
<li>Estatus:
|
||||||
|
<asp:DropDownList ID="DdlEstatus" runat="server" Width="200px" CssClass="form-control input-sm select2me">
|
||||||
|
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Activo" Value="1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Inactivo" Value="0"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</li>
|
||||||
|
<li>Fecha Inicio:
|
||||||
|
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
|
||||||
|
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>Fecha Fin:
|
||||||
|
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy" style="display: inline-block;">
|
||||||
|
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
|
||||||
|
<div style="margin-right: 15px">
|
||||||
|
<input type="text" id="TxtBusquedaG" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaG','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaG','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:GridView ID="GvDatos" runat="server" Style="overflow-x: auto;" GridLines="None" OnRowDeleting="GvDatos_RowDeleting" OnRowDataBound="GvDatos_RowDataBound"
|
||||||
|
DataKeyNames="CveRCTracking,CveEstatus" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" data-sortindex="1" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Trayectos">
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField DataField="Nombre" HeaderText="Nombre del Trayecto" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
|
||||||
|
<asp:BoundField DataField="NoEconomico" HeaderText="Vehículo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%" />
|
||||||
|
<asp:BoundField DataField="FechaIngreso" HeaderText="Fecha Ingreso" DataFormatString="{0:dd/MM/yyyy HH:mm:ss}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" />
|
||||||
|
<asp:BoundField DataField="UsuarioIngreso" HeaderText="Usuario Ingresó" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%" />
|
||||||
|
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="LblEstatus" Text='<%# Eval("Estatus") %>' runat="server"></asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:BoundField DataField="FechaCambioEstatus" HeaderText="Fecha Cambio Estatus" DataFormatString="{0:dd/MM/yyyy HH:mm:ss}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" />
|
||||||
|
<asp:BoundField DataField="UsuarioModifico" HeaderText="Usuario Modificó" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%" />
|
||||||
|
<asp:TemplateField HeaderText="Cambiar Estatus" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="LnkCambiarEstatus" runat="server" OnClick="LnkCambiarEstatus_Click" CssClass="Texto" Text="<i class='fa fa-pencil-square-o'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Desea cambiar el estatus?" data-btn-ok-label="si" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Comandos" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Desea eliminar el trayecto?" data-btn-ok-label="si" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="DivAgregar" class="modal ADS fade" role="dialog">
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpAgregar" UpdateMode="Conditional" class="modal-dialog">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<h4 class="modal-title" id="ModalAgregarTitle" runat="server">Agregar Tracking</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtNombre" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtNombre" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpShipment"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtNombre.ClientID.ToString()%>">Nombre:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:DropDownList ID="DdlDispositivo" DataTextField="Display" DataValueField="CveDispositivo" CssClass="form-control select2me" Style="width: 100%" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlDispositivo_SelectedIndexChanged"></asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" InitialValue="-1" CssClass="help-block errorimput" ControlToValidate="DdlDispositivo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Dispositivo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpShipment"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= DdlDispositivo.ClientID.ToString()%>">Vehículo:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtShipment" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVShipment" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtShipment" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Shipment''</b> es necesario, por favor ingréselo." ValidationGroup="GrpShipment"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtShipment.ClientID.ToString()%>">Shipment:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:LinkButton ID="BtnAgregar" runat="server" Text="Agregar" OnClick="BtnAgregar_Click" CssClass="btn btn-primary" Enabled="false" ValidationGroup="GrpShipment"></asp:LinkButton>
|
||||||
|
<button data-dismiss="modal" class="btn btn-default">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
|
||||||
119
GPS/RecursoConfiableTracking.aspx.vb
Normal file
119
GPS/RecursoConfiableTracking.aspx.vb
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
Option Strict On
|
||||||
|
Option Explicit On
|
||||||
|
|
||||||
|
Imports System.Data
|
||||||
|
Imports System.IO
|
||||||
|
Imports System.Net
|
||||||
|
Imports Extensiones
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
Imports Newtonsoft.Json.Linq
|
||||||
|
Imports System.Linq
|
||||||
|
Imports System.Net.Http
|
||||||
|
|
||||||
|
Partial Class GPS_RecursoConfiableTracking
|
||||||
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
|
If Not Page.IsPostBack Then
|
||||||
|
CargaDatos()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
Private Sub CargaDatos()
|
||||||
|
CargaDispositivos()
|
||||||
|
CargaTracking()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub CargaDispositivos()
|
||||||
|
|
||||||
|
DdlDispositivoFiltro.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario)
|
||||||
|
DdlDispositivoFiltro.DataBind()
|
||||||
|
DdlDispositivoFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
|
DdlDispositivo.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario).FiltraParametros("PlacasVehiculo IS NOT NULL AND PlacasVehiculo <> ''")
|
||||||
|
DdlDispositivo.DataBind()
|
||||||
|
DdlDispositivo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
|
UpAgregar.Update()
|
||||||
|
End Sub
|
||||||
|
Private Sub CargaTracking()
|
||||||
|
Dim FechaI As DateTime = If(IsDate(txtFechaI.Text), txtFechaI.Text.ToDateTime(), MinFecha)
|
||||||
|
Dim FechaF As DateTime = If(IsDate(txtFechaF.Text), txtFechaF.Text.ToDateTime(), MaxFecha)
|
||||||
|
|
||||||
|
Dim ObjGPS As New ClsGPS
|
||||||
|
If ObjGPS.GetRCTracking(-1, DdlDispositivoFiltro.SelectedValue.ToEntero(), DdlEstatus.SelectedValue.ToEntero(), UsuarioActual.CveCliente, UsuarioActual.CveEmpresa, FechaI, FechaF) Then
|
||||||
|
GvDatos.DataSource = ObjGPS.DtResultados
|
||||||
|
End If
|
||||||
|
ObjGPS.Dispose()
|
||||||
|
GvDatos.DataBind()
|
||||||
|
UpDatos.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LnkAgregarTracking_Click(sender As Object, e As EventArgs)
|
||||||
|
RegistraScript("$('#DivAgregar').modal('show');")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||||
|
CargaTracking()
|
||||||
|
End Sub
|
||||||
|
Protected Sub LnkCambiarEstatus_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
|
|
||||||
|
Dim CveRCTracking As Integer = GvRow.DataKey("CveRCTracking").ToEntero()
|
||||||
|
Dim Estatus As Boolean = CBool(GvRow.DataKey("CveEstatus").ToEntero())
|
||||||
|
|
||||||
|
Dim ObjGPS As New ClsGPS
|
||||||
|
If ObjGPS.UpdateRCTrackingEstatus(CveRCTracking, Not Estatus, UsuarioActual.CveUsuario) Then
|
||||||
|
Alert("El tracking fue desactivado correctamente")
|
||||||
|
Else
|
||||||
|
Alert("Ocurrió un error al actualizar el estatus", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
ObjGPS.Dispose()
|
||||||
|
|
||||||
|
CargaDatos()
|
||||||
|
End Sub
|
||||||
|
Protected Sub GvDatos_RowDeleting(sender As Object, e As GridViewDeleteEventArgs)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
Protected Sub BtnAgregar_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim Nombre As String = TxtNombre.Text.Trim()
|
||||||
|
Dim CveDispositivo As Integer = DdlDispositivo.SelectedValue.ToEntero()
|
||||||
|
Dim Shipment As String = TxtShipment.Text.Trim()
|
||||||
|
|
||||||
|
Dim ObjGPS As New ClsGPS
|
||||||
|
Dim CveRCTracking As Integer = ObjGPS.AddRCTracking(Nombre, CveDispositivo, Shipment, UsuarioActual.CveUsuario, UsuarioActual.CveCliente, UsuarioActual.CveEmpresa)
|
||||||
|
If CveRCTracking > 0 Then
|
||||||
|
Alert("El tracking fue agregado correctamente")
|
||||||
|
Else
|
||||||
|
Alert("Ocurrió un error el tracking", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
ObjGPS.Dispose()
|
||||||
|
|
||||||
|
CargaDatos()
|
||||||
|
RegistraScript("$('#DivAgregar').modal('hide');")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub DdlDispositivo_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
Dim CveDispositivo As Integer = DdlDispositivo.SelectedValue.ToEntero()
|
||||||
|
|
||||||
|
Dim RowDispositivo As DataRow = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario).FiltroPrimero($"CveDispositivo = {CveDispositivo}")
|
||||||
|
|
||||||
|
If RowDispositivo IsNot Nothing Then
|
||||||
|
If String.IsNullOrEmpty(RowDispositivo("PlacasVehiculo").ToString()) Then
|
||||||
|
Alert("El vehiculo no tiene placas asignadas", TipoMensaje.MsgAdvertencia)
|
||||||
|
BtnAgregar.Enabled = False
|
||||||
|
Else
|
||||||
|
BtnAgregar.Enabled = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
UpAgregar.Update()
|
||||||
|
End Sub
|
||||||
|
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
If e.Row.DBCampo("CveEstatus") = "1" Then
|
||||||
|
e.Row.FCLabel("LblEstatus").CssClass = "badge badge-success"
|
||||||
|
ElseIf e.Row.DBCampo("CveEstatus") = "0" Then
|
||||||
|
e.Row.FCLabel("LblEstatus").CssClass = "badge badge-secondary"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
@@ -758,9 +758,12 @@ public partial class General_PopUpPaqueteriasGuias : ClsPaginas
|
|||||||
|
|
||||||
StringBuilder strBody = new StringBuilder();
|
StringBuilder strBody = new StringBuilder();
|
||||||
strBody.Append("<html>");
|
strBody.Append("<html>");
|
||||||
|
strBody.Append("<head>");
|
||||||
|
strBody.Append("<meta charset='UTF-8'>");
|
||||||
|
strBody.Append("</head>");
|
||||||
strBody.Append(" <body>");
|
strBody.Append(" <body>");
|
||||||
strBody.Append("<div>");
|
strBody.Append("<div>");
|
||||||
strBody.Append($"<img src='{Request.Url.Scheme}://{Request.Url.Host}:{ Request.Url.Port}/Empresas/{UsuarioActual.CveEmpresa}/Logo.png' style='width:200px'></img>");
|
strBody.Append($"<img src='http://sig.adssistemas.mx/Empresas/{UsuarioActual.CveEmpresa}/Logo.png' style='width:200px'></img>");
|
||||||
strBody.Append("</div>");
|
strBody.Append("</div>");
|
||||||
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>");
|
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>");
|
||||||
strBody.Append($" Apreciable {ClienteNombre}, su pedido ya se encuentra en camino con el número de guía {Guia} y rastreo {Rastreo} de {Paqueteria}. Le confirmamos los productos que recibirá conforme a la {TipoDocto}:");
|
strBody.Append($" Apreciable {ClienteNombre}, su pedido ya se encuentra en camino con el número de guía {Guia} y rastreo {Rastreo} de {Paqueteria}. Le confirmamos los productos que recibirá conforme a la {TipoDocto}:");
|
||||||
|
|||||||
@@ -1102,9 +1102,12 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
|
|||||||
|
|
||||||
StringBuilder strBody = new StringBuilder();
|
StringBuilder strBody = new StringBuilder();
|
||||||
strBody.Append("<html>");
|
strBody.Append("<html>");
|
||||||
|
strBody.Append("<head>");
|
||||||
|
strBody.Append("<meta charset='UTF-8'>");
|
||||||
|
strBody.Append("</head>");
|
||||||
strBody.Append(" <body>");
|
strBody.Append(" <body>");
|
||||||
strBody.Append("<div>");
|
strBody.Append("<div>");
|
||||||
strBody.Append($"<img src='{Request.Url.Scheme}://{Request.Url.Host}:{ Request.Url.Port}/Empresas/{UsuarioActual.CveEmpresa}/Logo.png' style='width:200px'></img>");
|
strBody.Append($"<img src='http://sig.adssistemas.mx/Empresas/{UsuarioActual.CveEmpresa}/Logo.png' style='width:200px'></img>");
|
||||||
strBody.Append("</div>");
|
strBody.Append("</div>");
|
||||||
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>");
|
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>");
|
||||||
strBody.Append($" Apreciable {ClienteNombre}, su pedido correspondiente a la {tipoDocto}:");
|
strBody.Append($" Apreciable {ClienteNombre}, su pedido correspondiente a la {tipoDocto}:");
|
||||||
|
|||||||
@@ -2653,7 +2653,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
'Paqueterias guias
|
'Paqueterias guias
|
||||||
If RbEntregaInterna.Checked AndAlso Not ErrorMovInv Then
|
If RbEntregaInterna.Checked AndAlso Not ErrorMovInv Then
|
||||||
Dim CveEstatus As Integer = 1 ' DdlEstatus.SelectedValue.ToEntero()
|
Dim CveEstatus As Integer = 1 ' DdlEstatus.SelectedValue.ToEntero()
|
||||||
Dim Fecha As String = "-1" 'TxtFechaPaqInterna.Text
|
Dim Fecha As String = Now.ToString 'TxtFechaPaqInterna.Text
|
||||||
Dim FechaEstimada As String = "-1" 'If(TxtFechaEstimada.Text = "", "-1", TxtFechaEstimada.Text)
|
Dim FechaEstimada As String = "-1" 'If(TxtFechaEstimada.Text = "", "-1", TxtFechaEstimada.Text)
|
||||||
Dim NoCajas As Integer = 0 'TxtNoCajas.Text.ToEntero()
|
Dim NoCajas As Integer = 0 'TxtNoCajas.Text.ToEntero()
|
||||||
Dim Observaciones As String = "" 'TxtObservacionesPaqInterna.Text
|
Dim Observaciones As String = "" 'TxtObservacionesPaqInterna.Text
|
||||||
@@ -2665,10 +2665,8 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If CvePaqueteriaGuia > 0 Then
|
If CvePaqueteriaGuia > 0 Then
|
||||||
|
|
||||||
If CveVentaSurtir > 0 OrElse CveSubProyecto > 0 Then
|
If CveVentaSurtir > 0 OrElse CveSubProyecto > 0 Then
|
||||||
If ObjGeneral.AddPaqueteriasGuiasDetalles(CvePaqueteriaGuia, CveVentaSurtir, -1, CveMovimientoSalida, -1) Then
|
If Not ObjGeneral.AddPaqueteriasGuiasDetalles(CvePaqueteriaGuia, CveVentaSurtir, -1, CveMovimientoSalida, -1) Then
|
||||||
''manda correo
|
''manda correo
|
||||||
MandaCorreoEntrega(CveVentaSurtir)
|
|
||||||
Else
|
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -3125,7 +3123,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
'Paqueterias Guias
|
'Paqueterias Guias
|
||||||
If RbEntregaInterna.Checked AndAlso Not ErrorMovInv Then
|
If RbEntregaInterna.Checked AndAlso Not ErrorMovInv Then
|
||||||
Dim CveEstatus As Integer = 0 ' DdlEstatus.SelectedValue.ToEntero()
|
Dim CveEstatus As Integer = 0 ' DdlEstatus.SelectedValue.ToEntero()
|
||||||
Dim Fecha As String = "-1" 'TxtFechaPaqInterna.Text
|
Dim Fecha As String = Now.ToString 'TxtFechaPaqInterna.Text
|
||||||
Dim FechaEstimada As String = "-1" 'If(TxtFechaEstimada.Text = "", "-1", TxtFechaEstimada.Text)
|
Dim FechaEstimada As String = "-1" 'If(TxtFechaEstimada.Text = "", "-1", TxtFechaEstimada.Text)
|
||||||
Dim NoCajas As Integer = 0 'TxtNoCajas.Text.ToEntero()
|
Dim NoCajas As Integer = 0 'TxtNoCajas.Text.ToEntero()
|
||||||
Dim Observaciones As String = "" 'TxtObservacionesPaqInterna.Text
|
Dim Observaciones As String = "" 'TxtObservacionesPaqInterna.Text
|
||||||
@@ -3222,9 +3220,12 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
strBody.Append("<html>")
|
strBody.Append("<html>")
|
||||||
|
strBody.Append("<head>")
|
||||||
|
strBody.Append("<meta charset='UTF-8'>")
|
||||||
|
strBody.Append("</head>")
|
||||||
strBody.Append(" <body>")
|
strBody.Append(" <body>")
|
||||||
strBody.Append("<div>")
|
strBody.Append("<div>")
|
||||||
strBody.Append($"<img src='{Request.Url.Scheme}://{Request.Url.Host}:{ Request.Url.Port}/Empresas/{UsuarioActual.CveEmpresa}/Logo.png' style='width:200px'></img>")
|
strBody.Append($"<img src='http://sig.adssistemas.mx/Empresas/{UsuarioActual.CveEmpresa}/Logo.png' style='width:200px'></img>")
|
||||||
strBody.Append("</div>")
|
strBody.Append("</div>")
|
||||||
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>")
|
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>")
|
||||||
strBody.Append($" Apreciable {ClienteNombre}, le confirmamos los")
|
strBody.Append($" Apreciable {ClienteNombre}, le confirmamos los")
|
||||||
|
|||||||
@@ -148,9 +148,12 @@ public partial class Inventarios_EntregasPorRealizar : ClsPaginas
|
|||||||
StringBuilder strBody = new StringBuilder();
|
StringBuilder strBody = new StringBuilder();
|
||||||
|
|
||||||
strBody.Append("<html>");
|
strBody.Append("<html>");
|
||||||
|
strBody.Append("<head>");
|
||||||
|
strBody.Append("<meta charset='UTF-8'>");
|
||||||
|
strBody.Append("</head>");
|
||||||
strBody.Append(" <body>");
|
strBody.Append(" <body>");
|
||||||
strBody.Append("<div>");
|
strBody.Append("<div>");
|
||||||
strBody.Append($"<img src='{Request.Url.Scheme}://{Request.Url.Host}:{ Request.Url.Port}/Empresas/{UsuarioActual.CveEmpresa}/Logo.png' style='width:200px'></img>");
|
strBody.Append($"<img src='http://sig.adssistemas.mx/Empresas/{UsuarioActual.CveEmpresa}/Logo.png' style='width:200px'></img>");
|
||||||
strBody.Append("</div>");
|
strBody.Append("</div>");
|
||||||
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>");
|
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>");
|
||||||
strBody.Append($" Apreciable {ClienteNombre}, su pedido ya se encuentra en camino. Le confirmamos los productos que recibirá conforme a la ");
|
strBody.Append($" Apreciable {ClienteNombre}, su pedido ya se encuentra en camino. Le confirmamos los productos que recibirá conforme a la ");
|
||||||
|
|||||||
@@ -216,18 +216,38 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<asp:GridView ID="GvDatosArmado" DataKeyNames="Cantidad,CvePS,CveUM,Consec,Inv_CveMetodoInventario" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
<asp:GridView ID="GvDatosArmado" DataKeyNames="Cantidad,CvePS,CveUM,Consec,Inv_CveMetodoInventario,AplicaSeccion,AplicaSerie,AplicaCaducidad,AplicaLote" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="Cant. Necesaria" DataField="Cantidad" ItemStyle-Width="15%" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Cant. Necesaria" DataField="Cantidad" ItemStyle-Width="15%" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Cant. Disponible" DataField="CantidadDisponible2" ItemStyle-Width="15%" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Cant. Disponible" DataField="CantidadDisponible2" ItemStyle-Width="15%" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-Width="40%" />
|
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-Width="40%" />
|
||||||
<asp:BoundField HeaderText="Unidad Medida" DataField="UnidadMedida" ItemStyle-Width="20%" />
|
<asp:BoundField HeaderText="Unidad Medida" DataField="UnidadMedida" ItemStyle-Width="20%" />
|
||||||
<asp:TemplateField HeaderText="Serie">
|
<asp:TemplateField HeaderText="Serie Paquete">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-xs btn-primary" runat="server" Style="float: left;" />
|
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-xs btn-primary" runat="server" Style="float: left;" />
|
||||||
<asp:LinkButton Text="<i class='fa fa-star'></i>" ID="BtnSeriePaquete" OnClick="BtnSeriePaquete_Click" CssClass="btn btn-xs btn-primary" runat="server" Visible="false" Style="float: left;" data-toggle="tooltip" title="Seleccionar como serie del paquete" />
|
<asp:LinkButton Text="<i class='fa fa-star'></i>" ID="BtnSeriePaquete" OnClick="BtnSeriePaquete_Click" CssClass="btn btn-xs btn-primary" runat="server" Visible="false" Style="float: left;" data-toggle="tooltip" title="Seleccionar como serie del paquete" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Sección Almacén">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="Seccion" AppendDataBoundItems="true" DataValueField="CveSeccion" CssClass="select2me" runat="server"/>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Fecha Caducidad">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:TextBox ID="TxtCaducidad" CssClass="form-control input-sm" runat="server" Width="80px" Style="text-align: right;"></asp:TextBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Lote">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Width="80px" Style="text-align: right;"></asp:TextBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Serie">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:TextBox ID="TxtSerie" CssClass="form-control input-sm" runat="server" Width="80px" Style="text-align: right;"></asp:TextBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -240,14 +240,15 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
Dim AplicaSerie As String = ""
|
||||||
If ErrorExistencias Then
|
If ErrorExistencias Then
|
||||||
Alert(TextoExistencias, TipoMensaje.MsgAdvertencia)
|
Alert(TextoExistencias, TipoMensaje.MsgAdvertencia)
|
||||||
Else
|
Else
|
||||||
CveTipoPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPaqueteArmado.SelectedValue.ToEntero).FiltroPrimeroValor("Inv_CveMetodoInventario").ToEntero
|
AplicaSerie = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPaqueteArmado.SelectedValue.ToEntero).FiltroPrimeroValor("AplicaSerie")
|
||||||
BtnGuadarArmado.Visible = True
|
BtnGuadarArmado.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveTipoPS = 5 Then
|
If AplicaSerie = "True" Then
|
||||||
DivSeriesPaqueteArmado.Visible = True
|
DivSeriesPaqueteArmado.Visible = True
|
||||||
Dim Dt As New DataTable
|
Dim Dt As New DataTable
|
||||||
Dt.Columns.Add("Row", GetType(Integer))
|
Dt.Columns.Add("Row", GetType(Integer))
|
||||||
@@ -468,6 +469,9 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
|
|
||||||
For Each Gvr As GridViewRow In GvDatosArmado.Rows
|
For Each Gvr As GridViewRow In GvDatosArmado.Rows
|
||||||
If Gvr.DataKey("Cantidad").ToString.ToDouble > 0 Then
|
If Gvr.DataKey("Cantidad").ToString.ToDouble > 0 Then
|
||||||
|
Dim Lote As String = If(Gvr.FCTextBox("TxtLote").Text = "", "-1", Gvr.FCTextBox("TxtLote").Text)
|
||||||
|
Dim FechaCaducidad As String = If(Gvr.FCTextBox("TxtCaducidad").Text = "", "-1", Gvr.FCTextBox("TxtCaducidad").Text)
|
||||||
|
Dim CveSeccionAlmacen As Integer = Gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero()
|
||||||
If Gvr.DataKey("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then
|
If Gvr.DataKey("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then
|
||||||
For Each Dr As DataRow In DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec").ToEntero)).Rows
|
For Each Dr As DataRow In DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec").ToEntero)).Rows
|
||||||
If Not ObjInventario.GetExistenciasPS(Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenArmado.SelectedValue.ToEntero, FechaMovto:=Fecha.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Dr("Serie").ToString, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente)) >= 1 Then
|
If Not ObjInventario.GetExistenciasPS(Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenArmado.SelectedValue.ToEntero, FechaMovto:=Fecha.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Dr("Serie").ToString, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente)) >= 1 Then
|
||||||
@@ -476,7 +480,8 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1, Serie:=Dr("Serie").ToString) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1,
|
||||||
|
CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Dr("Serie").ToString, Lote:=Lote, FechaCaducidad:=FechaCaducidad.ToDate) Then
|
||||||
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida. Por favor vuelva a intentar."
|
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida. Por favor vuelva a intentar."
|
||||||
TieneError = True
|
TieneError = True
|
||||||
Exit For
|
Exit For
|
||||||
@@ -488,7 +493,9 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.DataKey("Cantidad").ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.DataKey("Cantidad").ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero,
|
||||||
|
Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1, CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote,
|
||||||
|
FechaCaducidad:=FechaCaducidad.ToDate) Then
|
||||||
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de salida. Por favor vuelva a intentar."
|
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de salida. Por favor vuelva a intentar."
|
||||||
TieneError = True
|
TieneError = True
|
||||||
Exit For
|
Exit For
|
||||||
@@ -661,44 +668,44 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
'If Tipo = 1 Then
|
'If Tipo = 1 Then
|
||||||
|
|
||||||
BtnGuadarArmado.Visible = False
|
BtnGuadarArmado.Visible = False
|
||||||
DivSeriesPaqueteArmado.Visible = False
|
DivSeriesPaqueteArmado.Visible = False
|
||||||
GvDatosArmado.Columns(4).Visible = False
|
GvDatosArmado.Columns(4).Visible = False
|
||||||
|
|
||||||
LbPaqueteArmado.Text = ""
|
LbPaqueteArmado.Text = ""
|
||||||
CvePaqueteArmado = -1
|
CvePaqueteArmado = -1
|
||||||
LbCantidadArmado.Text = ""
|
LbCantidadArmado.Text = ""
|
||||||
LbAlmacenArmado.Text = ""
|
LbAlmacenArmado.Text = ""
|
||||||
CveAlmacenArmado = -1
|
CveAlmacenArmado = -1
|
||||||
LbFechaArmado.Text = ""
|
LbFechaArmado.Text = ""
|
||||||
TxtObservacionesArmado.Text = ""
|
TxtObservacionesArmado.Text = ""
|
||||||
UpGeneralesArmado.Update()
|
UpGeneralesArmado.Update()
|
||||||
|
|
||||||
GvDatosArmado.DataBind()
|
GvDatosArmado.DataBind()
|
||||||
UpDatosArmado.Update()
|
UpDatosArmado.Update()
|
||||||
UpSeriesPaqueteArmado.Update()
|
UpSeriesPaqueteArmado.Update()
|
||||||
'Else
|
'Else
|
||||||
|
|
||||||
LbPaqueteDesarmado.Text = ""
|
LbPaqueteDesarmado.Text = ""
|
||||||
CvePaqueteDesarmado = -1
|
CvePaqueteDesarmado = -1
|
||||||
LbCantidadDesarmado.Text = ""
|
LbCantidadDesarmado.Text = ""
|
||||||
LbAlmacenDesarmado.Text = ""
|
LbAlmacenDesarmado.Text = ""
|
||||||
CveAlmacenDesarmado = -1
|
CveAlmacenDesarmado = -1
|
||||||
LbFechaDesarmado.Text = ""
|
LbFechaDesarmado.Text = ""
|
||||||
TxtObservacionesDesarmado.Text = ""
|
TxtObservacionesDesarmado.Text = ""
|
||||||
UpGeneralesDesarmado.Update()
|
UpGeneralesDesarmado.Update()
|
||||||
|
|
||||||
BtnGuadarDesarmado.Visible = False
|
BtnGuadarDesarmado.Visible = False
|
||||||
TotalDesarmado.Visible = False
|
TotalDesarmado.Visible = False
|
||||||
|
|
||||||
DtSeriesDesarmado.Clear()
|
DtSeriesDesarmado.Clear()
|
||||||
GvDatosDesarmado.Columns(4).Visible = False
|
GvDatosDesarmado.Columns(4).Visible = False
|
||||||
DivSeriesPaqueteDesarmado.Visible = False
|
DivSeriesPaqueteDesarmado.Visible = False
|
||||||
GvSeriesPaqueteDesarmado.DataBind()
|
GvSeriesPaqueteDesarmado.DataBind()
|
||||||
BtnAgregarSerieDesarmado.Enabled = True
|
BtnAgregarSerieDesarmado.Enabled = True
|
||||||
|
|
||||||
LbTotalCalculado.Text = "0.00"
|
LbTotalCalculado.Text = "0.00"
|
||||||
|
|
||||||
GvDatosDesarmado.DataBind()
|
GvDatosDesarmado.DataBind()
|
||||||
UpDatosDesarmado.Update()
|
UpDatosDesarmado.Update()
|
||||||
UpSeriesPaqueteDesarmado.Update()
|
UpSeriesPaqueteDesarmado.Update()
|
||||||
|
|
||||||
@@ -730,6 +737,19 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
e.Row.FCButton("BtnSerie").Visible = False
|
e.Row.FCButton("BtnSerie").Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If e.Row.DataKey("AplicaSeccion") = "False" Then
|
||||||
|
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
|
||||||
|
Else
|
||||||
|
e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
||||||
|
e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
|
||||||
|
e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
e.Row.FCTextBox("TxtCaducidad").Visible = e.Row.DataKey("AplicaCaducidad") = "True"
|
||||||
|
|
||||||
|
e.Row.FCTextBox("TxtLote").Visible = e.Row.DataKey("AplicaLote") = "True"
|
||||||
|
|
||||||
|
e.Row.FCTextBox("TxtSerie").Visible = e.Row.DataKey("AplicaSerie") = "True"
|
||||||
''FUNCIONALIDAD PISTOLA DE CODIGOS
|
''FUNCIONALIDAD PISTOLA DE CODIGOS
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
|
'If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
|
||||||
' e.Row.FCTextBox("TbCantidadF").Enabled = False
|
' e.Row.FCTextBox("TbCantidadF").Enabled = False
|
||||||
|
|||||||
@@ -2459,9 +2459,9 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Dim TotalPorDevengar = 0.0
|
Dim TotalPorDevengar = 0.0
|
||||||
TotalPorDevengar += GvInv.Rows.Cast(Of GridViewRow)().Sum(Function(Gvr) Math.Round(Gvr.DataKey("PU").ToString.ToDouble, 4) * Math.Round(Gvr.DataKey("CantidadF").ToString.ToDouble, 4))
|
TotalPorDevengar += GvInv.Rows.Cast(Of GridViewRow)().Sum(Function(Gvr) Math.Round(Gvr.DataKey("PU").ToString.ToDouble, 4) * Math.Round(Gvr.DataKey("CantidadF").ToString.ToDouble, 4))
|
||||||
TotalPorDevengar = Math.Round(TotalPorDevengar, 4)
|
TotalPorDevengar = Math.Round(TotalPorDevengar, 4)
|
||||||
If ObjContaContPAQ Is Nothing Then
|
If ObjContaAC Is Nothing Then
|
||||||
ObjContaContPAQ = New ClsContPAQi(UsuarioActual.Empresa)
|
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
ObjContaContPAQ.IniciaTransacSQL()
|
ObjContaAC.IniciaTransacSQL()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
IDPoliza = ObjContaAC.AddPoliza(4, "Devengado", TotalPorDevengar * 2, TotalPorDevengar * 2, UsuarioActual.CveUsuario, FechaMovto)
|
IDPoliza = ObjContaAC.AddPoliza(4, "Devengado", TotalPorDevengar * 2, TotalPorDevengar * 2, UsuarioActual.CveUsuario, FechaMovto)
|
||||||
|
|||||||
@@ -204,12 +204,12 @@ Partial Class Inventarios_RepEntregasForaneas
|
|||||||
DTEstatus = ObjInv.DtResultados
|
DTEstatus = ObjInv.DtResultados
|
||||||
DdlEstatusFiltro.DataSource = DTEstatus
|
DdlEstatusFiltro.DataSource = DTEstatus
|
||||||
End If
|
End If
|
||||||
|
ObjInv.Dispose()
|
||||||
|
|
||||||
DdlPaqueteria.DataSource = GlobalDTPaqueterias
|
DdlPaqueteria.DataSource = GlobalDTPaqueterias(UsuarioActual.CveEmpresa)
|
||||||
DdlPaqueteria.DataBind()
|
DdlPaqueteria.DataBind()
|
||||||
|
|
||||||
DdlEstatusFiltro.DataBind()
|
DdlEstatusFiltro.DataBind()
|
||||||
ObjInv.Dispose()
|
|
||||||
|
|
||||||
CargaSucursales()
|
CargaSucursales()
|
||||||
|
|
||||||
@@ -334,7 +334,7 @@ Partial Class Inventarios_RepEntregasForaneas
|
|||||||
e.Row.FCDropDownList("DdlEstatus").DataBind()
|
e.Row.FCDropDownList("DdlEstatus").DataBind()
|
||||||
e.Row.FCDropDownList("DdlEstatus").SelectedValueExist(e.Row.DBCampo("CveEntregaForaneaEstatus"))
|
e.Row.FCDropDownList("DdlEstatus").SelectedValueExist(e.Row.DBCampo("CveEntregaForaneaEstatus"))
|
||||||
|
|
||||||
e.Row.FCDropDownList("DdlPaqueteria").DataSource = GlobalDTPaqueterias
|
e.Row.FCDropDownList("DdlPaqueteria").DataSource = GlobalDTPaqueterias(UsuarioActual.CveEmpresa)
|
||||||
e.Row.FCDropDownList("DdlPaqueteria").DataBind()
|
e.Row.FCDropDownList("DdlPaqueteria").DataBind()
|
||||||
e.Row.FCDropDownList("DdlPaqueteria").SelectedValueExist(e.Row.DBCampo("CvePaqueteria"))
|
e.Row.FCDropDownList("DdlPaqueteria").SelectedValueExist(e.Row.DBCampo("CvePaqueteria"))
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ Partial Class Inventarios_TrasladoSolicitud
|
|||||||
TempDT.Columns.Add()
|
TempDT.Columns.Add()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaPaqueterias()
|
Private Sub CargaPaqueterias()
|
||||||
DdlPaqueteria.DataSource = GlobalDTPaqueterias()
|
DdlPaqueteria.DataSource = GlobalDTPaqueterias(UsuarioActual.CveEmpresa)
|
||||||
DdlPaqueteria.DataBind()
|
DdlPaqueteria.DataBind()
|
||||||
DdlPaqueteria.Items.Insert(0, New ListItem("-", "-1"))
|
DdlPaqueteria.Items.Insert(0, New ListItem("-", "-1"))
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -940,7 +940,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
If dr IsNot Nothing Then
|
If dr IsNot Nothing Then
|
||||||
IdCuentaCostos = dr("IdCuentaCostos").ToString.ToEntero
|
IdCuentaCostos = dr("IdCuentaCostos").ToString.ToEntero
|
||||||
End If
|
End If
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -importe, TxtObservaciones.Text, 69, TxtObservaciones.Text, Fecha, IdCuentaCostos, -1, CveClasificacion:=tCveClasificacion, CveSubProyecto:=CveSubProyectoOrigen, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable, ImporteMX:=-importe) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 69, TxtObservaciones.Text, Fecha, IdCuentaCostos, -1, CveClasificacion:=tCveClasificacion, CveSubProyecto:=CveSubProyectoOrigen, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable, ImporteMX:=importe) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
Contabilizable = False
|
Contabilizable = False
|
||||||
|
|||||||
@@ -126,12 +126,15 @@ Partial Class OC_PopUpBuscarReq
|
|||||||
ViewState("CveProveedor") = Request("P")
|
ViewState("CveProveedor") = Request("P")
|
||||||
UPFiltros.Visible = False
|
UPFiltros.Visible = False
|
||||||
|
|
||||||
Dim ObjPro As New ClsCompProveedores
|
Dim NombreProv As String = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, ViewState("CveProveedor").ToString.ToEntero).FiltroPrimeroValor("RazonSocial")
|
||||||
ObjPro.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, ViewState("CveProveedor").ToString.ToEntero, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa)
|
LbTitulo.Text = String.Format("Órdenes de Compra - {0}", NombreProv)
|
||||||
If ObjPro.DtResultados.Rows.Count > 0 Then
|
|
||||||
LbTitulo.Text = String.Format("Órdenes de Compra - {0}", ObjPro.DtResultados.Rows(0)("RazonSocial").ToString)
|
'Dim ObjPro As New ClsCompProveedores
|
||||||
End If
|
'ObjPro.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, ViewState("CveProveedor").ToString.ToEntero, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa)
|
||||||
ObjPro.Dispose()
|
'If ObjPro.DtResultados.Rows.Count > 0 Then
|
||||||
|
' LbTitulo.Text = String.Format("Órdenes de Compra - {0}", ObjPro.DtResultados.Rows(0)("RazonSocial").ToString)
|
||||||
|
'End If
|
||||||
|
'ObjPro.Dispose()
|
||||||
|
|
||||||
'Cargar Datos
|
'Cargar Datos
|
||||||
Dim ObjOC As New ClsOC
|
Dim ObjOC As New ClsOC
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ Partial Class Ventas_Garantias
|
|||||||
DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||||
DdlProveedores.DataBind()
|
DdlProveedores.DataBind()
|
||||||
|
|
||||||
DdlPaqueteria.DataSource = GlobalDTPaqueterias
|
DdlPaqueteria.DataSource = GlobalDTPaqueterias(UsuarioActual.CveEmpresa)
|
||||||
DdlPaqueteria.DataBind()
|
DdlPaqueteria.DataBind()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -326,12 +326,21 @@
|
|||||||
<asp:TextBox ID="TxtArchivoKey" runat="server" MaxLength="115" Width="200px"></asp:TextBox></td>
|
<asp:TextBox ID="TxtArchivoKey" runat="server" MaxLength="115" Width="200px"></asp:TextBox></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><a id="LnkArchivoKey" runat="server" class="Texto" href="javascript:AbrirVentana('/UploadFile.aspx', 350, 110, 'N', 'CargarArchivo');">Cargar Archivo Key</a></td>
|
<td colspan="2">
|
||||||
|
<asp:LinkButton ID="LnkArchivoKey" runat="server" class="Texto">Cargar Archivo Key</asp:LinkButton></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="TrDescargaArchivoKey" runat="server" visible="false">
|
<tr id="TrDescargaArchivoKey" runat="server" visible="false">
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<a id="LinkDescargaArchivoKey" target="_blank"></a>
|
<asp:UpdatePanel runat="server" ID="UpArchivoDescarga">
|
||||||
<asp:LinkButton ID="LbArchivoKeyDescarga" runat="server" CssClass="Texto">Descargar Archivo Key</asp:LinkButton>
|
<ContentTemplate>
|
||||||
|
<asp:LinkButton ID="LbArchivoKeyDescarga" runat="server" CssClass="Texto">Descargar Archivo Key</asp:LinkButton>
|
||||||
|
|
||||||
|
<%--<a id="LinkDescargaArchivoKey" target="_blank"></a>--%>
|
||||||
|
</ContentTemplate>
|
||||||
|
<Triggers>
|
||||||
|
<asp:PostBackTrigger ControlID="LbArchivoKeyDescarga" />
|
||||||
|
</Triggers>
|
||||||
|
</asp:UpdatePanel>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -340,7 +349,8 @@
|
|||||||
<asp:TextBox ID="TxtArchivoCer" runat="server" MaxLength="115" Width="200px"></asp:TextBox></td>
|
<asp:TextBox ID="TxtArchivoCer" runat="server" MaxLength="115" Width="200px"></asp:TextBox></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><a id="LnkArchivoCer" runat="server" class="Texto" href="javascript:AbrirVentana('/UploadFile.aspx', 350, 110, 'N', 'CargarArchivo');">Cargar Archivo CER</a></td>
|
<td colspan="2">
|
||||||
|
<asp:LinkButton ID="LnkArchivoCer" runat="server" class="Texto">Cargar Archivo CER</asp:LinkButton></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="TrDescargaArchivoCer" runat="server" visible="false">
|
<tr id="TrDescargaArchivoCer" runat="server" visible="false">
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
@@ -354,7 +364,8 @@
|
|||||||
<asp:TextBox ID="TxtArchivoPfx" runat="server" MaxLength="115" Width="200px"></asp:TextBox></td>
|
<asp:TextBox ID="TxtArchivoPfx" runat="server" MaxLength="115" Width="200px"></asp:TextBox></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><a id="LnkArchivoPfx" runat="server" class="Texto" href="javascript:AbrirVentana('/UploadFile.aspx', 350, 110, 'N', 'CargarArchivo');">Cargar Archivo PFX</a></td>
|
<td colspan="2">
|
||||||
|
<asp:LinkButton ID="LnkArchivoPfx" runat="server" class="Texto">Cargar Archivo PFX</asp:LinkButton></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="TrDescargaArchivoPfx" runat="server" visible="false">
|
<tr id="TrDescargaArchivoPfx" runat="server" visible="false">
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
@@ -372,7 +383,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<asp:TextBox ID="TxtCIEC" runat="server" MaxLength="50" Width="50px"></asp:TextBox></td>
|
<asp:TextBox ID="TxtCIEC" runat="server" MaxLength="50" Width="50px"></asp:TextBox></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="TrRegistrarPAC3" runat="server" >
|
<tr id="TrRegistrarPAC3" runat="server">
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<asp:LinkButton ID="LnkRegistrarPAC3" runat="server" CssClass="Texto" OnClick="LnkRegistrarPAC3_Click">Registrar en ProFact</asp:LinkButton>
|
<asp:LinkButton ID="LnkRegistrarPAC3" runat="server" CssClass="Texto" OnClick="LnkRegistrarPAC3_Click">Registrar en ProFact</asp:LinkButton>
|
||||||
</td>
|
</td>
|
||||||
@@ -497,6 +508,7 @@
|
|||||||
<%-- <asp:RegularExpressionValidator ID="REVRegistroPatronal" runat="server" ControlToValidate="TxtRegistoPatronal" Display="None" ErrorMessage="<b><span style='text-decoration: underline'></span></b><br />Favor de Introducir un <b>''Registro Patronal''</b> Valido." ValidationGroup="GrpGuardar"></asp:RegularExpressionValidator>
|
<%-- <asp:RegularExpressionValidator ID="REVRegistroPatronal" runat="server" ControlToValidate="TxtRegistoPatronal" Display="None" ErrorMessage="<b><span style='text-decoration: underline'></span></b><br />Favor de Introducir un <b>''Registro Patronal''</b> Valido." ValidationGroup="GrpGuardar"></asp:RegularExpressionValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCERegistroPatronal" runat="server" HighlightCssClass="vco" TargetControlID="REVRegistroPatronal" Width="300px"></ajax:ValidatorCalloutExtender> --%> </td>
|
<ajax:ValidatorCalloutExtender ID="VCERegistroPatronal" runat="server" HighlightCssClass="vco" TargetControlID="REVRegistroPatronal" Width="300px"></ajax:ValidatorCalloutExtender> --%> </td>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Área Geográfica:</td>
|
<td>Área Geográfica:</td>
|
||||||
@@ -505,6 +517,7 @@
|
|||||||
<%-- <asp:RegularExpressionValidator ID="REVAreaGeografica" runat="server" ControlToValidate="TxtAreaGeografica" Display="None" ErrorMessage="<b><span style='text-decoration: underline'></span></b><br />Favor de Introducir un <b>''Área Geográfica''</b> Valida." ValidationGroup="GrpGuardar"></asp:RegularExpressionValidator>
|
<%-- <asp:RegularExpressionValidator ID="REVAreaGeografica" runat="server" ControlToValidate="TxtAreaGeografica" Display="None" ErrorMessage="<b><span style='text-decoration: underline'></span></b><br />Favor de Introducir un <b>''Área Geográfica''</b> Valida." ValidationGroup="GrpGuardar"></asp:RegularExpressionValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEAreaGeografica" runat="server" HighlightCssClass="vco" TargetControlID="REVAreaGeografica" Width="300px"></ajax:ValidatorCalloutExtender> --%> </td>
|
<ajax:ValidatorCalloutExtender ID="VCEAreaGeografica" runat="server" HighlightCssClass="vco" TargetControlID="REVAreaGeografica" Width="300px"></ajax:ValidatorCalloutExtender> --%> </td>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@@ -1408,6 +1421,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<asp:CheckBox ID="ChkReqCentroCostos" runat="server" /></td>
|
<asp:CheckBox ID="ChkReqCentroCostos" runat="server" /></td>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Tipo Centro de Costos:</td>
|
<td>Tipo Centro de Costos:</td>
|
||||||
@@ -1758,6 +1772,43 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<br />
|
<br />
|
||||||
|
<div id="ModalArchvivo" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
|
||||||
|
<!-- Modal content-->
|
||||||
|
<div class="modal-content" style="width: 700px;">
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">Subir Imagen</h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-body" style="height: 200px;">
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpAddArchivo" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div>
|
||||||
|
<asp:TextBox ID="TxtCargaImg" CssClass="ADSdropzone hidden" Text="" runat="server"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<%--<div>
|
||||||
|
<asp:TextBox ID="Anexo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||||
|
</div> --%>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:UpdatePanel runat="server">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:Button ID="BtnGuardarArchivo" runat="server" OnClick="BtnGuardarArchivo_Click" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary" />
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="server">
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|||||||
@@ -132,16 +132,16 @@ Partial Class Sistemas_Empresa
|
|||||||
TrDescargaBanner.Visible = True
|
TrDescargaBanner.Visible = True
|
||||||
LnkBanner.InnerText = "Reemplazar Banner"
|
LnkBanner.InnerText = "Reemplazar Banner"
|
||||||
|
|
||||||
If LnkArchivoKey.InnerText = "" Then
|
'If LnkArchivoKey.InnerText = "" Then
|
||||||
LnkArchivoKey.InnerText = "Reemplazar Archivo Key"
|
' LnkArchivoKey.InnerText = "Reemplazar Archivo Key"
|
||||||
End If
|
'End If
|
||||||
If LnkArchivoCer.InnerText = "" Then
|
'If LnkArchivoCer.InnerText = "" Then
|
||||||
LnkArchivoCer.InnerText = "Reemplazar Archivo Cer"
|
' LnkArchivoCer.InnerText = "Reemplazar Archivo Cer"
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If LnkArchivoPfx.InnerText = "" Then
|
'If LnkArchivoPfx.InnerText = "" Then
|
||||||
LnkArchivoPfx.InnerText = "Reemplazar Archivo Pfx"
|
' LnkArchivoPfx.InnerText = "Reemplazar Archivo Pfx"
|
||||||
End If
|
'End If
|
||||||
BtnGuardar.Text = "Guardar Cambios"
|
BtnGuardar.Text = "Guardar Cambios"
|
||||||
|
|
||||||
'Plantilla Correo
|
'Plantilla Correo
|
||||||
@@ -398,7 +398,7 @@ Partial Class Sistemas_Empresa
|
|||||||
LbBannerDescarga.OnClientClick = "javascript:AbrirVentana('/Banners/" & .Banner & "', 500, 500, 'N', 'Banner Empresa');"
|
LbBannerDescarga.OnClientClick = "javascript:AbrirVentana('/Banners/" & .Banner & "', 500, 500, 'N', 'Banner Empresa');"
|
||||||
Session("FileUpload") = .Banner
|
Session("FileUpload") = .Banner
|
||||||
|
|
||||||
LbArchivoKeyDescarga.OnClientClick = "javascript:AbrirVentana('/Key/" & .ArchivoKey & "', 500, 500, 'N', 'ArchivoKey Empresa');"
|
'LbArchivoKeyDescarga.OnClientClick = "javascript:AbrirVentana('/Key/" & .ArchivoKey & "', 500, 500, 'N', 'ArchivoKey Empresa');"
|
||||||
Session("FileUpload") = .ArchivoKey
|
Session("FileUpload") = .ArchivoKey
|
||||||
|
|
||||||
LbBannerDescarga.OnClientClick = "javascript:AbrirVentana('/Cer/" & .ArchivoCer & "', 500, 500, 'N', 'ArchivoCer Empresa');"
|
LbBannerDescarga.OnClientClick = "javascript:AbrirVentana('/Cer/" & .ArchivoCer & "', 500, 500, 'N', 'ArchivoCer Empresa');"
|
||||||
@@ -1632,4 +1632,74 @@ Partial Class Sistemas_Empresa
|
|||||||
Dim result = conector.RegistraEmisor(RFCEmisor, certByte, llaveByte, contrasena)
|
Dim result = conector.RegistraEmisor(RFCEmisor, certByte, llaveByte, contrasena)
|
||||||
|
|
||||||
If result.Exitoso Then
|
If result.Exitoso Then
|
||||||
|
Alert("El emisor se registró correctamente.<br>" & result.Descripcion)
|
||||||
|
Else
|
||||||
|
Alert("Ocurrió un error al registrar el emisor.<br>" & result.Descripcion & ".<br> Numero Error: " & result.NumeroError, TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al registrar el emisor", ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LnkArchivoKey_Click(sender As Object, e As EventArgs) Handles LnkArchivoKey.Click
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal();", "ModalArchvivo"))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LnkArchivoCer_Click(sender As Object, e As EventArgs) Handles LnkArchivoCer.Click
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal();", "ModalArchvivo"))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LnkArchivoPfx_Click(sender As Object, e As EventArgs) Handles LnkArchivoPfx.Click
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal();", "ModalArchvivo"))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnGuardarArchivo_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim FileExtension As String = "-1"
|
||||||
|
Dim filesgral As List(Of Archivo) = TxtCargaImg.getfiles().Archivos
|
||||||
|
Dim filemove As String = ""
|
||||||
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
|
For Each fileItem As Archivo In filesgral
|
||||||
|
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||||
|
filemove = fileItem.filename
|
||||||
|
|
||||||
|
Dim Patron As String = "(^\d{1,}-)|(\.\w{1,}$)"
|
||||||
|
Dim NombreArchivo As String = Regex.Replace(filemove, Patron, "")
|
||||||
|
|
||||||
|
Dim yaExistente As String = String.Format("{0}Empresas\{1}\Certificados\{2}.{3}", ModExtensiones.DirectorioBaseEmpresas, CveEmpresa, NombreArchivo, FileExtension)
|
||||||
|
If File.Exists(yaExistente) Then
|
||||||
|
File.Delete(yaExistente)
|
||||||
|
End If
|
||||||
|
Try
|
||||||
|
If filemove <> "" Then
|
||||||
|
Dim Ruta As String = String.Format("Empresas\{0}\Certificados\", CveEmpresa)
|
||||||
|
filemove.FilesMove(NombreArchivo, Ruta)
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
TieneError = True
|
||||||
|
End Try
|
||||||
|
Next
|
||||||
|
If Not TieneError Then
|
||||||
|
Alert("Certificado cargado con exito")
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalArchvivo"))
|
||||||
|
End If
|
||||||
|
TxtCargaImg.getfiles().Archivos = Nothing
|
||||||
|
UpAddArchivo.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LbArchivoKeyDescarga_Download(sender As Object, e As EventArgs) Handles LbArchivoKeyDescarga.Click
|
||||||
|
Dim FilePath As String = String.Format("{0}Empresas\{1}\Certificados\{2}", ModExtensiones.DirectorioBaseEmpresas, CveEmpresa, TxtArchivoKey.Text)
|
||||||
|
'Dim fi As New FileInfo(File)
|
||||||
|
Dim byteArray As Byte() = File.ReadAllBytes(FilePath)
|
||||||
|
|
||||||
|
'HttpContext.Current.Response.Clear()
|
||||||
|
'HttpContext.Current.Response.ClearContent()
|
||||||
|
'HttpContext.Current.Response.ContentType = "application/octet-stream"
|
||||||
|
'HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment filename=prueba.docx")
|
||||||
|
'HttpContext.Current.Response.AddHeader("Content-Length", byteArray.Length.ToString())
|
||||||
|
'HttpContext.Current.Response.OutputStream.Write(byteArray, 0, byteArray.Length)
|
||||||
|
'HttpContext.Current.Response.End()
|
||||||
|
Response.Buffer = True
|
||||||
Response.Clear()
|
Response.Clear()
|
||||||
|
|||||||
@@ -81,6 +81,27 @@ public class TareasJam : IHttpHandler
|
|||||||
|
|
||||||
ObjGenerales.Dispose();
|
ObjGenerales.Dispose();
|
||||||
|
|
||||||
|
DTProductos.Columns[0].ColumnName = "Código Producto Interno ";
|
||||||
|
DTProductos.Columns[1].ColumnName = "Nombre del Producto";
|
||||||
|
DTProductos.Columns[2].ColumnName = "Presentación";
|
||||||
|
DTProductos.AcceptChanges();
|
||||||
|
|
||||||
|
|
||||||
|
DTClientes.Columns[4].ColumnName = "address.countryId";
|
||||||
|
DTClientes.Columns[5].ColumnName = "address.stateId";
|
||||||
|
DTClientes.Columns[6].ColumnName = "address.city";
|
||||||
|
DTClientes.Columns[7].ColumnName = "address.street1";
|
||||||
|
DTClientes.Columns[8].ColumnName = "address.street2";
|
||||||
|
DTClientes.Columns[9].ColumnName = "address.postalCode";
|
||||||
|
DTClientes.Columns[9].ColumnName = "phone.intCode";
|
||||||
|
DTClientes.Columns[9].ColumnName = "phone.areaCode";
|
||||||
|
DTClientes.Columns[9].ColumnName = "phone.number";
|
||||||
|
DTClientes.Dispose();
|
||||||
|
|
||||||
|
DTVentas.Columns.RemoveAt(7);
|
||||||
|
DTVentas.AcceptChanges();
|
||||||
|
|
||||||
|
|
||||||
if (!ErrorProceso)
|
if (!ErrorProceso)
|
||||||
{
|
{
|
||||||
string RutaProductos = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Productos{DateTime.Now.ToString("yyyyMMdd")}.xlsx";
|
string RutaProductos = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Productos{DateTime.Now.ToString("yyyyMMdd")}.xlsx";
|
||||||
@@ -125,13 +146,13 @@ public class TareasJam : IHttpHandler
|
|||||||
|
|
||||||
|
|
||||||
var workbookAlmacenes = new ExcelFile();
|
var workbookAlmacenes = new ExcelFile();
|
||||||
var worksheetAlmacenes = workbookClientes.Worksheets.Add("Almacenes");
|
var worksheetAlmacenes = workbookAlmacenes.Worksheets.Add("Almacenes");
|
||||||
worksheetAlmacenes.InsertDataTable(DTAlmacenes, new InsertDataTableOptions()
|
worksheetAlmacenes.InsertDataTable(DTAlmacenes, new InsertDataTableOptions()
|
||||||
{
|
{
|
||||||
ColumnHeaders = true,
|
ColumnHeaders = true,
|
||||||
StartRow = 0
|
StartRow = 0
|
||||||
});
|
});
|
||||||
workbookClientes.Save(RutaAlmacenes);
|
workbookAlmacenes.Save(RutaAlmacenes);
|
||||||
|
|
||||||
|
|
||||||
var FInfoProductos = new FileInfo(RutaProductos);
|
var FInfoProductos = new FileInfo(RutaProductos);
|
||||||
|
|||||||
@@ -423,18 +423,51 @@
|
|||||||
<label for="<%= TxtCiudad.ClientID.ToString()%>">Municipio/Delegación: </label>
|
<label for="<%= TxtCiudad.ClientID.ToString()%>">Municipio/Delegación: </label>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
|
<%--<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtEstado" runat="server" CssClass="form-control" MaxLength="25"></asp:TextBox>
|
<asp:TextBox ID="TxtEstado" runat="server" CssClass="form-control" MaxLength="25"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVEstado" runat="server" ControlToValidate="TxtEstado" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVEstado" runat="server" ControlToValidate="TxtEstado" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<label for="<%= TxtEstado.ClientID.ToString()%>">Estado:</label>
|
<label for="<%= TxtEstado.ClientID.ToString()%>">Estado:</label>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtPais" runat="server" CssClass="form-control" MaxLength="25"></asp:TextBox>
|
<asp:TextBox ID="TxtPais" runat="server" CssClass="form-control" MaxLength="25"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVPais" runat="server" ControlToValidate="TxtPais" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''País''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVPais" runat="server" ControlToValidate="TxtPais" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''País''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<label for="<%= TxtPais.ClientID.ToString()%>">País:</label>
|
<label for="<%= TxtPais.ClientID.ToString()%>">País:</label>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
--%>
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:DropDownList ID="DdlSATPais" runat="server" CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlSATPais_SelectedIndexChanged" AutoPostBack="true">
|
||||||
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
|
<asp:ListItem Value="MEX" Text="México"></asp:ListItem>
|
||||||
|
<asp:ListItem Value="USA" Text="USA"></asp:ListItem>
|
||||||
|
<asp:ListItem Value="CAN" Text="Canada"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
|
||||||
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator19" runat="server" InitialValue="-1" ControlToValidate="DdlSATPais" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pais''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= DdlSATPais.ClientID.ToString()%>">Pais:</label>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:DropDownList ID="DdlEstadoSAT" DataTextField="NombreEstado" DataValueField="CveSATEstado" runat="server" CssClass="form-control input-sm select2me">
|
||||||
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvDdlEstadoSAT" runat="server" InitialValue="-1" ControlToValidate="DdlEstadoSAT" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= DdlEstadoSAT.ClientID.ToString()%>">Estado:</label>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright" runat="server" visible="False" id="dvZH">
|
<div class="form-group form-md-line-input input-iconright" runat="server" visible="False" id="dvZH">
|
||||||
<asp:DropDownList ID="DdlZonaHoraria" DataTextField="DisplayText" DataValueField="CveZonaHoraria" runat="server" CssClass="form-control input-sm select2me">
|
<asp:DropDownList ID="DdlZonaHoraria" DataTextField="DisplayText" DataValueField="CveZonaHoraria" runat="server" CssClass="form-control input-sm select2me">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
|
|||||||
@@ -658,6 +658,7 @@ Partial Class Clientes
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
|
|
||||||
@@ -668,6 +669,7 @@ Partial Class Clientes
|
|||||||
CreaDtPago()
|
CreaDtPago()
|
||||||
RegistraScript("CargaHeader();")
|
RegistraScript("CargaHeader();")
|
||||||
|
|
||||||
|
CargaEstados()
|
||||||
|
|
||||||
If UsuarioActual.Empresa.CvePlataforma = 3 Then 'SI ES USUARIO GPS
|
If UsuarioActual.Empresa.CvePlataforma = 3 Then 'SI ES USUARIO GPS
|
||||||
TabFiscalContable.Visible = True
|
TabFiscalContable.Visible = True
|
||||||
@@ -808,7 +810,7 @@ Partial Class Clientes
|
|||||||
CreaDTSucursales()
|
CreaDTSucursales()
|
||||||
CargaDocumentacionCliente()
|
CargaDocumentacionCliente()
|
||||||
|
|
||||||
TxtPais.Text = "México"
|
'TxtPais.Text = "México"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.CvePlataforma = 3 Then
|
If UsuarioActual.Empresa.CvePlataforma = 3 Then
|
||||||
@@ -905,6 +907,11 @@ Partial Class Clientes
|
|||||||
|
|
||||||
|
|
||||||
#Region "C A R G A S"
|
#Region "C A R G A S"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Private Sub CreaDtPago()
|
Private Sub CreaDtPago()
|
||||||
DtPagos = New DataTable
|
DtPagos = New DataTable
|
||||||
DtPagos.Columns.Add("CveTipoMovimiento", GetType(String))
|
DtPagos.Columns.Add("CveTipoMovimiento", GetType(String))
|
||||||
@@ -924,6 +931,20 @@ Partial Class Clientes
|
|||||||
DdlClasificacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlClasificacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub CargaEstados(Optional ClaveSATPais As String = "MEX")
|
||||||
|
|
||||||
|
DdlEstadoSAT.Items.Clear()
|
||||||
|
DdlEstadoSAT.DataSource = GlobalDTEstado(ClaveSATPais)
|
||||||
|
|
||||||
|
DdlEstadoSAT.DataBind()
|
||||||
|
DdlEstadoSAT.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
UpDatos.Update()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaResponsables()
|
Private Sub CargaResponsables()
|
||||||
Dim Dt As DataTable = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("True", "Nombre")
|
Dim Dt As DataTable = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("True", "Nombre")
|
||||||
DdlResponsable.DataSource = Dt.FiltraParametros("", "", {"CveUsuario", "Nombre"})
|
DdlResponsable.DataSource = Dt.FiltraParametros("", "", {"CveUsuario", "Nombre"})
|
||||||
@@ -975,7 +996,12 @@ Partial Class Clientes
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ObjCliente.Dispose()
|
ObjCliente.Dispose()
|
||||||
|
|
||||||
DdlSucursalCliente.DataBind()
|
DdlSucursalCliente.DataBind()
|
||||||
DdlSucursalCliente.Items.Insert(0, New ListItem("Matriz", "0"))
|
DdlSucursalCliente.Items.Insert(0, New ListItem("Matriz", "0"))
|
||||||
DdlSucursalCliente.Items.Insert(0, New ListItem("Todas", "-1"))
|
DdlSucursalCliente.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||||
@@ -988,6 +1014,9 @@ Partial Class Clientes
|
|||||||
DdlClienteSucursalEnvio.DataBind()
|
DdlClienteSucursalEnvio.DataBind()
|
||||||
DdlClienteSucursalEnvio.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlClienteSucursalEnvio.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
DdlClienteSucursalEnvio.SelectedValue = "-1"
|
DdlClienteSucursalEnvio.SelectedValue = "-1"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaGridRetenciones()
|
Private Sub CargaGridRetenciones()
|
||||||
Dim ObjClientes As New ClsClientes
|
Dim ObjClientes As New ClsClientes
|
||||||
@@ -1164,6 +1193,8 @@ Partial Class Clientes
|
|||||||
|
|
||||||
CargaCombosComercioExterior()
|
CargaCombosComercioExterior()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaSubProyectoss()
|
Private Sub CargaSubProyectoss()
|
||||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1).FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1).FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
@@ -1387,8 +1418,8 @@ Partial Class Clientes
|
|||||||
TxtColonia.Text = ObjClientes.Colonia
|
TxtColonia.Text = ObjClientes.Colonia
|
||||||
TxtLocalidad.Text = ObjClientes.Localidad
|
TxtLocalidad.Text = ObjClientes.Localidad
|
||||||
TxtCiudad.Text = ObjClientes.Ciudad
|
TxtCiudad.Text = ObjClientes.Ciudad
|
||||||
TxtEstado.Text = ObjClientes.Estado
|
'TxtEstado.Text = ObjClientes.Estado
|
||||||
TxtPais.Text = ObjClientes.Pais
|
'TxtPais.Text = ObjClientes.Pais
|
||||||
TxtRFC.Text = ObjClientes.RFC
|
TxtRFC.Text = ObjClientes.RFC
|
||||||
TxtCP.Text = ObjClientes.CP.ToString
|
TxtCP.Text = ObjClientes.CP.ToString
|
||||||
TxtTelefono.Text = ObjClientes.Telefono
|
TxtTelefono.Text = ObjClientes.Telefono
|
||||||
@@ -1511,6 +1542,13 @@ Partial Class Clientes
|
|||||||
DdlPais.SelectedValueExist(ObjClientes.CvePais)
|
DdlPais.SelectedValueExist(ObjClientes.CvePais)
|
||||||
CargaEstado()
|
CargaEstado()
|
||||||
|
|
||||||
|
|
||||||
|
CargaEstados(ObjClientes.DtResultados(0)("SATPais").ToString)
|
||||||
|
|
||||||
|
DdlSATPais.SelectedValueExist(ObjClientes.DtResultados(0)("SATPais").ToString)
|
||||||
|
DdlEstadoSAT.SelectedValueExist(ObjClientes.CveSATEstado)
|
||||||
|
|
||||||
|
|
||||||
If DdlPais.SelectedValue.Contiene("151", "66", "40") Then
|
If DdlPais.SelectedValue.Contiene("151", "66", "40") Then
|
||||||
DdlEstado.Visible = True
|
DdlEstado.Visible = True
|
||||||
DdlEstado.SelectedValueExist(ObjClientes.CveEstado)
|
DdlEstado.SelectedValueExist(ObjClientes.CveEstado)
|
||||||
@@ -2427,7 +2465,7 @@ Partial Class Clientes
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
If ObjClientes.AddCliente(TxtNombre.Text.Trim, TxtNombreComercial.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtLocalidad.Text.Trim, TxtCiudad.Text.Trim, TxtEstado.Text.Trim, TxtPais.Text.Trim, TxtRFC.Text.Trim, TxtCP.Text.Trim, TxtTelefono.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""),
|
If ObjClientes.AddCliente(TxtNombre.Text.Trim, TxtNombreComercial.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtLocalidad.Text.Trim, TxtCiudad.Text.Trim, DdlEstadoSAT.SelectedItem.Text.Trim, DdlSATPais.SelectedItem.Text.Trim, TxtRFC.Text.Trim, TxtCP.Text.Trim, TxtTelefono.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""),
|
||||||
TxtContacto.Text.Trim, TxtEmail.Text.Trim, TxtEmailCotizacion.Text.Trim, TxtNotificar.Text.Trim, TxtPagina.Text.Trim, TxtGiro.Text.Trim, DdlPrecioLista.SelectedValue.ToEntero, ChkMail.Checked, TxtRetIVA.Text.ToDouble,
|
TxtContacto.Text.Trim, TxtEmail.Text.Trim, TxtEmailCotizacion.Text.Trim, TxtNotificar.Text.Trim, TxtPagina.Text.Trim, TxtGiro.Text.Trim, DdlPrecioLista.SelectedValue.ToEntero, ChkMail.Checked, TxtRetIVA.Text.ToDouble,
|
||||||
TxtRetISR.Text.ToDouble, ChkRetIVAFletesAcarreos.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtNombreCorto.Text.Trim, DdlVendedor.SelectedValue.ToEntero, TxtPlazoCobranza.Text.Trim.ToEntero, TxtPlazoCobranzaRemision.Text.Trim.ToEntero,
|
TxtRetISR.Text.ToDouble, ChkRetIVAFletesAcarreos.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtNombreCorto.Text.Trim, DdlVendedor.SelectedValue.ToEntero, TxtPlazoCobranza.Text.Trim.ToEntero, TxtPlazoCobranzaRemision.Text.Trim.ToEntero,
|
||||||
DiasPago, DdlTipoPago.SelectedValue, DdlCtaContableClientes.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableAnticipos.SelectedValue.ToEntero,
|
DiasPago, DdlTipoPago.SelectedValue, DdlCtaContableClientes.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableAnticipos.SelectedValue.ToEntero,
|
||||||
@@ -2443,7 +2481,7 @@ Partial Class Clientes
|
|||||||
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero, DesglosaIEPS:=ChkDesglosarIEPS.Checked, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero, CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero, CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero,
|
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero, DesglosaIEPS:=ChkDesglosarIEPS.Checked, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero, CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero, CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero,
|
||||||
CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero, CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero, NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(),
|
CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero, CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero, NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(),
|
||||||
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked,
|
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked,
|
||||||
TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text) Then
|
TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero) Then
|
||||||
|
|
||||||
ViewState("CveCliente") = ObjClientes.CveCliente
|
ViewState("CveCliente") = ObjClientes.CveCliente
|
||||||
|
|
||||||
@@ -2522,7 +2560,7 @@ Partial Class Clientes
|
|||||||
NombreCliente = TxtNombre.Text.Trim()
|
NombreCliente = TxtNombre.Text.Trim()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjClientes.UpdateCliente(NombreCliente, TxtNombreComercial.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtLocalidad.Text.Trim, TxtCiudad.Text.Trim, TxtEstado.Text.Trim, TxtPais.Text.Trim, TxtRFC.Text.Trim, TxtCP.Text.Trim,
|
If ObjClientes.UpdateCliente(NombreCliente, TxtNombreComercial.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtLocalidad.Text.Trim, TxtCiudad.Text.Trim, DdlEstadoSAT.SelectedItem.Text.Trim, DdlSATPais.SelectedItem.Text.Trim, TxtRFC.Text.Trim, TxtCP.Text.Trim,
|
||||||
TxtTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), TxtContacto.Text.Trim, TxtEmail.Text.Trim, TxtEmailCotizacion.Text.Trim, TxtNotificar.Text.Trim, TxtPagina.Text, TxtGiro.Text, DdlPrecioLista.SelectedValue.ToEntero, ChkMail.Checked, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, ChkRetIVAFletesAcarreos.Checked,
|
TxtTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), TxtContacto.Text.Trim, TxtEmail.Text.Trim, TxtEmailCotizacion.Text.Trim, TxtNotificar.Text.Trim, TxtPagina.Text, TxtGiro.Text, DdlPrecioLista.SelectedValue.ToEntero, ChkMail.Checked, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, ChkRetIVAFletesAcarreos.Checked,
|
||||||
ChkEstado.Checked, TxtNombreCorto.Text.Trim, DdlVendedor.SelectedValue.ToEntero, TxtPlazoCobranza.Text.Trim.ToEntero, TxtPlazoCobranzaRemision.Text.Trim.ToEntero, DiasPago, DdlTipoPago.SelectedValue,
|
ChkEstado.Checked, TxtNombreCorto.Text.Trim, DdlVendedor.SelectedValue.ToEntero, TxtPlazoCobranza.Text.Trim.ToEntero, TxtPlazoCobranzaRemision.Text.Trim.ToEntero, DiasPago, DdlTipoPago.SelectedValue,
|
||||||
DdlCtaContableClientes.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableAnticipos.SelectedValue.ToEntero, DdlCtaContableAnticipos.SelectedItem.Text, DdlCtaContableRetIVA.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableRetISR.SelectedValue.ToEntero,
|
DdlCtaContableClientes.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableAnticipos.SelectedValue.ToEntero, DdlCtaContableAnticipos.SelectedItem.Text, DdlCtaContableRetIVA.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableRetISR.SelectedValue.ToEntero,
|
||||||
@@ -2538,7 +2576,7 @@ Partial Class Clientes
|
|||||||
CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero, NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(),
|
CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero, NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(),
|
||||||
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(),
|
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(),
|
||||||
ApellidoPaternoPF:=IIf(TxtApellidoPaterno.Text = "", "-1", TxtApellidoPaterno.Text).ToString(), ApellidoMaternoPF:=IIf(TxtApellidoMaterno.Text = "", "-1", TxtApellidoMaterno.Text).ToString(), NombresPF:=IIf(TxtNombres.Text = "", "-1", TxtNombres.Text).ToString(),
|
ApellidoPaternoPF:=IIf(TxtApellidoPaterno.Text = "", "-1", TxtApellidoPaterno.Text).ToString(), ApellidoMaternoPF:=IIf(TxtApellidoMaterno.Text = "", "-1", TxtApellidoMaterno.Text).ToString(), NombresPF:=IIf(TxtNombres.Text = "", "-1", TxtNombres.Text).ToString(),
|
||||||
RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text) Then
|
RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero) Then
|
||||||
|
|
||||||
|
|
||||||
ObjClientes.LimpiaImpuestosLocales(CveCliente)
|
ObjClientes.LimpiaImpuestosLocales(CveCliente)
|
||||||
@@ -10092,5 +10130,8 @@ Partial Class Clientes
|
|||||||
Protected Sub btnupEventoBitacora_Click(sender As Object, e As EventArgs)
|
Protected Sub btnupEventoBitacora_Click(sender As Object, e As EventArgs)
|
||||||
CargaEventoBitacora()
|
CargaEventoBitacora()
|
||||||
End Sub
|
End Sub
|
||||||
|
Protected Sub DdlSATPais_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
CargaEstados(DdlSATPais.SelectedValue)
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
@@ -2581,9 +2581,9 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
Dim CveCuenta As Integer = 0
|
Dim CveCuenta As Integer = 0
|
||||||
Dim PorcentajePago As Decimal = gr.DataKey("Saldo").ToDecimal / gr.DataKey("Original").ToDecimal
|
Dim PorcentajePago As Decimal = gr.DataKey("Saldo").ToDecimal / gr.DataKey("Original").ToDecimal
|
||||||
Dim Saldo As Decimal = gr.DataKey("Saldo").ToDecimal
|
Dim Saldo As Decimal = gr.DataKey("Saldo").ToDecimal
|
||||||
Dim SubTotal As Decimal = PorcentajePago * gr.DataKey("SubTotal").ToDecimal
|
Dim SubTotal As Decimal = PorcentajePago * gr.DataKey("SubTotal").ToDecimal.RoundSQL
|
||||||
Dim IVA As Decimal = PorcentajePago * gr.DataKey("IVA").ToDecimal
|
Dim IVA As Decimal = PorcentajePago * gr.DataKey("IVA").ToDecimal.RoundSQL
|
||||||
Dim IEPS As Decimal = PorcentajePago * gr.DataKey("IEPS").ToDecimal
|
Dim IEPS As Decimal = PorcentajePago * gr.DataKey("IEPS").ToDecimal.RoundSQL
|
||||||
Dim TCVenta As Decimal = gr.DataKey("TipoCambio").ToDecimal
|
Dim TCVenta As Decimal = gr.DataKey("TipoCambio").ToDecimal
|
||||||
Dim FechaVenta As Date = gr.DataKey("Fecha").ToDate
|
Dim FechaVenta As Date = gr.DataKey("Fecha").ToDate
|
||||||
Dim tCveMoneda As Integer = gr.DataKey("CveMoneda").ToEntero
|
Dim tCveMoneda As Integer = gr.DataKey("CveMoneda").ToEntero
|
||||||
|
|||||||
@@ -2374,16 +2374,25 @@
|
|||||||
<label for="<%= TxtLocalidadCliente.ClientID.ToString()%>">Localidad:</label>
|
<label for="<%= TxtLocalidadCliente.ClientID.ToString()%>">Localidad:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="DivEstadoPaisCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
|
<div id="DivEstadoPaisCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
||||||
<asp:TextBox ID="TxtEstadoCliente" CssClass="form-control " runat="server" MaxLength="35" CausesValidation="true"></asp:TextBox>
|
<asp:DropDownList ID="DdlSATPais" runat="server" CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlSATPais_SelectedIndexChanged" AutoPostBack="true">
|
||||||
<asp:RequiredFieldValidator ID="RFVEstadoC" runat="server" ControlToValidate="TxtEstadoCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
<asp:ListItem Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
<label for="<%= TxtEstadoCliente.ClientID.ToString()%>">Estado:</label>
|
<asp:ListItem Value="MEX" Text="México" Selected="True"></asp:ListItem>
|
||||||
|
<asp:ListItem Value="USA" Text="USA"></asp:ListItem>
|
||||||
|
<asp:ListItem Value="CAN" Text="Canada"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
|
||||||
|
<asp:RequiredFieldValidator ID="RFVSATPais" runat="server" InitialValue="-1" ControlToValidate="DdlSATPais" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pais''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= DdlSATPais.ClientID.ToString()%>">Pais:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
||||||
<asp:TextBox ID="TxtPaisCliente" CssClass="form-control " Text="Mexico" runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
<asp:DropDownList ID="DdlEstadoSAT" DataTextField="NombreEstado" DataValueField="CveSATEstado" runat="server" CssClass="form-control input-sm select2me">
|
||||||
<asp:RequiredFieldValidator ID="RFVPaisC" runat="server" ControlToValidate="TxtPaisCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''País''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
<label for="<%= TxtPaisCliente.ClientID.ToString()%>">País:</label>
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvDdlEstadoSAT" runat="server" InitialValue="-1" ControlToValidate="DdlEstadoSAT" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= DdlEstadoSAT.ClientID.ToString()%>">Estado:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="DivCorreoCuentaCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
|
<div id="DivCorreoCuentaCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
|
||||||
@@ -3665,8 +3674,8 @@
|
|||||||
$('#<%= TxtTelefonoCliente.ClientID %>').val('');
|
$('#<%= TxtTelefonoCliente.ClientID %>').val('');
|
||||||
$('#<%= TxtCiudadCliente.ClientID %>').val('');
|
$('#<%= TxtCiudadCliente.ClientID %>').val('');
|
||||||
$('#<%= TxtLocalidadCliente.ClientID %>').val('');
|
$('#<%= TxtLocalidadCliente.ClientID %>').val('');
|
||||||
$('#<%= TxtEstadoCliente.ClientID %>').val('');
|
$('#<%= DdlEstadoSAT.ClientID %>').val('');
|
||||||
$('#<%= TxtPaisCliente.ClientID %>').val('');
|
$('#<%= DdlSATPais.ClientID %>').val('');
|
||||||
$('#<%= TxtCorreoCliente.ClientID %>').val('');
|
$('#<%= TxtCorreoCliente.ClientID %>').val('');
|
||||||
|
|
||||||
$('#divAgregarCliente').modal();
|
$('#divAgregarCliente').modal();
|
||||||
|
|||||||
@@ -2298,6 +2298,19 @@ Partial Class PV
|
|||||||
If UsuarioActual.TienePermisoProceso(152) Then DdlSubProyectoDatos.Enabled = False
|
If UsuarioActual.TienePermisoProceso(152) Then DdlSubProyectoDatos.Enabled = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaEstados(Optional ClaveSATPais As String = "MEX")
|
||||||
|
|
||||||
|
DdlEstadoSAT.Items.Clear()
|
||||||
|
DdlEstadoSAT.DataSource = GlobalDTEstado(ClaveSATPais)
|
||||||
|
|
||||||
|
DdlEstadoSAT.DataBind()
|
||||||
|
DdlEstadoSAT.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
Protected Sub DdlSATPais_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
CargaEstados(DdlSATPais.SelectedValue)
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaEmpresa()
|
Private Sub CargaEmpresa()
|
||||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||||
Dim ObjFisConfiguracion As New ClsFISConfiguracion
|
Dim ObjFisConfiguracion As New ClsFISConfiguracion
|
||||||
@@ -5505,6 +5518,7 @@ Partial Class PV
|
|||||||
DivFormaCliente.Visible = False
|
DivFormaCliente.Visible = False
|
||||||
TxtRFCCliente.Text = "XAXX010101000"
|
TxtRFCCliente.Text = "XAXX010101000"
|
||||||
UpAgregarCliente.Update()
|
UpAgregarCliente.Update()
|
||||||
|
CargaEstados()
|
||||||
|
|
||||||
RegistraScript("showDivEC();")
|
RegistraScript("showDivEC();")
|
||||||
End Sub
|
End Sub
|
||||||
@@ -5527,8 +5541,6 @@ Partial Class PV
|
|||||||
RFVColoniaC.Visible = False
|
RFVColoniaC.Visible = False
|
||||||
RFVCiudadC.Visible = False
|
RFVCiudadC.Visible = False
|
||||||
RFVLocalidadC.Visible = False
|
RFVLocalidadC.Visible = False
|
||||||
RFVEstadoC.Visible = False
|
|
||||||
RFVPaisC.Visible = False
|
|
||||||
TxtNombreCliente.Focus()
|
TxtNombreCliente.Focus()
|
||||||
|
|
||||||
DdlMetodoCliente.SelectedValueExist(1)
|
DdlMetodoCliente.SelectedValueExist(1)
|
||||||
@@ -5538,7 +5550,7 @@ Partial Class PV
|
|||||||
|
|
||||||
If dr IsNot Nothing Then
|
If dr IsNot Nothing Then
|
||||||
TxtCPCliente.Text = dr("CP").ToString
|
TxtCPCliente.Text = dr("CP").ToString
|
||||||
TxtEstadoCliente.Text = dr("Estado").ToString
|
'TxtEstadoCliente.Text = dr("Estado").ToString RMf FAlta
|
||||||
TxtCiudadCliente.Text = dr("Municipio").ToString
|
TxtCiudadCliente.Text = dr("Municipio").ToString
|
||||||
TxtLocalidadCliente.Text = dr("Localidad").ToString
|
TxtLocalidadCliente.Text = dr("Localidad").ToString
|
||||||
End If
|
End If
|
||||||
@@ -5570,8 +5582,6 @@ Partial Class PV
|
|||||||
RFVColoniaC.Visible = True
|
RFVColoniaC.Visible = True
|
||||||
RFVCiudadC.Visible = True
|
RFVCiudadC.Visible = True
|
||||||
RFVLocalidadC.Visible = True
|
RFVLocalidadC.Visible = True
|
||||||
RFVEstadoC.Visible = True
|
|
||||||
RFVPaisC.Visible = True
|
|
||||||
|
|
||||||
DdlMetodoCliente.SelectedValueExist(-1)
|
DdlMetodoCliente.SelectedValueExist(-1)
|
||||||
DdlFormaCliente.SelectedValueExist(-1)
|
DdlFormaCliente.SelectedValueExist(-1)
|
||||||
@@ -5580,12 +5590,12 @@ Partial Class PV
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub BtnAgregarCliente_Click(sender As Object, e As EventArgs) Handles BtnAgregarCliente.Click
|
Private Sub BtnAgregarCliente_Click(sender As Object, e As EventArgs) Handles BtnAgregarCliente.Click
|
||||||
Dim CvePreioLista As Integer = -1
|
Dim CvePrecioLista As Integer = -1
|
||||||
If DdlSubProyectoDatos.SelectedValue.ToEntero > 0 Then
|
If DdlSubProyectoDatos.SelectedValue.ToEntero > 0 Then
|
||||||
Dim Dr As DataRow = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa).Rows(0)
|
Dim Dr As DataRow = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa).Rows(0)
|
||||||
If Dr IsNot Nothing Then
|
If Dr IsNot Nothing Then
|
||||||
If Dr("CvePrecioLista").ToString.ToEntero > 0 Then
|
If Dr("CvePrecioLista").ToString.ToEntero > 0 Then
|
||||||
CvePreioLista = Dr("CvePrecioLista").ToString.ToEntero
|
CvePrecioLista = Dr("CvePrecioLista").ToString.ToEntero
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -5593,7 +5603,7 @@ Partial Class PV
|
|||||||
Dim ObjCliente As New ClsClientes
|
Dim ObjCliente As New ClsClientes
|
||||||
|
|
||||||
If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim, TxtColoniaCliente.Text.Trim,
|
If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim, TxtColoniaCliente.Text.Trim,
|
||||||
TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, TxtEstadoCliente.Text.Trim, TxtPaisCliente.Text.Trim, TxtRFCCliente.Text.Trim,
|
TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, DdlEstadoSAT.SelectedValue.ToEntero, TxtRFCCliente.Text.Trim,
|
||||||
TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.Text.Trim, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.CveUsuario,
|
TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.Text.Trim, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.CveUsuario,
|
||||||
UsuarioActual.CveEmpresa, "", DdlMetodoCliente.SelectedValue.ToEntero, DdlFormaCliente.SelectedValue.ToEntero) Then
|
UsuarioActual.CveEmpresa, "", DdlMetodoCliente.SelectedValue.ToEntero, DdlFormaCliente.SelectedValue.ToEntero) Then
|
||||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||||
|
|||||||
202
Ventas/RepAuxiliarFacturas.aspx
Normal file
202
Ventas/RepAuxiliarFacturas.aspx
Normal file
@@ -0,0 +1,202 @@
|
|||||||
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAuxiliarFacturas.aspx.vb" Inherits="Ventas_RepAuxiliarFacturas" %>
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
Reporte auxiliar de facturas de venta.
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkPdf" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="ImgExcel" runat="server"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
|
||||||
|
</li>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
||||||
|
<div class="portlet-title portlet-filterT smalltitle">
|
||||||
|
<div class="tools">
|
||||||
|
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||||
|
<a href="javascript:;" class="expand"></a>
|
||||||
|
</div>
|
||||||
|
<div class="titlefiltros caption">
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-1 truncate">Productos Servicios:</label>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<ADS:Dropdownlost runat="server" ID="DdlPS" Style="width: 95%;" CssClass="DdlPS" CssClassDdl="select2me " DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1 truncate">
|
||||||
|
Fecha Inicio:
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||||
|
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1 truncate">
|
||||||
|
Fecha Fin:
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||||
|
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
<label class="col-md-1 ">Estatus:</label>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlEstatus" runat="server" AppendDataBoundItems="true" DataTextField="EstatusFactura" DataValueField="CveEstatusFactura" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||||
|
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body" style="display: none">
|
||||||
|
<div class="row">
|
||||||
|
<label runat="server" id="LblProyecto" class="col-md-1 truncate">Proyecto:</label>
|
||||||
|
<div runat="server" id="DivProyecto" class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlProyecto" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||||
|
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
<label runat="server" id="LblSubProyecto" class="col-md-1 truncate">SubProyecto:</label>
|
||||||
|
<div runat="server" id="DivSubProyecto" class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||||
|
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
<label class="col-md-1 ">Cliente:</label>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||||
|
</div>
|
||||||
|
<label class="col-md-1 truncate">Vendedor:</label>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlVendedor" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 100%">
|
||||||
|
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-1 truncate">Clasificación:</label>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlClasificacion" AutoPostBack="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Style="width: 100%">
|
||||||
|
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
<label class="col-md-1">Tipo: </label>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:ListBox ID="DdlTipoComprobante" AutoPostBack="true" OnTextChanged="DdlTipoComprobante_SelectedIndexChanged" data-text="Todos" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server">
|
||||||
|
<asp:ListItem Text="Ingresos" Value="Ing"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Egresos" Value="Egs"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Remisión" Value="Rem"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Cotización" Value="Cot"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Anticipos" Value="Ant"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Pedido Con" Value="Ped"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Devolucion" Value="Dev"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Pedido" Value="Pd2"></asp:ListItem>
|
||||||
|
</asp:ListBox>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Ventas"
|
||||||
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" Style="text-align: center;" GridLines="None" Width="99%">
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField HeaderText="Cliente" DataField="Cliente" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:TemplateField HeaderText="Grupo" ItemStyle-Width="30%" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlGrupo" runat="server" Text='<%# Eval("GPO") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:BoundField HeaderText="Fecha" DataField="Fecha" ItemStyle-HorizontalAlign="Center" />
|
||||||
|
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Sub Total" DataField="SubTotal" ItemStyle-Width="10%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Descuento" DataField="Descuento" ItemStyle-Width="10%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="IVA" DataField="IVA" ItemStyle-Width="10%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Total" DataField="Total" ItemStyle-Width="10%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Sub. Máximo" DataField="MAX_SubTotal" ItemStyle-Width="10%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" Visible="false" />
|
||||||
|
<asp:BoundField HeaderText="Sub. Promedio" DataField="AVG_SubTotal" ItemStyle-Width="10%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" Visible="false" />
|
||||||
|
<asp:BoundField HeaderText="Sub. Mínimo" DataField="MIN_SubTotal" ItemStyle-Width="10%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" Visible="false" />
|
||||||
|
<asp:BoundField HeaderText="Tot. Máximo" DataField="MAX_Total" ItemStyle-Width="10%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" Visible="false" />
|
||||||
|
<asp:BoundField HeaderText="Tot. Promedio" DataField="AVG_Total" ItemStyle-Width="10%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" Visible="false" />
|
||||||
|
<asp:BoundField HeaderText="Tot. Mínimo" DataField="MIN_Total" ItemStyle-Width="10%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" Visible="false" />
|
||||||
|
</Columns>
|
||||||
|
<RowStyle CssClass="Texto" />
|
||||||
|
<HeaderStyle CssClass="Titulos" />
|
||||||
|
</asp:GridView>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpTipoCambio" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div id="DivTipoCambio" class="modal fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">
|
||||||
|
<asp:Label ID="Label2" runat="server" ClientIDMode="Static" Text="Cambiar Tipo Cambio de Dólares"></asp:Label></h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpBodyTipoCambio" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:RadioButtonList runat="server" ID="RblTipoCambio" AutoPostBack="true">
|
||||||
|
<asp:ListItem Selected="true" Text="Moneda Original" Value="1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Dólares en Tipo Cambio de la Fecha Compra" Value="2"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Tipo Cambio Especifico" Value="3"></asp:ListItem>
|
||||||
|
</asp:RadioButtonList>
|
||||||
|
|
||||||
|
<div class="row" style="margin-left: 10px;" runat="server" id="LiEspecifico" visible="false">
|
||||||
|
Especifico:
|
||||||
|
|
||||||
|
<asp:TextBox ID="TxtEspecifico" runat="server" Width="55px" />
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:Button ID="BtnTipoCambio" OnClick="BtnTipoCambio_Click1" runat="server" Text="Aceptar" class="btn btn-primary" />
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
|
||||||
304
Ventas/RepAuxiliarFacturas.aspx.vb
Normal file
304
Ventas/RepAuxiliarFacturas.aspx.vb
Normal file
@@ -0,0 +1,304 @@
|
|||||||
|
Option Explicit On
|
||||||
|
Option Strict On
|
||||||
|
|
||||||
|
Imports Extensiones
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
Imports System.Data
|
||||||
|
|
||||||
|
|
||||||
|
Partial Class Ventas_RepAuxiliarFacturas
|
||||||
|
Inherits ClsPaginas
|
||||||
|
#Region "P R O P I E D A D E S"
|
||||||
|
|
||||||
|
Private Property DtVentas As DataTable
|
||||||
|
Get
|
||||||
|
Return DirectCast(ViewState("DtVentas"), DataTable)
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
ViewState("DtVentas") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Property DtColor As DataTable
|
||||||
|
Get
|
||||||
|
Return DirectCast(ViewState("DtColor"), DataTable)
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
ViewState("DtColor") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Private Property Agrupador As String
|
||||||
|
Get
|
||||||
|
Return ViewState("Agrupador").ToString
|
||||||
|
End Get
|
||||||
|
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("Agrupador") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Private Property TCEspecifico As Double
|
||||||
|
Get
|
||||||
|
Return ViewState("TCEspecifico").ToString.ToDouble
|
||||||
|
End Get
|
||||||
|
|
||||||
|
Set(value As Double)
|
||||||
|
ViewState("TCEspecifico") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Private Property TipoCambio As Integer
|
||||||
|
Get
|
||||||
|
Return ViewState("TipoCambio").ToString.ToEntero
|
||||||
|
End Get
|
||||||
|
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("TipoCambio") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
If Not IsPostBack Then
|
||||||
|
CargaCombos()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#Region "C A R G A - C O M B O S"
|
||||||
|
Private Sub CargaClientes()
|
||||||
|
DdlClientes.ddl.Items.Clear()
|
||||||
|
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||||
|
DdlClientes.DataBind()
|
||||||
|
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub DdlTipoComprobante_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
DdlEstatus.Items.Clear()
|
||||||
|
If DdlTipoComprobante.SelectedValue <> "-1" Then
|
||||||
|
DdlEstatus.DataSource = GlobalDTEstatusFactura.FiltraParametros(String.Format("TipoDocto = '{0}'", DdlTipoComprobante.SelectedValue))
|
||||||
|
Else
|
||||||
|
DdlEstatus.DataSource = GlobalDTEstatusFactura
|
||||||
|
|
||||||
|
End If
|
||||||
|
DdlEstatus.Items.Add(New ListItem("Todos", "-1"))
|
||||||
|
DdlEstatus.DataBind()
|
||||||
|
DdlEstatus.SelectedValueExist("3")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged
|
||||||
|
DdlSubProyecto.Items.Clear()
|
||||||
|
If DdlProyecto.SelectedValue <> "-1" Then
|
||||||
|
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, DdlProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, -1, 1)
|
||||||
|
DdlSubProyecto.DataBind()
|
||||||
|
End If
|
||||||
|
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClasificacion.SelectedIndexChanged
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(105) = "" Then
|
||||||
|
DdlPS.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero)
|
||||||
|
DdlPS.DataBind()
|
||||||
|
DdlPS.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
Else
|
||||||
|
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||||
|
DdlPS.SelectedText = "Todos"
|
||||||
|
DdlPS.SelectedValue = "-1"
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaTipoCentroCosto()
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then
|
||||||
|
DdlSubProyecto.Items.Clear()
|
||||||
|
DivProyecto.Visible = False
|
||||||
|
LblProyecto.Visible = False
|
||||||
|
LblSubProyecto.InnerText = "Sucursal:"
|
||||||
|
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||||
|
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
DdlSubProyecto.DataBind()
|
||||||
|
|
||||||
|
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then
|
||||||
|
DdlSubProyecto.Items.Clear()
|
||||||
|
DivProyecto.Visible = False
|
||||||
|
LblProyecto.Visible = False
|
||||||
|
LblSubProyecto.InnerText = "Proyecto:"
|
||||||
|
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||||
|
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
DdlSubProyecto.DataBind()
|
||||||
|
|
||||||
|
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then
|
||||||
|
LblProyecto.InnerText = "Sucursal:"
|
||||||
|
LblSubProyecto.InnerText = "Proyecto:"
|
||||||
|
|
||||||
|
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then
|
||||||
|
LblProyecto.InnerText = "Proyecto:"
|
||||||
|
LblSubProyecto.InnerText = "Sucursal:"
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaCombos()
|
||||||
|
'Cargo Clientes
|
||||||
|
CargaClientes()
|
||||||
|
|
||||||
|
'Cargo Proyectos
|
||||||
|
DdlProyecto.DataSource = GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1)
|
||||||
|
DdlProyecto.DataBind()
|
||||||
|
|
||||||
|
'Cargo Clasificaciones
|
||||||
|
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||||
|
DdlClasificacion.DataBind()
|
||||||
|
|
||||||
|
|
||||||
|
'CargaSubProyectos
|
||||||
|
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||||
|
DdlSubProyecto.DataBind()
|
||||||
|
|
||||||
|
'Vendedor
|
||||||
|
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
||||||
|
DdlVendedor.DataBind()
|
||||||
|
|
||||||
|
|
||||||
|
'Carga Productos
|
||||||
|
DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||||
|
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||||
|
DdlPS.SelectedText = ""
|
||||||
|
DdlPS.SelectedValue = "-1"
|
||||||
|
Else
|
||||||
|
DdlPS.ddl.Items.Clear()
|
||||||
|
DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero)
|
||||||
|
DdlPS.ddl.DataBind()
|
||||||
|
DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
'CargaEstatus
|
||||||
|
DdlEstatus.DataSource = GlobalDTEstatusFactura.FiltraParametros(" CveEstatusFactura NOT IN (1, 4, 5) ")
|
||||||
|
DdlEstatus.DataBind()
|
||||||
|
DdlEstatus.Items.Add(New ListItem("Canceladas", "4"))
|
||||||
|
If UsuarioActual.Empresa.TipoFacturacion = "CFDi" Then
|
||||||
|
DdlEstatus.SelectedIndex = 2
|
||||||
|
Else
|
||||||
|
DdlEstatus.SelectedIndex = 1
|
||||||
|
End If
|
||||||
|
|
||||||
|
CargaTipoCentroCosto()
|
||||||
|
|
||||||
|
TipoCambio = 1
|
||||||
|
TCEspecifico = 0
|
||||||
|
|
||||||
|
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||||
|
If EsWS Then
|
||||||
|
DdlClientes.setEsWebService(True)
|
||||||
|
Else
|
||||||
|
DdlClientes.setEsWebService(False)
|
||||||
|
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||||
|
DdlClientes.DataBind()
|
||||||
|
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
#Region "C A R G A - D A T O S"
|
||||||
|
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||||
|
CargaDatos()
|
||||||
|
UPDatos.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaDatos()
|
||||||
|
|
||||||
|
Dim TipoComprobante As String = If(DdlTipoComprobante.GetSelectedValuesM = "", "-1", DdlTipoComprobante.GetSelectedValuesM)
|
||||||
|
Dim FechaI, FechaF As Date
|
||||||
|
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.ToDate, MinFecha)
|
||||||
|
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
|
||||||
|
|
||||||
|
If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then TCEspecifico = TxtEspecifico.Text.ToDouble Else TCEspecifico = -1
|
||||||
|
|
||||||
|
Dim CveCliente As Integer = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1)
|
||||||
|
|
||||||
|
Dim ObjVentas As New ClsVentas()
|
||||||
|
If ObjVentas.GetRepAuxliarFacturas(DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero,
|
||||||
|
FechaI, FechaF, CveCliente, DdlVendedor.SelectedValue.ToEntero, -1, DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveEmpresa,
|
||||||
|
CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico) Then
|
||||||
|
DtVentas = ObjVentas.DtResultados.Copy()
|
||||||
|
End If
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
GvDatos.DataSource = DtVentas
|
||||||
|
GvDatos.DataBind()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnTipoCambio_Click1(sender As Object, e As EventArgs)
|
||||||
|
CargaDatos()
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivTipoCambio"))
|
||||||
|
UPDatos.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
Select Case e.Row.DBCampo("TipoFila")
|
||||||
|
Case "1"
|
||||||
|
e.Row.CssClass = "Totales"
|
||||||
|
Case "2"
|
||||||
|
e.Row.CssClass = "SubTotales"
|
||||||
|
e.Row.FCLiteral("LtlGrupo").Text = String.Format("<a target=""_blank"" Class=""{0}"" href=""{1}"">{2}</a>", "SubTotales", String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DBCampo("CveVenta")), e.Row.DBCampo("Gpo"))
|
||||||
|
End Select
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||||
|
GvDatos.ExportToExcel("RepAuxiliarFacturas" & Now.ToShortDateString)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
|
||||||
|
If GvDatos.Rows.Count > 0 Then
|
||||||
|
GenerarPDF()
|
||||||
|
Else
|
||||||
|
Alert("No hay datos para imprimir")
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub GenerarPDF()
|
||||||
|
Dim FechaI, FechaF As Date
|
||||||
|
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.ToDate, MinFecha)
|
||||||
|
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
|
||||||
|
|
||||||
|
Dim Cliente = If(DdlClientes.SelectedText = "", "", $" <b>Cliente:</b> {DdlClientes.SelectedText}")
|
||||||
|
Dim FechaInicio = If(txtFechaI.Text = "", "", $" <b>Fecha Inicio:</b> {txtFechaI.Text}")
|
||||||
|
Dim FechaFin = If(txtFechaF.Text = "", "", $" <b>Fecha Fin:</b> {txtFechaF.Text}")
|
||||||
|
Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificación:</b> {DdlClasificacion.SelectedItem.Text}")
|
||||||
|
Dim PS = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S.:</b> {DdlPS.SelectedText}")
|
||||||
|
Dim Proyecto = If(DdlSubProyecto.SelectedValue = "-1", "", $" <b>Proyecto:</b> {DdlSubProyecto.SelectedItem.Text}")
|
||||||
|
Dim Estatus = If(DdlEstatus.SelectedValue = "-1", "", $" <b>Estatus:</b> {DdlEstatus.SelectedItem.Text}")
|
||||||
|
|
||||||
|
|
||||||
|
If DtVentas IsNot Nothing AndAlso DtVentas.Rows.Count > 0 Then
|
||||||
|
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 params As New List(Of ReportParameter)
|
||||||
|
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||||
|
params.Add(New ReportParameter("FechaInicio", If(txtFechaI.Text <> "", FechaI.ToShortDateString, "")))
|
||||||
|
params.Add(New ReportParameter("FechaFin", If(txtFechaF.Text <> "", FechaF.ToShortDateString, "")))
|
||||||
|
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||||
|
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||||
|
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||||
|
params.Add(New ReportParameter("Filtros", $"{Cliente}{FechaInicio}{FechaFin}{Clasificacion}{PS}{Proyecto}{Estatus}"))
|
||||||
|
If Imagen.Exists Then
|
||||||
|
params.Add(New ReportParameter("LogoPath", logouri))
|
||||||
|
Else
|
||||||
|
params.Add(New ReportParameter("LogoPath", ""))
|
||||||
|
End If
|
||||||
|
ImprimirPDF("Empresas/Grales/Formatos/RepAuxiliarFacturas.rdlc", DtVentas, params, "ReporteAuxiliarFacturas")
|
||||||
|
Else
|
||||||
|
Alert("No hay información para mostrar.", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -1297,6 +1297,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
<div id="DivOCRelacionadas" class="modal ADS fade" role="dialog" runat="server" visible="false">
|
||||||
|
<asp:GridView runat="server" ID="GvOCRelacionadas" Caption="Ordenes de Compra Relacionadas:" AutoGenerateColumns="False" DataKeyNames="CveOrdenCompra,Folio"
|
||||||
|
CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None" ShowHeader="False">
|
||||||
|
<Columns>
|
||||||
|
<asp:HyperLinkField DataTextField="Folio" DataNavigateUrlFields="CveOrdenCompra" DataNavigateUrlFormatString="/OC/OC.aspx?OC={0}" />
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 ">
|
<div class="col-md-6 ">
|
||||||
@@ -1314,7 +1322,7 @@
|
|||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Código Único">
|
<asp:TemplateField HeaderText="Código Único">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtCodigoUnico" runat="server" Text='<%# Eval("SerieLote") %>' />
|
<asp:TextBox ID="TxtCodigoUnico" runat="server" Text='<%# Eval("Serie") %>' />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
@@ -3294,19 +3302,6 @@
|
|||||||
<td>
|
<td>
|
||||||
<asp:TextBox ID="TxtCorreoNotificaciones" runat="server" Width="100%" CssClass="form-control"></asp:TextBox></td>
|
<asp:TextBox ID="TxtCorreoNotificaciones" runat="server" Width="100%" CssClass="form-control"></asp:TextBox></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr align="left" id="trOCRelacionadasLabel" runat="server" visible="false">
|
|
||||||
<td id="Td3" runat="server">Ordenes de Compra Relacionadas: </td>
|
|
||||||
</tr>
|
|
||||||
<tr align="left" id="trOCRelacionadas" runat="server" visible="false">
|
|
||||||
<td>
|
|
||||||
<asp:GridView runat="server" ID="GvOCRelacionadas" AutoGenerateColumns="False" DataKeyNames="CveOrdenCompra,Folio"
|
|
||||||
CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None" ShowHeader="False">
|
|
||||||
<Columns>
|
|
||||||
<asp:HyperLinkField DataTextField="Folio" DataNavigateUrlFields="CveOrdenCompra" DataNavigateUrlFormatString="/OC/OC.aspx?OC={0}" />
|
|
||||||
</Columns>
|
|
||||||
</asp:GridView>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr align="left" id="trPaqueteriOpcionesLabel" runat="server" visible="false">
|
<tr align="left" id="trPaqueteriOpcionesLabel" runat="server" visible="false">
|
||||||
<td id="Td2" runat="server">Tipo de Entrega: </td>
|
<td id="Td2" runat="server">Tipo de Entrega: </td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -3403,6 +3398,8 @@
|
|||||||
<asp:Button ID="BtnMandaMail" runat="server" Text="MandaMail" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
<asp:Button ID="BtnMandaMail" runat="server" Text="MandaMail" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
||||||
<asp:Button ID="BtnCrearApartirDe" runat="server" Text="Crear a partir de" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
<asp:Button ID="BtnCrearApartirDe" runat="server" Text="Crear a partir de" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
||||||
|
|
||||||
|
<asp:Button ID="BtnEditar" runat="server" Text="Editar" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -5265,6 +5262,7 @@
|
|||||||
<asp:Button ID="BtnRefacturacionConfirmar" runat="server" ClientIDMode="Static" Text="Refacturacion Documento" Style="display: none;" />
|
<asp:Button ID="BtnRefacturacionConfirmar" runat="server" ClientIDMode="Static" Text="Refacturacion Documento" Style="display: none;" />
|
||||||
<asp:Button ID="BtnRefacturacionConfirmarAceptacion" runat="server" ClientIDMode="Static" Text="Refacturacion Aceptacion Documento" Style="display: none;" />
|
<asp:Button ID="BtnRefacturacionConfirmarAceptacion" runat="server" ClientIDMode="Static" Text="Refacturacion Aceptacion Documento" Style="display: none;" />
|
||||||
<asp:Button ID="BtnRefrescarPagina" runat="server" ClientIDMode="Static" Text="Refrescar" Style="display: none;" />
|
<asp:Button ID="BtnRefrescarPagina" runat="server" ClientIDMode="Static" Text="Refrescar" Style="display: none;" />
|
||||||
|
<asp:Button ID="BtnAplicaNuevaNC" runat="server" ClientIDMode="Static" Text="AplicarNC" Style="display: none;" />
|
||||||
|
|
||||||
<%--FLETES--%>
|
<%--FLETES--%>
|
||||||
<div id="ModalFletes" class="modal ADS fade" role="dialog">
|
<div id="ModalFletes" class="modal ADS fade" role="dialog">
|
||||||
@@ -6396,15 +6394,24 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="DivEstadoPaisCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
|
<div id="DivEstadoPaisCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
||||||
<asp:TextBox ID="TxtEstadoCliente" CssClass="form-control " runat="server" MaxLength="35" CausesValidation="true"></asp:TextBox>
|
<asp:DropDownList ID="DdlSATPais" runat="server" CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlSATPais_SelectedIndexChanged" AutoPostBack="true">
|
||||||
<asp:RequiredFieldValidator ID="RFVEstadoC" runat="server" ControlToValidate="TxtEstadoCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
<asp:ListItem Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
<label for="<%= TxtEstadoCliente.ClientID.ToString()%>">Estado:</label>
|
<asp:ListItem Value="MEX" Text="México" Selected="True"></asp:ListItem>
|
||||||
|
<asp:ListItem Value="USA" Text="USA"></asp:ListItem>
|
||||||
|
<asp:ListItem Value="CAN" Text="Canada"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
|
||||||
|
<asp:RequiredFieldValidator ID="RFVSATPais" runat="server" InitialValue="-1" ControlToValidate="DdlSATPais" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pais''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= DdlSATPais.ClientID.ToString()%>">Pais:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
||||||
<asp:TextBox ID="TxtPaisCliente" CssClass="form-control " Text="Mexico" runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
<asp:DropDownList ID="DdlEstadoSAT" DataTextField="NombreEstado" DataValueField="CveSATEstado" runat="server" CssClass="form-control input-sm select2me">
|
||||||
<asp:RequiredFieldValidator ID="RFVPaisC" runat="server" ControlToValidate="TxtPaisCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''País''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
<label for="<%= TxtPaisCliente.ClientID.ToString()%>">País:</label>
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvDdlEstadoSAT" runat="server" InitialValue="-1" ControlToValidate="DdlEstadoSAT" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= DdlEstadoSAT.ClientID.ToString()%>">Estado:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="DivCorreoCuentaCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
|
<div id="DivCorreoCuentaCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
|
||||||
@@ -7394,6 +7401,9 @@
|
|||||||
function Recargar() {
|
function Recargar() {
|
||||||
$('#BtnRefrescarPagina').click();
|
$('#BtnRefrescarPagina').click();
|
||||||
}
|
}
|
||||||
|
function BtnAplicaNuevaNC() {
|
||||||
|
$('#BtnAplicaNuevaNC').click();
|
||||||
|
}
|
||||||
|
|
||||||
$('.DdlPS').on("select2:open", function (e) { $('.select2-container.select2-container--default .select2-dropdown .select2anothertable').remove(); });
|
$('.DdlPS').on("select2:open", function (e) { $('.select2-container.select2-container--default .select2-dropdown .select2anothertable').remove(); });
|
||||||
$('.DdlPSPyME').on("select2:open", function (e) { $('.select2-container.select2-container--default .select2-dropdown .select2anothertable').remove(); });
|
$('.DdlPSPyME').on("select2:open", function (e) { $('.select2-container.select2-container--default .select2-dropdown .select2anothertable').remove(); });
|
||||||
@@ -7661,8 +7671,8 @@
|
|||||||
$('#<%= TxtTelefonoCliente.ClientID %>').val('');
|
$('#<%= TxtTelefonoCliente.ClientID %>').val('');
|
||||||
$('#<%= TxtCiudadCliente.ClientID %>').val('');
|
$('#<%= TxtCiudadCliente.ClientID %>').val('');
|
||||||
$('#<%= TxtLocalidadCliente.ClientID %>').val('');
|
$('#<%= TxtLocalidadCliente.ClientID %>').val('');
|
||||||
$('#<%= TxtEstadoCliente.ClientID %>').val('');
|
$('#<%= DdlSATPais.ClientID %>').val('');
|
||||||
$('#<%= TxtPaisCliente.ClientID %>').val('');
|
$('#<%= DdlEstadoSAT.ClientID %>').val('');
|
||||||
$('#<%= TxtCorreoCliente.ClientID %>').val('');
|
$('#<%= TxtCorreoCliente.ClientID %>').val('');
|
||||||
|
|
||||||
$('#divAgregarCliente').modal();
|
$('#divAgregarCliente').modal();
|
||||||
|
|||||||
@@ -2049,6 +2049,7 @@ Partial Class Ventas
|
|||||||
DdlSubProyectoDatos.Enabled = False
|
DdlSubProyectoDatos.Enabled = False
|
||||||
BtnEmitirImprimir.Visible = False
|
BtnEmitirImprimir.Visible = False
|
||||||
BtnCrearApartirDe.Visible = True
|
BtnCrearApartirDe.Visible = True
|
||||||
|
If UsuarioActual.TienePermisoProceso(302) Then BtnEditar.Visible = True
|
||||||
'DdlEstatus.Enabled = True
|
'DdlEstatus.Enabled = True
|
||||||
|
|
||||||
DivFechaAnticipoCliente.Visible = True
|
DivFechaAnticipoCliente.Visible = True
|
||||||
@@ -2106,8 +2107,7 @@ Partial Class Ventas
|
|||||||
DivDevAlm.Visible = True
|
DivDevAlm.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'CARGA GV DE OC RELACIONADAS
|
|
||||||
CargarOCRelacionadas()
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If Request("CveOS") IsNot Nothing AndAlso IsNumeric(Request("CveOS")) AndAlso Request("CveOS").ToEntero() > 0 Then
|
If Request("CveOS") IsNot Nothing AndAlso IsNumeric(Request("CveOS")) AndAlso Request("CveOS").ToEntero() > 0 Then
|
||||||
@@ -3563,6 +3563,19 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaEstados(Optional ClaveSATPais As String = "MEX")
|
||||||
|
|
||||||
|
DdlEstadoSAT.Items.Clear()
|
||||||
|
DdlEstadoSAT.DataSource = GlobalDTEstado(ClaveSATPais)
|
||||||
|
|
||||||
|
DdlEstadoSAT.DataBind()
|
||||||
|
DdlEstadoSAT.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
Protected Sub DdlSATPais_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
CargaEstados(DdlSATPais.SelectedValue)
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Function CargaVenta() As Boolean
|
Private Function CargaVenta() As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
@@ -4450,36 +4463,51 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(280) = "1" Then
|
||||||
|
RblPaqueteria.SelectedValue = If(DbRowVenta("FormaPaqueteria").ToString = "", "1", DbRowVenta("FormaPaqueteria").ToString)
|
||||||
|
RblPaqueteria.Enabled = False
|
||||||
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 48 Then
|
If UsuarioActual.CveEmpresa = 48 Then
|
||||||
TxtFecha.AutoPostBack = True
|
TxtFecha.AutoPostBack = True
|
||||||
End If
|
|
||||||
|
|
||||||
CargaCodigoUnico()
|
|
||||||
|
|
||||||
'SI ES COTIZACION PUEDE GENERAR UNA OC PARA MODIFICAR LOS IMPORTES
|
|
||||||
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(583) = "1" Then
|
|
||||||
Dim DtOCGeneradas As DataTable = Nothing
|
|
||||||
If ObjVentas.GetVentasCotizacionesOC(Me.CveVenta, -1, UsuarioActual.CveEmpresa) Then
|
|
||||||
DtOCGeneradas = ObjVentas.DtResultados.Copy()
|
|
||||||
End If
|
End If
|
||||||
If DtOCGeneradas IsNot Nothing AndAlso DtOCGeneradas.Rows.Count > 0 Then
|
|
||||||
LtGenerarOC.Visible = False
|
|
||||||
Else
|
|
||||||
LtGenerarOC.Visible = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
DdlTipoRetencion.SelectedValueExist(DbRowVenta("CveTipoRetencion").ToString())
|
CargaCodigoUnico()
|
||||||
|
|
||||||
|
'SI ES COTIZACION PUEDE GENERAR UNA OC PARA MODIFICAR LOS IMPORTES
|
||||||
|
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(583) = "1" Then
|
||||||
|
Dim DtOCGeneradas As DataTable = Nothing
|
||||||
|
If ObjVentas.GetVentasCotizacionesOC(Me.CveVenta, -1, UsuarioActual.CveEmpresa) Then
|
||||||
|
DtOCGeneradas = ObjVentas.DtResultados.Copy()
|
||||||
|
End If
|
||||||
|
If DtOCGeneradas IsNot Nothing AndAlso DtOCGeneradas.Rows.Count > 0 Then
|
||||||
|
LtGenerarOC.Visible = False
|
||||||
|
Else
|
||||||
|
LtGenerarOC.Visible = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
DdlTipoRetencion.SelectedValueExist(DbRowVenta("CveTipoRetencion").ToString())
|
||||||
|
|
||||||
CargaPS(-1, DdlPS)
|
CargaPS(-1, DdlPS)
|
||||||
|
|
||||||
|
'CARGA GV DE OC RELACIONADAS
|
||||||
|
If CveVenta > 0 AndAlso ObjVentas.GetOCRelacionadas(CveVenta) Then
|
||||||
|
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||||
|
DivOCRelacionadas.Visible = True
|
||||||
|
GvOCRelacionadas.DataSource = ObjVentas.DtResultados
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
GvOCRelacionadas.DataBind()
|
||||||
|
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
UpContado.Update()
|
UpContado.Update()
|
||||||
UpEstatus.Update()
|
UpEstatus.Update()
|
||||||
Retorno = True
|
Retorno = True
|
||||||
|
|
||||||
Else
|
Else
|
||||||
ViewState("CveVenta") = -1
|
ViewState("CveVenta") = -1
|
||||||
Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia)
|
Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -4747,7 +4775,7 @@ Partial Class Ventas
|
|||||||
End Function
|
End Function
|
||||||
Private Sub CargarAlmacenes()
|
Private Sub CargarAlmacenes()
|
||||||
|
|
||||||
If CveVenta > 0 And DdlTipoComprobante.SelectedValue <> "Cot" Then
|
If (CveVenta > 0 And DdlTipoComprobante.SelectedValue <> "Cot") AndAlso Not (UsuarioActual.CveEmpresa = 141 AndAlso EsCreaApartirDe) Then
|
||||||
DivAlmacen.Visible = False
|
DivAlmacen.Visible = False
|
||||||
Else
|
Else
|
||||||
Dim DTAlmacen As DataTable
|
Dim DTAlmacen As DataTable
|
||||||
@@ -6340,6 +6368,10 @@ Partial Class Ventas
|
|||||||
e.Row.FCCheckBox("cbInv").Visible = False
|
e.Row.FCCheckBox("cbInv").Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If (CveVenta > 0 AndAlso EsCreaApartirDe AndAlso UsuarioActual.CveEmpresa = 141) Then
|
||||||
|
e.Row.FCCheckBox("cbInv").Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -10107,7 +10139,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
|
IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
|
||||||
CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera
|
'CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera
|
||||||
End If
|
End If
|
||||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||||
ImporteConcepto12 = importeMX.RoundSQL
|
ImporteConcepto12 = importeMX.RoundSQL
|
||||||
@@ -10116,10 +10148,10 @@ Partial Class Ventas
|
|||||||
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
If CveCuenta <= 0 Then
|
'If CveCuenta <= 0 Then
|
||||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
||||||
CveCuentaContabilizacion = 0
|
' CveCuentaContabilizacion = 0
|
||||||
End If
|
'End If
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
Else
|
Else
|
||||||
@@ -10343,18 +10375,33 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If ImporteConcepto12 < ImporteAcumulado91 Then
|
If ImporteConcepto12 <> ImporteAcumulado91 Then
|
||||||
Dim ImporteOtrosIngresos As Decimal = ImporteConcepto12 - ImporteAcumulado91
|
Dim CveConceptoOtIngresos As Integer = 0
|
||||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ImporteOtrosIngresos, Referencia, 91, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=CveUltimaVenta, ImporteMX:=ImporteOtrosIngresos, ImporteME:=0, CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=tipoCambio) Then
|
Dim IdCuentaContableOt As Integer = 0
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, ImporteOtrosIngresos, Referencia, 211, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, ImporteME:=0, ImporteMX:=ImporteOtrosIngresos, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
Dim TipoMovtoOt As Boolean = False
|
||||||
ErrorPrepoliza = True
|
|
||||||
End If
|
If ImporteConcepto12 > ImporteAcumulado91 Then
|
||||||
|
IdCuentaContableOt = UsuarioActual.Empresa.Funcionalidad(559).ToEntero()
|
||||||
|
CveConceptoOtIngresos = 211
|
||||||
|
TipoMovtoOt = False
|
||||||
Else
|
Else
|
||||||
|
IdCuentaContableOt = UsuarioActual.Empresa.IdCuentaOtrosIngresos
|
||||||
|
CveConceptoOtIngresos = 78
|
||||||
|
TipoMovtoOt = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Dim ImporteOtrosIngresos As Decimal = ImporteConcepto12 - ImporteAcumulado91
|
||||||
|
' If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ImporteOtrosIngresos, Referencia, 91, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=CveUltimaVenta, ImporteMX:=ImporteOtrosIngresos, ImporteME:=0, CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=tipoCambio) Then
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovtoOt, ImporteOtrosIngresos, Referencia, CveConceptoOtIngresos, Concepto, FechaMovimiento, IdCuentaContableOt, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, ImporteME:=0, ImporteMX:=ImporteOtrosIngresos, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
End If
|
End If
|
||||||
|
'Else
|
||||||
|
' ErrorPrepoliza = True
|
||||||
|
'End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 5) Then
|
If Not ErrorPrepoliza AndAlso ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 5) Then
|
||||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
'ErrorPrepoliza = True
|
'ErrorPrepoliza = True
|
||||||
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
|
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
|
||||||
@@ -10763,7 +10810,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
' End If
|
' End If
|
||||||
|
|
||||||
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto"})
|
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
|
||||||
|
|
||||||
If DT.Rows.Count > 0 Then
|
If DT.Rows.Count > 0 Then
|
||||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||||
@@ -10782,7 +10829,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
|
'CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
|
||||||
|
|
||||||
If importeMovimiento <> 0 Then
|
If importeMovimiento <> 0 Then
|
||||||
|
|
||||||
@@ -10791,12 +10838,12 @@ Partial Class Ventas
|
|||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveCuenta <= 0 Then
|
'If CveCuenta <= 0 Then
|
||||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"))
|
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"))
|
||||||
CveCuentaContabilizacion = 0
|
' CveCuentaContabilizacion = 0
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta) Then
|
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
Else
|
Else
|
||||||
ViewState("SeGuardoPrePoliza") = True
|
ViewState("SeGuardoPrePoliza") = True
|
||||||
@@ -10865,7 +10912,7 @@ Partial Class Ventas
|
|||||||
If Row2("CveClasificacion").ToString() = "19929" Then IdCtaContable = 1142
|
If Row2("CveClasificacion").ToString() = "19929" Then IdCtaContable = 1142
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
|
' CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
|
||||||
|
|
||||||
If importeMovimiento <> 0 Then
|
If importeMovimiento <> 0 Then
|
||||||
|
|
||||||
@@ -10874,10 +10921,10 @@ Partial Class Ventas
|
|||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveCuenta <= 0 Then
|
'If CveCuenta <= 0 Then
|
||||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"))
|
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"))
|
||||||
CveCuentaContabilizacion = 0
|
' CveCuentaContabilizacion = 0
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta) Then
|
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
@@ -11182,7 +11229,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows.Count = 1 Then
|
If GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows.Count = 1 Then
|
||||||
IdCtaContable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows(0)("IdCtaContable").ToString().ToEntero()
|
IdCtaContable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows(0)("IdCtaContable").ToString().ToEntero()
|
||||||
CveCuenta = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows(0)("IdCtaContableSIG").ToString().ToEntero()
|
' CveCuenta = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows(0)("IdCtaContableSIG").ToString().ToEntero()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If IdCtaContable <= 0 Then
|
If IdCtaContable <= 0 Then
|
||||||
@@ -11190,10 +11237,10 @@ Partial Class Ventas
|
|||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveCuenta <= 0 Then
|
'If CveCuenta <= 0 Then
|
||||||
CuentasContablesInvalidasSIG.AppendFormat("<br> {0}", GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows(0)("NumCuentaMoneda").ToString().ToEntero())
|
' CuentasContablesInvalidasSIG.AppendFormat("<br> {0}", GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows(0)("NumCuentaMoneda").ToString().ToEntero())
|
||||||
CveCuentaContabilizacion = 0
|
' CveCuentaContabilizacion = 0
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
'BANCOS
|
'BANCOS
|
||||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 30, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 30, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||||
@@ -11262,10 +11309,10 @@ Partial Class Ventas
|
|||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveCuenta <= 0 Then
|
'If CveCuenta <= 0 Then
|
||||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
||||||
CveCuentaContabilizacion = 0
|
' CveCuentaContabilizacion = 0
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=tipoCambio, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza) Then
|
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=tipoCambio, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
@@ -11344,6 +11391,12 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Simplificacion de PrePolizas
|
||||||
|
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
|
||||||
|
If Not ObjConta.PrePolizaSimplificacion(ObjFactura.CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||||
|
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 2) Then
|
If ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 2) Then
|
||||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
@@ -11361,13 +11414,6 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Simplificacion de PrePolizas
|
|
||||||
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
|
|
||||||
If Not ObjConta.PrePolizaSimplificacion(ObjFactura.CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
|
||||||
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'EN CASO DE SER REFACTURACION DE ANTICIPO SE ACTUALIZAN LAS VENTAS APLICADAS HACIA EL NUEVO
|
'EN CASO DE SER REFACTURACION DE ANTICIPO SE ACTUALIZAN LAS VENTAS APLICADAS HACIA EL NUEVO
|
||||||
If NuevaFactura = 1 AndAlso CveDevolucion > 0 AndAlso ObjFactura.TipoDocto.Contiene("Ant") Then
|
If NuevaFactura = 1 AndAlso CveDevolucion > 0 AndAlso ObjFactura.TipoDocto.Contiene("Ant") Then
|
||||||
If Not ObjVentas.TraspasaVentasAplicadasAnt(ObjFactura.CveVenta, CveDevolucion, UsuarioActual.CveEmpresa) Then
|
If Not ObjVentas.TraspasaVentasAplicadasAnt(ObjFactura.CveVenta, CveDevolucion, UsuarioActual.CveEmpresa) Then
|
||||||
@@ -12500,7 +12546,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If CveMonedaVenta = 1 Then
|
If CveMonedaVenta = 1 Then
|
||||||
IdCtaContable = IdCtaContClientes
|
IdCtaContable = IdCtaContClientes
|
||||||
CveCuenta = CveCuentaClientes
|
'CveCuenta = CveCuentaClientes
|
||||||
Else
|
Else
|
||||||
IdCtaContable = IdCtaContComplementaria
|
IdCtaContable = IdCtaContComplementaria
|
||||||
CveCuenta = 0 'If(ObjFactura.Cliente IsNot Nothing AndAlso ObjFactura.Cliente.CveCuentaComplementaria > 0, ObjFactura.Cliente.CveCuentaComplementaria, -1)
|
CveCuenta = 0 'If(ObjFactura.Cliente IsNot Nothing AndAlso ObjFactura.Cliente.CveCuentaComplementaria > 0, ObjFactura.Cliente.CveCuentaComplementaria, -1)
|
||||||
@@ -12511,11 +12557,11 @@ Partial Class Ventas
|
|||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Conta SIG
|
''Conta SIG
|
||||||
If CveCuenta <= 0 Then
|
'If CveCuenta <= 0 Then
|
||||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
||||||
CveCuentaContabilizacion = 0
|
' CveCuentaContabilizacion = 0
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, 0, Concepto, 207, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Math.Round(importeMovimiento * tipoCambioVenta - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioVentaValuacion) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, 0, Concepto, 207, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Math.Round(importeMovimiento * tipoCambioVenta - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioVentaValuacion) Then
|
||||||
ErrorConta = True
|
ErrorConta = True
|
||||||
@@ -12550,11 +12596,11 @@ Partial Class Ventas
|
|||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Conta SIG
|
''Conta SIG
|
||||||
If CveCuenta <= 0 Then
|
'If CveCuenta <= 0 Then
|
||||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
||||||
CveCuentaContabilizacion = 0
|
' CveCuentaContabilizacion = 0
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=gvr.DataKey("CveVenta").ToEntero(), CveVentaAmortizacion:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambioPago, ImporteME:=If(tipoCambioPago = 1, 0, importeMovimiento), CveCuenta:=CveCuenta) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=gvr.DataKey("CveVenta").ToEntero(), CveVentaAmortizacion:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambioPago, ImporteME:=If(tipoCambioPago = 1, 0, importeMovimiento), CveCuenta:=CveCuenta) Then
|
||||||
ErrorConta = True
|
ErrorConta = True
|
||||||
@@ -12599,7 +12645,7 @@ Partial Class Ventas
|
|||||||
If ObjConta.GetRetCuenta(ConceptoContable, CveCliente) Then
|
If ObjConta.GetRetCuenta(ConceptoContable, CveCliente) Then
|
||||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString().ToEntero()
|
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString().ToEntero()
|
||||||
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCtaContableSIG").ToString().ToEntero()
|
'CveCuenta = ObjConta.DtResultados.Rows(0)("IdCtaContableSIG").ToString().ToEntero()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -12610,10 +12656,10 @@ Partial Class Ventas
|
|||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveCuenta <= 0 Then
|
'If CveCuenta <= 0 Then
|
||||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
||||||
CveCuentaContabilizacion = 0
|
' CveCuentaContabilizacion = 0
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
Dim ImporteComplementaria As Decimal = 0
|
Dim ImporteComplementaria As Decimal = 0
|
||||||
If UsaComplementariaClientes = True AndAlso gvr.DataKey("CveMoneda").ToString().ToDecimal > 1 Then
|
If UsaComplementariaClientes = True AndAlso gvr.DataKey("CveMoneda").ToString().ToDecimal > 1 Then
|
||||||
@@ -12842,10 +12888,10 @@ Partial Class Ventas
|
|||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveCuenta <= 0 Then
|
'If CveCuenta <= 0 Then
|
||||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
||||||
CveCuentaContabilizacion = 0
|
' CveCuentaContabilizacion = 0
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=importeMX, CveCuenta:=CveCuenta, TipoCambio:=TipoCambioGeneral) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=importeMX, CveCuenta:=CveCuenta, TipoCambio:=TipoCambioGeneral) Then
|
||||||
ErrorConta = True
|
ErrorConta = True
|
||||||
@@ -13048,7 +13094,7 @@ Partial Class Ventas
|
|||||||
CveCuentaIVAxTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVAXTrasladar").ToString().ToEntero()
|
CveCuentaIVAxTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVAXTrasladar").ToString().ToEntero()
|
||||||
End If
|
End If
|
||||||
IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
|
IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
|
||||||
CveCuenta = If(CveCuentaIVAxTrasladar > 0, CveCuentaIVAxTrasladar, UsuarioActual.Empresa.CveCuentaIVAxTrasladar)
|
' CveCuenta = If(CveCuentaIVAxTrasladar > 0, CveCuentaIVAxTrasladar, UsuarioActual.Empresa.CveCuentaIVAxTrasladar)
|
||||||
|
|
||||||
If ImporteMovimiento > 0 Then
|
If ImporteMovimiento > 0 Then
|
||||||
If IdCtaContable <= 0 Then
|
If IdCtaContable <= 0 Then
|
||||||
@@ -13056,10 +13102,10 @@ Partial Class Ventas
|
|||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveCuenta <= 0 Then
|
'If CveCuenta <= 0 Then
|
||||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 13))("ConceptoContable").ToString())
|
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 13))("ConceptoContable").ToString())
|
||||||
CveCuentaContabilizacion = 0
|
' CveCuentaContabilizacion = 0
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Concepto, 13, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Concepto, 13, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||||
PrePolizaCorrecta = False
|
PrePolizaCorrecta = False
|
||||||
@@ -13077,7 +13123,7 @@ Partial Class Ventas
|
|||||||
If ObjConta.GetRetCuenta(8, UsuarioActual.CveEmpresa) Then
|
If ObjConta.GetRetCuenta(8, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString().ToEntero()
|
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString().ToEntero()
|
||||||
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString().ToEntero()
|
'CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString().ToEntero()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -13088,10 +13134,10 @@ Partial Class Ventas
|
|||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveCuenta <= 0 Then
|
'If CveCuenta <= 0 Then
|
||||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 8))("ConceptoContable").ToString())
|
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 8))("ConceptoContable").ToString())
|
||||||
CveCuentaContabilizacion = 0
|
' CveCuentaContabilizacion = 0
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, Concepto, 8, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, Concepto, 8, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta) Then
|
||||||
PrePolizaCorrecta = False
|
PrePolizaCorrecta = False
|
||||||
@@ -13114,15 +13160,15 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'ContaSIG
|
'ContaSIG
|
||||||
If CveCuentaRetISR <> 0 Then
|
'If CveCuentaRetISR <> 0 Then
|
||||||
CveCuenta = CveCuentaRetISR
|
' CveCuenta = CveCuentaRetISR
|
||||||
Else
|
'Else
|
||||||
If ObjConta.GetRetCuenta(9, UsuarioActual.CveEmpresa) Then
|
' If ObjConta.GetRetCuenta(9, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
' If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||||
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString().ToEntero()
|
' CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString().ToEntero()
|
||||||
End If
|
' End If
|
||||||
End If
|
' End If
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If ImporteMovimiento > 0 Then
|
If ImporteMovimiento > 0 Then
|
||||||
If IdCtaContable <= 0 Then
|
If IdCtaContable <= 0 Then
|
||||||
@@ -13130,10 +13176,10 @@ Partial Class Ventas
|
|||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If IdCtaContable <= 0 Then
|
'If IdCtaContable <= 0 Then
|
||||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 9))("ConceptoContable").ToString())
|
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 9))("ConceptoContable").ToString())
|
||||||
CveCuentaContabilizacion = 0
|
' CveCuentaContabilizacion = 0
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, Concepto, 9, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, Concepto, 9, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta) Then
|
||||||
PrePolizaCorrecta = False
|
PrePolizaCorrecta = False
|
||||||
@@ -13165,7 +13211,7 @@ Partial Class Ventas
|
|||||||
CveCuentaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVATrasladado").ToString().ToEntero()
|
CveCuentaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVATrasladado").ToString().ToEntero()
|
||||||
End If
|
End If
|
||||||
IdCtaContable = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
|
IdCtaContable = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
|
||||||
CveCuenta = If(CveCuentaIVATrasladado > 0, CveCuentaIVATrasladado, UsuarioActual.Empresa.CveCuentaIVATrasladado)
|
'CveCuenta = If(CveCuentaIVATrasladado > 0, CveCuentaIVATrasladado, UsuarioActual.Empresa.CveCuentaIVATrasladado)
|
||||||
|
|
||||||
If ImporteMovimiento > 0 Then
|
If ImporteMovimiento > 0 Then
|
||||||
'ContaContPAQ
|
'ContaContPAQ
|
||||||
@@ -13174,11 +13220,11 @@ Partial Class Ventas
|
|||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'ContaSIG
|
''ContaSIG
|
||||||
If CveCuenta <= 0 Then
|
'If CveCuenta <= 0 Then
|
||||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 61))("ConceptoContable").ToString())
|
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 61))("ConceptoContable").ToString())
|
||||||
CveCuentaContabilizacion = 0
|
' CveCuentaContabilizacion = 0
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, Concepto, 61, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, Concepto, 61, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||||
PrePolizaCorrecta = False
|
PrePolizaCorrecta = False
|
||||||
@@ -13198,14 +13244,14 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Conta SIG
|
''Conta SIG
|
||||||
If CveCuentaRetIVA <> 0 Then
|
'If CveCuentaRetIVA <> 0 Then
|
||||||
CveCuenta = CveCuentaRetIVA
|
' CveCuenta = CveCuentaRetIVA
|
||||||
Else
|
'Else
|
||||||
If ObjConta.GetRetCuenta(62, UsuarioActual.CveEmpresa) Then
|
' If ObjConta.GetRetCuenta(62, UsuarioActual.CveEmpresa) Then
|
||||||
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString().ToEntero()
|
' CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString().ToEntero()
|
||||||
End If
|
' End If
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If ImporteMovimiento > 0 Then
|
If ImporteMovimiento > 0 Then
|
||||||
If IdCtaContable <= 0 Then
|
If IdCtaContable <= 0 Then
|
||||||
@@ -13213,10 +13259,10 @@ Partial Class Ventas
|
|||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveCuenta <= 0 Then
|
'If CveCuenta <= 0 Then
|
||||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 62))("ConceptoContable").ToString())
|
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 62))("ConceptoContable").ToString())
|
||||||
CveCuentaContabilizacion = 0
|
' CveCuentaContabilizacion = 0
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Concepto, 62, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Concepto, 62, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta) Then
|
||||||
PrePolizaCorrecta = False
|
PrePolizaCorrecta = False
|
||||||
@@ -13238,15 +13284,15 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveCuentaRetISR <> 0 Then
|
'If CveCuentaRetISR <> 0 Then
|
||||||
CveCuenta = CveCuentaRetISR
|
' CveCuenta = CveCuentaRetISR
|
||||||
Else
|
'Else
|
||||||
If ObjConta.GetRetCuenta(63, UsuarioActual.CveEmpresa) Then
|
' If ObjConta.GetRetCuenta(63, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
' If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||||
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString().ToEntero()
|
' CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString().ToEntero()
|
||||||
End If
|
' End If
|
||||||
End If
|
' End If
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If ImporteMovimiento > 0 Then
|
If ImporteMovimiento > 0 Then
|
||||||
If IdCtaContable <= 0 Then
|
If IdCtaContable <= 0 Then
|
||||||
@@ -13254,10 +13300,10 @@ Partial Class Ventas
|
|||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveCuenta <= 0 Then
|
'If CveCuenta <= 0 Then
|
||||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 63))("ConceptoContable").ToString())
|
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 63))("ConceptoContable").ToString())
|
||||||
CveCuentaContabilizacion = 0
|
' CveCuentaContabilizacion = 0
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Concepto, 63, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Concepto, 63, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta) Then
|
||||||
PrePolizaCorrecta = False
|
PrePolizaCorrecta = False
|
||||||
@@ -14490,7 +14536,7 @@ Partial Class Ventas
|
|||||||
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString())
|
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString())
|
||||||
End If
|
End If
|
||||||
|
|
||||||
TxtCorreoNotificaciones.Text = GlobalDTUsuarios(UsuarioActual.CveUsuario).FiltroPrimeroValor("Correo")
|
'TxtCorreoNotificaciones.Text = GlobalDTUsuarios(UsuarioActual.CveUsuario).FiltroPrimeroValor("Correo")
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -15893,7 +15939,7 @@ Partial Class Ventas
|
|||||||
GvPS.DataBind()
|
GvPS.DataBind()
|
||||||
|
|
||||||
'RECARGA GV INVENTARIO
|
'RECARGA GV INVENTARIO
|
||||||
If Not CveVenta > 0 Or DdlTipoComprobante.SelectedValue = "Cot" Then
|
If (Not CveVenta > 0 Or DdlTipoComprobante.SelectedValue = "Cot") OrElse (UsuarioActual.CveEmpresa = 141 AndAlso EsCreaApartirDe) Then
|
||||||
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
||||||
CargaGVInv(DtInv)
|
CargaGVInv(DtInv)
|
||||||
End If
|
End If
|
||||||
@@ -18432,6 +18478,7 @@ Partial Class Ventas
|
|||||||
DivBotonesAgregarCliente.Visible = False
|
DivBotonesAgregarCliente.Visible = False
|
||||||
DivFormaCliente.Visible = False
|
DivFormaCliente.Visible = False
|
||||||
UpAgregarCliente.Update()
|
UpAgregarCliente.Update()
|
||||||
|
CargaEstados()
|
||||||
|
|
||||||
RegistraScript("showDivEC();")
|
RegistraScript("showDivEC();")
|
||||||
End Sub
|
End Sub
|
||||||
@@ -18454,8 +18501,7 @@ Partial Class Ventas
|
|||||||
RFVColoniaC.Visible = False
|
RFVColoniaC.Visible = False
|
||||||
RFVCiudadC.Visible = False
|
RFVCiudadC.Visible = False
|
||||||
RFVLocalidadC.Visible = False
|
RFVLocalidadC.Visible = False
|
||||||
RFVEstadoC.Visible = False
|
RFVSATPais.Visible = False
|
||||||
RFVPaisC.Visible = False
|
|
||||||
|
|
||||||
DdlMetodoCliente.SelectedValueExist(1)
|
DdlMetodoCliente.SelectedValueExist(1)
|
||||||
DdlFormaCliente.SelectedValueExist(1)
|
DdlFormaCliente.SelectedValueExist(1)
|
||||||
@@ -18487,8 +18533,7 @@ Partial Class Ventas
|
|||||||
RFVColoniaC.Visible = True
|
RFVColoniaC.Visible = True
|
||||||
RFVCiudadC.Visible = True
|
RFVCiudadC.Visible = True
|
||||||
RFVLocalidadC.Visible = True
|
RFVLocalidadC.Visible = True
|
||||||
RFVEstadoC.Visible = True
|
RFVSATPais.Visible = True
|
||||||
RFVPaisC.Visible = True
|
|
||||||
|
|
||||||
DdlMetodoCliente.SelectedValueExist(-1)
|
DdlMetodoCliente.SelectedValueExist(-1)
|
||||||
DdlFormaCliente.SelectedValueExist(-1)
|
DdlFormaCliente.SelectedValueExist(-1)
|
||||||
@@ -18511,8 +18556,8 @@ Partial Class Ventas
|
|||||||
Dim ObjCliente As New ClsClientes
|
Dim ObjCliente As New ClsClientes
|
||||||
|
|
||||||
If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim,
|
If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim,
|
||||||
TxtColoniaCliente.Text.Trim, TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, TxtEstadoCliente.Text.Trim,
|
TxtColoniaCliente.Text.Trim, TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, DdlEstadoSAT.SelectedValue.ToEntero,
|
||||||
TxtPaisCliente.Text.Trim, TxtRFCCliente.Text.Trim, TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.Text.Trim,
|
TxtRFCCliente.Text.Trim, TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.Text.Trim,
|
||||||
DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", -1, -1, CvePrecioLista:=CvePrecioLista) Then
|
DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", -1, -1, CvePrecioLista:=CvePrecioLista) Then
|
||||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||||
RegistraScript("hideDivEC();")
|
RegistraScript("hideDivEC();")
|
||||||
@@ -21249,6 +21294,11 @@ Partial Class Ventas
|
|||||||
Dim TempCliente As Integer = If(CveVenta <= 0, CveCliente, -1)
|
Dim TempCliente As Integer = If(CveVenta <= 0, CveCliente, -1)
|
||||||
Dim TipoDocumento As Integer = If(CveVenta <= 0, 14, -1)
|
Dim TipoDocumento As Integer = If(CveVenta <= 0, 14, -1)
|
||||||
|
|
||||||
|
If CveVenta <= 0 AndAlso TempCliente <= 0 Then
|
||||||
|
Dim a As String = "carga de docuemntacion del cleinte, masivo, corregir"
|
||||||
|
a.GuardaLog()
|
||||||
|
End If
|
||||||
|
|
||||||
If objRH.DocumentacionElectronicaGet(-1, TempCliente, -1, UsuarioActual.CveEmpresa, TipoDocumento, CveVenta) Then
|
If objRH.DocumentacionElectronicaGet(-1, TempCliente, -1, UsuarioActual.CveEmpresa, TipoDocumento, CveVenta) Then
|
||||||
DtDocumentacionCliente = objRH.DtResultados.FiltraParametros("CveDocumentacionElectronica > 0")
|
DtDocumentacionCliente = objRH.DtResultados.FiltraParametros("CveDocumentacionElectronica > 0")
|
||||||
DtDocumentacionCliente.Columns.Add("Accion", Type.GetType("System.String"))
|
DtDocumentacionCliente.Columns.Add("Accion", Type.GetType("System.String"))
|
||||||
@@ -22288,6 +22338,31 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'SOLO APLICA SI NO HAY DOCUMENTOS QUE SELECCIONAR
|
||||||
|
If UsuarioActual.CveEmpresa = 140 Then
|
||||||
|
If GvCxC.Rows.Count = 0 OrElse GvCxC.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("ChkCxC").Checked) = 0 Then
|
||||||
|
Alert("No se ha seleccionado ninguna nota de crédito, en caso de no seleccionar ninguna se creará una nueva nota de crédito. ¿Está seguro de realizar esta acción?", TipoMensaje.MsgConfirmacion, JSBtnAceptar:="BtnAplicaNuevaNC();", TextoConfirmacion:=" Si ", TextoCancelacion:=" No ")
|
||||||
|
Else
|
||||||
|
AplicarNotaCreditoDesdeVenta()
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
AplicarNotaCreditoDesdeVenta()
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub BtnAplicaNuevaNC_Click(sender As Object, e As EventArgs) Handles BtnAplicaNuevaNC.Click
|
||||||
|
If ListaRemisionesNC IsNot Nothing AndAlso ListaRemisionesNC.Count > 0 Then
|
||||||
|
AplicarNotaCreditoDesdeVenta(AplicaNuevoDocumento:=True)
|
||||||
|
Else
|
||||||
|
Alert("No ha seleccionado ninguna remisión de nota de crédito", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub AplicarNotaCreditoDesdeVenta(Optional AplicaNuevoDocumento As Boolean = False)
|
||||||
|
RegistraScript("$('#ModalAplicarNC').modal('hide');", "EscondeModalNC")
|
||||||
|
|
||||||
DdlTipoComprobante.SelectedValue = "Egs"
|
DdlTipoComprobante.SelectedValue = "Egs"
|
||||||
Dim AplicaImpuestosLocales As Boolean = False
|
Dim AplicaImpuestosLocales As Boolean = False
|
||||||
|
|
||||||
@@ -22299,16 +22374,8 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
ObjCliente.Dispose()
|
ObjCliente.Dispose()
|
||||||
|
|
||||||
Dim AplicaNuevoDocumento As Boolean = False
|
|
||||||
|
|
||||||
'SOLO APLICA SI NO HAY DOCUMENTOS QUE SELECCIONAR
|
|
||||||
If UsuarioActual.CveEmpresa = 140 AndAlso GvCxC.Rows.Count = 0 Then
|
|
||||||
AplicaNuevoDocumento = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
AplicarNC(DdlNCPS.SelectedValue.ToEntero(), EsNCAmortizacion:=ChkAplicaNCAnticipo.Checked, AplicaImpuestosLocales:=AplicaImpuestosLocales, AplicaNuevoDocumento:=AplicaNuevoDocumento)
|
AplicarNC(DdlNCPS.SelectedValue.ToEntero(), EsNCAmortizacion:=ChkAplicaNCAnticipo.Checked, AplicaImpuestosLocales:=AplicaImpuestosLocales, AplicaNuevoDocumento:=AplicaNuevoDocumento)
|
||||||
|
|
||||||
RegistraScript("$('#ModalAplicarNC').modal('hide');", "EscondeModalNC")
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub AplicarNC(CvePS As Integer, Optional NCDescuento As Boolean = False, Optional EsNCAmortizacion As Boolean = False, Optional AplicaImpuestosLocales As Boolean = True, Optional AplicaNuevoDocumento As Boolean = False)
|
Private Sub AplicarNC(CvePS As Integer, Optional NCDescuento As Boolean = False, Optional EsNCAmortizacion As Boolean = False, Optional AplicaImpuestosLocales As Boolean = True, Optional AplicaNuevoDocumento As Boolean = False)
|
||||||
@@ -24958,6 +25025,19 @@ Partial Class Ventas
|
|||||||
GvPS.Columns(17).Visible = True
|
GvPS.Columns(17).Visible = True
|
||||||
GvPS.Columns(18).Visible = True
|
GvPS.Columns(18).Visible = True
|
||||||
|
|
||||||
|
CambiaTipoDocto()
|
||||||
|
CambiaSucursalGeneral()
|
||||||
|
CargaAnticipos(CveCliente)
|
||||||
|
CargaRestriccionesCreditoCliente(CveVenta:=-1)
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa = 141 Then
|
||||||
|
TabAlmacen.Visible = True
|
||||||
|
DivAlmacen.Visible = True
|
||||||
|
CargaGVInv(TmpDT.FiltraParametros("CveTipoPS = 2"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
BloqueaCondiconesPago()
|
||||||
|
|
||||||
UpnTools.Update()
|
UpnTools.Update()
|
||||||
UpCliente.Update()
|
UpCliente.Update()
|
||||||
UpParametros.Update()
|
UpParametros.Update()
|
||||||
@@ -24968,13 +25048,8 @@ Partial Class Ventas
|
|||||||
UPCondicionesPago.Update()
|
UPCondicionesPago.Update()
|
||||||
UpDetalle.Update()
|
UpDetalle.Update()
|
||||||
UpEstatus.Update()
|
UpEstatus.Update()
|
||||||
|
|
||||||
CambiaTipoDocto()
|
|
||||||
CambiaSucursalGeneral()
|
|
||||||
CargaAnticipos(CveCliente)
|
|
||||||
CargaRestriccionesCreditoCliente(CveVenta:=-1)
|
|
||||||
BloqueaCondiconesPago()
|
|
||||||
UpParametros.Update()
|
UpParametros.Update()
|
||||||
|
UpINV.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
@@ -25903,22 +25978,46 @@ Partial Class Ventas
|
|||||||
'MailCls = Nothing
|
'MailCls = Nothing
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargarOCRelacionadas()
|
Protected Sub BtnEditar_Click() Handles BtnEditar.Click
|
||||||
Dim GridViewPSAux As GridView = GvPS
|
Dim Opcion As String = BtnEditar.Text
|
||||||
Dim CveVentasDetalle As New StringBuilder()
|
If Opcion = "Editar" Then
|
||||||
For Each vd As GridViewRow In GridViewPSAux.Rows
|
EditarHabilitarCampos()
|
||||||
Dim CveVentaDetalle As String = vd.DataKey("CveVentaDetalle")
|
ElseIf Opcion = "Guardar" Then
|
||||||
CveVentasDetalle.AppendFormat("{0},", CveVentaDetalle)
|
GuardarValoresEditados()
|
||||||
Next
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub EditarHabilitarCampos()
|
||||||
|
'Datos de emisión
|
||||||
|
DdlVendedor.Enabled = True
|
||||||
|
|
||||||
|
'Observaciones
|
||||||
|
TxtObsFact.Enabled = True
|
||||||
|
TxtOrdenCompra.Enabled = True
|
||||||
|
TxtPedidoContrato.Enabled = True
|
||||||
|
TxtObsAlmacen.Enabled = True
|
||||||
|
RblPaqueteria.Enabled = True
|
||||||
|
|
||||||
|
'Acciones
|
||||||
|
BtnEditar.Text = "Guardar"
|
||||||
|
|
||||||
|
UpParametros.Update()
|
||||||
|
UPObservaciones.Update()
|
||||||
|
UpFacturar.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub GuardarValoresEditados()
|
||||||
Dim ObjVentas As New ClsVentas()
|
Dim ObjVentas As New ClsVentas()
|
||||||
If ObjVentas.GetOCRelacionadas(CveVentasDetalle.ToString) Then
|
If ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtIEPS.Text.ToDecimal, TxtTotal.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero(),
|
||||||
Dim OC As DataTable = ObjVentas.DtResultados
|
TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim, UsuarioActual.CveEmpresa, CveVenta, DdlMetodoPago33.SelectedValue.ToEntero, DdlFormaPago33.SelectedValue.ToEntero,
|
||||||
If OC.Rows.Count > 0 Then
|
TipoDocto:=DdlTipoComprobante.SelectedValue, OrdenCompra:=TxtOrdenCompra.Text, PedidoContrato:=TxtPedidoContrato.Text, ObsAlm:=TxtObsAlmacen.Text, FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero,
|
||||||
trOCRelacionadasLabel.Visible = True
|
CorreoNot:=TxtCorreoNotificaciones.Text, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, Kilometraje:=TxtKilometraje.Text.ToDouble) Then
|
||||||
trOCRelacionadas.Visible = True
|
CargaVenta()
|
||||||
GvOCRelacionadas.DataSource = OC
|
BtnEditar.Text = "Editar"
|
||||||
GvOCRelacionadas.DataBind()
|
Alert("Actualizado correctamente")
|
||||||
End If
|
UpParametros.Update()
|
||||||
|
UPObservaciones.Update()
|
||||||
|
UpFacturar.Update()
|
||||||
End If
|
End If
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -72,6 +72,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user