Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -666,12 +666,12 @@ Public Class ClsAcumuladores
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "GARANTIAS DETALLES"
|
||||
|
||||
|
||||
Public Function AddGarantiasDetalle(CveVentaDetalle As Integer, CveFolioGarantia As Integer, CveTipoUso As Integer,
|
||||
CodigoEnsamble As String, CodigoLinea As String, CodigoInspeccion As String,
|
||||
CveTipoDefecto As Integer, NumPoliza As String, Importe As Double,
|
||||
@@ -697,10 +697,25 @@ Public Class ClsAcumuladores
|
||||
OnError("Ocurrió un al agregar la garantia detalle. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
End Function
|
||||
Public Function GetGarantiasDetalle(CveVenta As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
SqlDataAdapter("PA_Acum_GarantiasDetalleGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As SqlException
|
||||
OnError("Ocurrió un al agregar la garantia detalle. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Public Function DistribuidorMovtosAdd(CveCliente As Integer, Cantidad As Integer, CveTamaño As Integer, CveConcepto As Integer, CveVenta As Integer, CveUsuario As Integer,
|
||||
CveEmpresa As Integer, ImporteCompras As Decimal, Observaciones As String, Optional CveMovimiento As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -13,7 +13,8 @@ Imports System
|
||||
Imports System.Net
|
||||
Imports System.IO.Compression
|
||||
Imports System.Text
|
||||
|
||||
Imports System.Net.Http
|
||||
|
||||
Namespace Modelos
|
||||
|
||||
<Serializable>
|
||||
@@ -375,6 +376,7 @@ Namespace Modelos
|
||||
Me.RemisionesLista = New List(Of Integer)
|
||||
Me.ListaMensajes = New List(Of String)
|
||||
Me.FolioFiscal = ""
|
||||
Me.GenerarPDFFactura = False
|
||||
IniciaValores()
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
If ObjVentas.GetVenta(CveVenta, CveEmpresa) Then
|
||||
@@ -895,16 +897,21 @@ Namespace Modelos
|
||||
If Me.TipoDocto.Contiene("Ing", "Rem", "Ant", "Egs", "Dev", "Pd2") Then
|
||||
'If Not ImprimeAlert Then
|
||||
|
||||
Dim ArchivoIngPyMe As New System.IO.FileInfo(String.Format("{0}Formatos/Factura.mrt", UsuarioActual.Empresa.Ruta))
|
||||
Dim ArchivoIng As New System.IO.FileInfo(String.Format("{0}Formatos/Factura.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim ArchivoRem As New System.IO.FileInfo(String.Format("{0}Formatos/Remision.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim ArchivoEgs As New System.IO.FileInfo(String.Format("{0}Formatos/NotaCredito.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
|
||||
If ArchivoIng.Exists Or ArchivoRem.Exists Or ArchivoIngPyMe.Exists Or ArchivoEgs.Exists Then
|
||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", CveVenta)))
|
||||
Else
|
||||
MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ")
|
||||
If Me.GenerarPDFFactura Then
|
||||
DescargarFactura(CveVenta, CveEmpresa)
|
||||
|
||||
Dim ArchivoIngPyMe As New System.IO.FileInfo(String.Format("{0}Formatos/Factura.mrt", UsuarioActual.Empresa.Ruta))
|
||||
Dim ArchivoIng As New System.IO.FileInfo(String.Format("{0}Formatos/Factura.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim ArchivoRem As New System.IO.FileInfo(String.Format("{0}Formatos/Remision.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim ArchivoEgs As New System.IO.FileInfo(String.Format("{0}Formatos/NotaCredito.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
|
||||
If ArchivoIng.Exists Or ArchivoRem.Exists Or ArchivoIngPyMe.Exists Or ArchivoEgs.Exists Then
|
||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", CveVenta)))
|
||||
Else
|
||||
MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ")
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'ERROR DE NO TIMBRADO
|
||||
@@ -1016,6 +1023,28 @@ Namespace Modelos
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer) As Byte()
|
||||
Dim Url = New Uri(String.Format("{0}Compras/PopUpVerFactura.aspx?P={1}", ClsPaginas.UrlSitio, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))))
|
||||
Dim File As Byte() = Nothing
|
||||
Try
|
||||
Using httpClient = New HttpClient()
|
||||
httpClient.Timeout = New TimeSpan(0, 15, 0)
|
||||
Using request = New HttpRequestMessage(HttpMethod.Get, Url)
|
||||
request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}", CveEmpresa, DateTime.UtcNow.Ticks)))
|
||||
Dim response = httpClient.SendAsync(request).Result
|
||||
If response.StatusCode = Net.HttpStatusCode.OK Then
|
||||
File = response.Content.ReadAsByteArrayAsync().Result
|
||||
End If
|
||||
End Using
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
File = Nothing
|
||||
OnError("Ocurrió un error al descargar la factura", ex)
|
||||
End Try
|
||||
|
||||
Return File
|
||||
End Function
|
||||
|
||||
#Region " GUARDAR - VENTA, PREPOLIZAS, INV, NC , ESTIMACIONES, AC, NOTA DE CRÉDITO "
|
||||
Private Function RegistrarNCAmortizacion(ObjVentas As ClsVentas, ObjConta As ClsContabilidad, ObjInventario As ClsInventarios, ObjContr As ClsContratos, ObjContPaq As ClsContPAQi, ByVal factura As Modelos.Factura, ObjBancos As ClsBancos, TmpDTconceptos As DataTable, ByRef ObjEventos As ClsOIEventos) As Boolean
|
||||
Dim ProcesoCorrecto As Boolean = True
|
||||
@@ -1758,7 +1787,6 @@ Namespace Modelos
|
||||
Private Function GuardarUsados(SqlTransaccion As SqlClient.SqlTransaction, CveVenta As Integer, ByRef ObjVentas As ClsVentas) As Boolean
|
||||
Dim Resultado As Boolean = True
|
||||
|
||||
'If ClienteEsDistribuidor Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(533).ToEntero > 0 Then
|
||||
Dim CvePSPSA As Integer = UsuarioActual.Empresa.Funcionalidad(533).ToEntero
|
||||
|
||||
@@ -1785,19 +1813,9 @@ Namespace Modelos
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
Resultado = False
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
ErrorList.Add("El cliente es Distribuidor y no se tiene un producto o servicio asigando como PS Acumulador")
|
||||
Resultado = False
|
||||
End If
|
||||
'Else
|
||||
' Resultado = True
|
||||
'End If
|
||||
|
||||
Return Resultado
|
||||
|
||||
@@ -8258,6 +8276,7 @@ Namespace Modelos
|
||||
|
||||
Public Property CveContratoSecciones As String
|
||||
Public Property CveEstatus As Integer
|
||||
Public Property GenerarPDFFactura As Boolean = False
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
@@ -6208,7 +6208,7 @@ Partial Class Compras_Compras
|
||||
Case 176
|
||||
Dim SumatoriaOCINV = 0.0D, Importe176 = 0.0D, ImporteME176 = 0.0D, ImporteMN176 = 0.0D, Importe228 = 0.0D, ImporteME228 = 0.0D, ImporteMN228 = 0.0D, Importe229 = 0.0D, ImporteME229 = 0.0D, ImporteMN229 = 0.0D, ImporteCI176 = 0.0D
|
||||
For Each Dr As DataRow In TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND ISNULL(CveTipoPS,0) = 2").Rows
|
||||
If ObjOC.OrdenesCompraDetalleCostoPP(Dr("CveOrdenCompraDetalle").ToString.ToEntero) AndAlso ObjOC.DtResultados.Rows.Count = 1 Then
|
||||
If ObjOC.OrdenesCompraDetalleCostoPP(Dr("CveOrdenCompraDetalle").ToString.ToEntero) AndAlso ObjOC.DtResultados.Rows.Count >= 1 Then
|
||||
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text} OC: {ObjOC.DtResultados.FiltroPrimeroValor("Folio").ToString} Inv:{ObjOC.DtResultados.FiltroPrimeroValor("FolioAlmacen").ToString}"
|
||||
Importe176 = ObjOC.DtResultados.FiltroPrimeroValor("Importe176").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteME176 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteME176").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteMN176 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteMN176").ToDecimal * Dr("Cantidad").ToString.ToDecimal
|
||||
Importe228 = ObjOC.DtResultados.FiltroPrimeroValor("Importe228").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteME228 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteME228").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteMN228 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteMN228").ToDecimal * Dr("Cantidad").ToString.ToDecimal
|
||||
@@ -15327,11 +15327,13 @@ Partial Class Compras_Compras
|
||||
TotalFlete = 0
|
||||
TotalAlmacen = 0
|
||||
|
||||
'Obtenemos el total del almacen y guardamos las consecutivas pertenecientes al mismo
|
||||
For Each Dr2 As DataRow In DtInv.Rows
|
||||
TotalAlmacen += Math.Round(Dr2("Total").ToString.ToDecimal, 2)
|
||||
ListaConsecutivas.Add(Dr2("Consec").ToString)
|
||||
Next
|
||||
If DtInv IsNot Nothing Then
|
||||
'Obtenemos el total del almacen y guardamos las consecutivas pertenecientes al mismo
|
||||
For Each Dr2 As DataRow In DtInv.Rows
|
||||
TotalAlmacen += Math.Round(Dr2("Total").ToString.ToDecimal, 2)
|
||||
ListaConsecutivas.Add(Dr2("Consec").ToString)
|
||||
Next
|
||||
End If
|
||||
|
||||
'sino hay producto en almacen para aplciarle un servicio, no se debe de amrcar como costo indirecto
|
||||
'esto aplica cuando la factura solo trae un concepto, y es el de servicio
|
||||
|
||||
@@ -68,7 +68,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
||||
{
|
||||
GvT.DataSource = ObjCont.DtResultados;
|
||||
DtIVATrasladado = ObjCont.DtResultados;
|
||||
if(ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvIEPSA.DataSource = ObjCont.DtResultados;
|
||||
}
|
||||
@@ -77,7 +77,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
||||
{
|
||||
GvIVAA.DataSource = ObjCont.DtResultados;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (ObjCont.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 2, UsuarioActual.CveUsuario, Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico))
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -197,6 +197,22 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Set(value As Integer)
|
||||
ViewState("FolioAsignado") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveRemisionRecibida As Integer
|
||||
Get
|
||||
Return IfNull(ViewState("CveRemisionRecibida"), -1, CType(ViewState("CveRemisionRecibida"), Integer)).ToString().ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveRemisionRecibida") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property EsDistribuidor As Boolean
|
||||
Get
|
||||
Return CBool(IfNull(ViewState("EsDistribuidor"), False, CBool(ViewState("EsDistribuidor"))))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("EsDistribuidor") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
@@ -270,6 +286,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
CreaDT()
|
||||
CargaCombos()
|
||||
TxtFecha.Text = Now.ToShortDateString
|
||||
TxtFechaPendientes.Text = Now.ToShortDateString
|
||||
RVFecha.MaximumValue = Now.ToShortDateString
|
||||
InicializaClientes()
|
||||
|
||||
@@ -298,6 +315,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
End If
|
||||
End If
|
||||
|
||||
CargaSubProyectosUsados()
|
||||
InicializaBitacoraTemporal()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(132) = "1" Then
|
||||
@@ -506,9 +524,31 @@ Partial Class Inventarios_RecepcionUsados
|
||||
End Sub
|
||||
Private Sub CargaSubProyectos()
|
||||
DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1))
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.DataBind()
|
||||
|
||||
|
||||
'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaSubProyectosUsados()
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
DivRecepcionUsados.Visible = True
|
||||
|
||||
If Not UsuarioActual.TienePermisoProceso(190) Then
|
||||
'CARGA SOLO LAS SUCURSALES DE LOS ALMCENES QUE TIENE ASIGNADO EL USUARIO
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.GetSucursalesAlmacenUsuario(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
DdlSubProyectos.DataSource = ObjInventarios.DtResultados
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
Else
|
||||
DdlSubProyectos.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
End If
|
||||
DdlSubProyectos.DataBind()
|
||||
DdlSubProyectos.SelectedValueExist(UsuarioActual.CveSubProyecto.ToString)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub CargaPersonal()
|
||||
TrPersonal.Visible = True
|
||||
Dim dt As DataTable = Nothing
|
||||
@@ -940,16 +980,12 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
End Sub
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
|
||||
|
||||
|
||||
If GvM.Rows.Count > 0 Then
|
||||
|
||||
'Dim CveMovimiento As Integer
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
Dim ObjAcum As New ClsAcumuladores(ObjInventario.IniciaTransacSQL())
|
||||
|
||||
Dim ObjVentas As New ClsVentas(ObjInventario.IniciaTransacSQL())
|
||||
|
||||
Dim ErrorMovInv As Boolean = False
|
||||
Dim ErrorAC As Boolean = False
|
||||
@@ -978,9 +1014,12 @@ Partial Class Inventarios_RecepcionUsados
|
||||
End If
|
||||
Dim tCveProveedor As Integer = -1
|
||||
If DdlProveedor.SelectedValue.ToEntero > 0 Then tCveProveedor = DdlProveedor.SelectedValue.ToEntero
|
||||
|
||||
Dim CveVenta As Integer = -1
|
||||
If CveRemisionRecibida > 0 Then
|
||||
CveVenta = CveRemisionRecibida
|
||||
End If
|
||||
'Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inv/ES", 53, 0, 0, 1, TxtFecha.Text.ToDate, $" {TxtObservaciones.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3)
|
||||
CveMovimiento = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, CveConcepto, 1, Fecha, tFolio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1,
|
||||
CveMovimiento = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, CveConcepto, 1, Fecha, tFolio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta,
|
||||
CveSubProyecto, ActivoFijo, Guia:=TxtGuia.Text, Observaciones:=TxtObservaciones.Text, CvePersonal:=DdlPersonal.SelectedValue.ToEntero,
|
||||
Recibio:=TxtResponsable.Text.Trim, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, DepartamentoEntrega:=TxtDepartamentoEntrega.Text,
|
||||
PedidoContrato:=TxtPedidoContrato.Text, CveProveedor:=tCveProveedor)
|
||||
@@ -1007,23 +1046,31 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If Not ObjVentas.UpdateVentaUsadoRecibido(CveRemisionRecibida, Dr("CvePS").ToString.ToEntero, True) Then
|
||||
Mensaje = "Error al actualizar el recibo de los usados"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Dim CveConceptoUsados As Integer = If(RBLOpcion.SelectedValue.ToEntero = 2, 1, 2)
|
||||
|
||||
|
||||
If RBLOpcion.SelectedValue.ToEntero <> 3 Then
|
||||
|
||||
If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, -1, UsuarioActual.CveUsuario,
|
||||
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then
|
||||
|
||||
|
||||
'CveCliente As Integer, Cantidad As Integer, CveTamaño As Integer, CveConcepto As Integer, CveVenta As Integer, CveUsuario As Integer,
|
||||
'CveEmpresa As Integer, ImporteCompras As Decimal, Observaciones As String
|
||||
|
||||
Mensaje = "Error al guardar Movimientos de distribuidor"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
If EsDistribuidor Then
|
||||
If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, -1, UsuarioActual.CveUsuario,
|
||||
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then
|
||||
|
||||
|
||||
'CveCliente As Integer, Cantidad As Integer, CveTamaño As Integer, CveConcepto As Integer, CveVenta As Integer, CveUsuario As Integer,
|
||||
'CveEmpresa As Integer, ImporteCompras As Decimal, Observaciones As String
|
||||
|
||||
Mensaje = "Error al guardar Movimientos de distribuidor"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -1091,11 +1138,11 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Alert("No hay ningun registro para generar el movimiento. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgError)
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " ADD INVENTARIO INICIAL "
|
||||
Protected Sub BtnCodigoBarras_Click(sender As Object, e As EventArgs)
|
||||
|
||||
@@ -1931,6 +1978,64 @@ Partial Class Inventarios_RecepcionUsados
|
||||
End If
|
||||
SiguienteFolio()
|
||||
UpGenerales.Update()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultarPendientes_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetVentasUsados(-1, DdlSubProyectos.SelectedValue.ToEntero(), TxtFechaPendientes.Text.ToDateTime(), UsuarioActual.CveEmpresa) Then
|
||||
GVPendientes.DataSource = ObjVentas.DtResultados
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
GVPendientes.DataBind()
|
||||
|
||||
UpGenerales.Update()
|
||||
End Sub
|
||||
Protected Sub BtnRecibir_Click(sender As Object, e As EventArgs)
|
||||
DtMovimientos.Rows.Clear()
|
||||
|
||||
Me.CveRemisionRecibida = -1
|
||||
Me.CveRemisionRecibida = CType(CType(sender, LinkButton).NamingContainer, GridViewRow).DataKey("CveVenta").ToEntero()
|
||||
|
||||
|
||||
Dim DtUsados As DataTable = Nothing
|
||||
Dim CveCliente As Integer = -1
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetVenta(CveRemisionRecibida, UsuarioActual.CveEmpresa) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
EsDistribuidor = CBool(ObjVentas.DtResultados.Rows(0)("EsDistribuidor").ToString())
|
||||
CveCliente = ObjVentas.DtResultados.Rows(0)("CveCliente").ToString().ToEntero()
|
||||
End If
|
||||
|
||||
If EsDistribuidor Then
|
||||
DivCliente.Visible = True
|
||||
Else
|
||||
DivCliente.Visible = False
|
||||
End If
|
||||
DdlClientes.SelectedValueExist(CveCliente)
|
||||
|
||||
If ObjVentas.GetVentasUsadosDetalle(CveRemisionRecibida) Then
|
||||
DtUsados = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If DtUsados IsNot Nothing Then
|
||||
For Each RowUsado As DataRow In DtUsados.Rows
|
||||
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
|
||||
|
||||
Dim RowPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).Rows(0) '.FiltroPrimeroValor("CveTamaño", $"CvePS = { DdlProducto2.SelectedValue.ToEntero }").ToEntero
|
||||
Dim CveTamaño As Integer = RowPS("CveTamaño").ToString().ToEntero()
|
||||
|
||||
Dim PS As String = RowPS("PS").ToString()
|
||||
Dim CveUM As Integer = RowPS("CveUnidadMedida").ToString().ToEntero()
|
||||
Dim UM As String = RowPS("UnidadMedida").ToString()
|
||||
Dim Cantidad As Double = RowUsado("Cantidad").ToString().ToEntero()
|
||||
Dim PU As Double = RowUsado("PU").ToString().ToDouble()
|
||||
|
||||
AddNew(CvePS, PS, CveUM, UM, Cantidad, PU, "", "-1", "-1", "-1", "", "", "", DdlAlmacen.SelectedValue.ToEntero, DdlAlmacen.SelectedItem.Text, "", CveTamaño)
|
||||
|
||||
Next
|
||||
End If
|
||||
|
||||
UpGenerales.Update()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
21
LogMail.txt
21
LogMail.txt
@@ -4,23 +4,4 @@
|
||||
28/08/2019:05:48 p. m. No se especifico a remitente - SIG - Se Genero una Recepción de Usados con el folio: 80
|
||||
|
||||
02/09/2019:11:00 a. m. From:'signotificaciones@adssistemas.mx' - Para:'x@x.com' - Asunto:'Entrega de Factura SUCURSAL NARANJO SN-22' - CCP: '' - Adjuntos: 1
|
||||
|
||||
02/09/2019:11:00 a. m. From:'signotificaciones@adssistemas.mx' - Para:'japmx95@gmail.com' - Asunto:'Entrega de Factura SUCURSAL NARANJO SN-23' - CCP: '' - Adjuntos: 1
|
||||
|
||||
05/09/2019:11:02 a. m. From:'signotificaciones@adssistemas.mx' - Para:';' - Asunto:'Envío de complemento de pago' - CCP: '' - Adjuntos: 2
|
||||
- Ocurrió un error al mandar correo.System.InvalidOperationException: Se debe especificar un destinatario.
|
||||
en System.Net.Mail.SmtpClient.Send(MailMessage message)
|
||||
en ClsSisMail.FinalSend(Mail ObjMail) en C:\inetpub\WWWSIGIT\App_Code\ClsSisMail.vb:línea 129
|
||||
|
||||
05/09/2019:12:31 p. m. From:'signotificaciones@adssistemas.mx' - Para:';' - Asunto:'Envío de complemento de pago' - CCP: '' - Adjuntos: 2
|
||||
- Ocurrió un error al mandar correo.System.InvalidOperationException: Se debe especificar un destinatario.
|
||||
en System.Net.Mail.SmtpClient.Send(MailMessage message)
|
||||
en ClsSisMail.FinalSend(Mail ObjMail) en C:\inetpub\WWWSIGIT\App_Code\ClsSisMail.vb:línea 129
|
||||
|
||||
10/09/2019:12:16 p. m. From:'signotificaciones@adssistemas.mx' - Para:'DSDDS@hotmail.com' - Asunto:'SIG - La Orden Compra #26598 cambió de estatus.' - CCP: '' - Adjuntos: 0
|
||||
|
||||
10/09/2019:02:58 p. m. No se especifico a remitente - SIG - La Orden Compra #28107 cambió de estatus.
|
||||
|
||||
11/09/2019:11:56 a. m. From:'signotificaciones@adssistemas.mx' - Para:'antonio.gonzalez@adssistemas.mx' - Asunto:'Solicitud Vacaciones ' - CCP: '' - Adjuntos: 0
|
||||
|
||||
11/09/2019:12:35 p. m. From:'signotificaciones@adssistemas.mx' - Para:'antonio.gonzalez@adssistemas.mx' - Asunto:'(Vacaciones:Permisos) Asistencia Técnica AD Sistemas' - CCP: '' - Adjuntos: 0
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
<div class="caption font-green">
|
||||
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase"><a id="HlCliente" href="javascript:void(0);" runat="server" class="Texto" onclick="javascript:AbrirVentana('/Ventas/PopUpBuscarClientes.aspx?Opt=Fact&TipoCliente=2', 800, 547, 'N', 'PopUpBuscar')">Cliente: </a></span>
|
||||
<span class="caption-subject bold uppercase"><a id="HlCliente" href="javascript:void(0);" runat="server" class="Texto" onclick="javascript:AbrirVentana('/Ventas/PopUpBuscarClientes.aspx?Opt=Fact&TipoCliente=-1', 800, 547, 'N', 'PopUpBuscar')">Cliente: </a></span>
|
||||
<asp:LinkButton ID="LnkAgregarCliente" runat="server" AlternateText="Agregar Cliente" Text="<i class='fa fa-plus-square'></i>" />
|
||||
<asp:TextBox ID="TxtCodigo" runat="server" AutoPostBack="true" BorderStyle="None" Width="65px"></asp:TextBox>
|
||||
<asp:HiddenField ID="HdnCveCliente" runat="server" ClientIDMode="Static" Value="-1" />
|
||||
@@ -338,7 +338,6 @@
|
||||
<asp:ListItem Value="Ing" Text="Ingresos" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Value="Ant" Text="Anticipos"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
</td>
|
||||
<%--<td id="TdReferencia" runat="server" style="display: none;"> Ref: <asp:TextBox ID="TxtDocto" runat="server" ToolTip="Referencia (Número de factura original)" Width="40px"></asp:TextBox></td>--%>
|
||||
<td runat="server" id="TdOrdenPago" visible="false">
|
||||
@@ -1208,7 +1207,7 @@
|
||||
<ajax:FilteredTextBoxExtender ID="FTBECambio" runat="server" TargetControlID="TxtCambio" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
<br></br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1503,7 +1502,7 @@
|
||||
<asp:Literal ID="LtlRecepcionUsados" Text="Recepcion Usados" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:GridView ID="GvRecepcionUsados" runat="server" GridLines="None" ShowHeaderWhenEmpty="true" CssClass="table table-hover table-striped ScrollAD mysmallbtn" Width="100%" data-sort="true" AutoGenerateColumns="False"
|
||||
<asp:GridView ID="GvRecepcionUsadosModal" runat="server" GridLines="None" ShowHeaderWhenEmpty="true" CssClass="table table-hover table-striped ScrollAD mysmallbtn" Width="100%" data-sort="true" AutoGenerateColumns="False"
|
||||
DataKeyNames="CvePSCargo,CveUM,Cargo">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="CodigoPS" HeaderText="Producto/Servicio" ItemStyle-HorizontalAlign="Left" />
|
||||
@@ -2620,7 +2619,7 @@
|
||||
<asp:HiddenField ID="HdnPorcentajeIEPS" runat="server" Value="-1" />
|
||||
<asp:HiddenField ID="HdnCvePS" runat="server" Value="-1" />
|
||||
|
||||
<div class="row">
|
||||
<div class="row" runat="server" visible="false">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlClasificacion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" OnSelectedIndexChanged="DdlClasificacion_SelectedIndexChanged">
|
||||
@@ -2643,7 +2642,7 @@
|
||||
<br />
|
||||
<asp:UpdatePanel runat="server" ID="UpUnidadMedida" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<div runat="server" visible="false" class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlUnidadMedida" AppendDataBoundItems="true" CssClass="form-control input-sm select2me " runat="server" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" Style="width: 100%;"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVUnidadMedida" runat="server" ControlToValidate="DdlUnidadMedida" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad de Medida''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEUnidadMedida" runat="server" HighlightCssClass="vco" TargetControlID="RFVUnidadMedida" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
@@ -2653,12 +2652,30 @@
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
<div>
|
||||
<label>Observación:</label>
|
||||
<br />
|
||||
<asp:TextBox ID="TxtObsPS" runat="server" Height="50" Width="398px" TextMode="MultiLine" CausesValidation="true" MaxLength="500"></asp:TextBox>
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
<label>Observación:</label>
|
||||
<br />
|
||||
<asp:TextBox ID="TxtObsPS" runat="server" Height="100%" Width="100%" TextMode="MultiLine" CausesValidation="true" MaxLength="500"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-md-5" id="DivRecepcionUsados" runat="server" visible="false">
|
||||
<asp:GridView ID="GvRecepcionUsados" runat="server" GridLines="None" ShowHeaderWhenEmpty="true" CssClass="table table-hover table-striped ScrollAD mysmallbtn"
|
||||
data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" data-height="100"
|
||||
DataKeyNames="CvePSCargo,CveUM,Cargo,CveTamaño">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="CodigoPS" HeaderText="Tamaño" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="70%" />
|
||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="30%" >
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidad" runat="server" Width="80%"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBECantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPrecio" runat="server" onkeypress="setFocus(event,'LbAgregar');" onkeyup="Recalcula();" CausesValidation="true" lang="nb" ClientIDMode="Static" Text="0.00" MaxLength="12" ValidationGroup="GrpAddVenta" Width="76px" CssClass="form-control "></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="TxtPrecio" FilterType="Custom, Numbers" ValidChars="." />
|
||||
@@ -2729,7 +2746,7 @@
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPUFactura" CssClass="form-control" runat="server" MaxLength="50" ></asp:TextBox>
|
||||
<asp:TextBox ID="TxtPUFactura" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVPUFactura" runat="server" ControlToValidate="TxtPUFactura" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''PU Factura''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPUFactura" runat="server" HighlightCssClass="vco" TargetControlID="RFVPUFactura"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBEPUFactura" runat="server" TargetControlID="TxtPUFactura" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
@@ -3522,7 +3539,7 @@
|
||||
function CambiaAjuste(txt, txtajuste) {
|
||||
Recalcula();
|
||||
if (txtajuste != null) {
|
||||
txtajuste.value = ToDouble(txt.value)
|
||||
txtajuste.value = ToDouble(txt.value)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4102,6 +4102,13 @@ Partial Class Ventas
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Rem") And GvRemisiones.Rows.Count > 0 Then
|
||||
LbCancelarDocumento.Visible = False
|
||||
End If
|
||||
|
||||
'SI TIENE REMISIONES Y VA A CANCELAR ES NECESARIO EL MOVIMIENTO DE DEVOLUCION
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant") AndAlso GvRemisiones.Rows.Count > 0 Then
|
||||
ChkDevAlm.Checked = True
|
||||
ChkDevAlm.Enabled = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
tdVigencia.Visible = DdlTipoComprobante.SelectedValue.Contiene("Cot")
|
||||
@@ -9033,7 +9040,7 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
If DTRemisiones IsNot Nothing AndAlso DTRemisiones.Rows.Count > 0 AndAlso ErrorList.Count = 0 Then
|
||||
If DTRemisiones IsNot Nothing AndAlso DTRemisiones.Rows.Count > 0 AndAlso ErrorList.Count = 0 AndAlso factura.TipoDocto.Contiene("Ing", "Ant") Then
|
||||
|
||||
Dim dt As DataTable = DTRemisiones.FiltraParametros("Aplicado = True")
|
||||
If dt.Rows.Count > 0 Then
|
||||
@@ -17779,6 +17786,7 @@ Partial Class Ventas
|
||||
Next
|
||||
End If
|
||||
|
||||
ObjFactura.CveAlmacenDevolucion = CveAlmacenDevolucion
|
||||
If ChkDevAlm.Checked Then
|
||||
ObjFactura.CveAlmacenDevolucion = CveAlmacenDevolucion
|
||||
End If
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@ WebService Language="VB" Class="WSApp" %>
|
||||
|
||||
<%@ WebService Language="VB" Class="WSApp" %>
|
||||
|
||||
Option Explicit On
|
||||
|
||||
Imports System.Data
|
||||
@@ -22,9 +22,9 @@ Imports Newtonsoft.Json.Linq
|
||||
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)>
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Public Class WSApp
|
||||
Inherits System.Web.Services.WebService
|
||||
Inherits System.Web.Services.WebService
|
||||
#Region "G L O B A L - D T"
|
||||
|
||||
|
||||
Public ReadOnly Property UrlSitio As String
|
||||
Get
|
||||
Return ConfigurationManager.AppSettings("UrlSitio").ToString
|
||||
@@ -436,9 +436,9 @@ Public Class WSApp
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTMotivosHorasExtras") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
Public Property CveEmpresa As Integer = 143
|
||||
|
||||
Private Sub CreaObjetoEmpresa(ByRef UsuarioActual As Usuario)
|
||||
@@ -459,7 +459,7 @@ Public Class WSApp
|
||||
Else
|
||||
End If
|
||||
ObjEmpresa.Dispose()
|
||||
End Sub
|
||||
End Sub
|
||||
#Region "M E T O D O S - S E R V I C I O"
|
||||
Public Function ValidaUsuario(CveUsuario As Integer) As Usuario
|
||||
Dim UsuarioActual As Usuario = Nothing
|
||||
@@ -794,9 +794,9 @@ Public Class WSApp
|
||||
Retorno.Mensajes.Add("Ocurrió un error al eliminar el movimiento. Por favor vuelva a intetar.")
|
||||
End If
|
||||
ObjInv.Dispose()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "P E D I D O S"
|
||||
Private Function PreParaTimbre(Obj As Modelos.Factura) As CFDITimbre
|
||||
Dim Timbre As New CFDITimbre
|
||||
@@ -910,9 +910,9 @@ Public Class WSApp
|
||||
i += 1
|
||||
Next
|
||||
Return Timbre
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "R E M I S I O N E S"
|
||||
Private Function CreaFactura(ByRef Retorno As Modelos.Factura.MMensajeFactura, CveCliente As Integer, CveAlmacen As Integer, CveSubProyecto As Integer, CveMoneda As Integer, UsuarioActual As Usuario, Observaciones As String, ListaPS As List(Of MVentaProductos)) As Modelos.Factura
|
||||
If CveSubProyecto <= 0 Then
|
||||
@@ -1073,7 +1073,12 @@ Public Class WSApp
|
||||
ObjFactura.Total = Total
|
||||
|
||||
ObjFactura.Timbre = PreParaTimbre(ObjFactura)
|
||||
ObjFactura.CveContratoSecciones = ""
|
||||
ObjFactura.CveContratoSecciones = ""
|
||||
|
||||
'BORRAR
|
||||
ObjFactura.DtRecepcionUsados = New DataTable
|
||||
ObjFactura.DtRecepcionUsados.Columns.Add("CvePS", GetType(Integer))
|
||||
|
||||
Catch ex As Exception
|
||||
Retorno.Mensajes.Add(ex.ToString())
|
||||
Return Nothing
|
||||
@@ -1165,7 +1170,9 @@ Public Class WSApp
|
||||
TmpDT.Columns.Add("ClaveSATFraccionArancelaria", GetType(String))
|
||||
TmpDT.Columns.Add("ClaveSATUnidadAduana", GetType(String))
|
||||
TmpDT.Columns.Add("ClaveSATFraccionArancelariaDescripcion", GetType(String))
|
||||
TmpDT.Columns.Add("ClaveSATUnidadAduanaDescripcion", GetType(String))
|
||||
TmpDT.Columns.Add("ClaveSATUnidadAduanaDescripcion", GetType(String))
|
||||
|
||||
TmpDT.Columns.Add("CveTamaño", GetType(Double))
|
||||
|
||||
Try
|
||||
For Each PS As MVentaProductos In ListaPS
|
||||
@@ -1434,9 +1441,9 @@ Public Class WSApp
|
||||
End Try
|
||||
ObjVentas.Dispose()
|
||||
Return strBody.ToString
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Namespace WebServiceAppModels2
|
||||
|
||||
Reference in New Issue
Block a user