.
This commit is contained in:
@@ -1445,7 +1445,7 @@ Public Class ClsVentas
|
||||
CveVendedor As String, CveUsuario As Integer, CveEstatus As String, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1",
|
||||
Optional CveProyecto As Integer = -1, Optional CveSubProyecto As String = "-1", Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveUsuarioConsulta As Integer = -1,
|
||||
Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False,
|
||||
Optional EsDistribuidor As Integer = -1) As Boolean
|
||||
Optional EsDistribuidor As Integer = -1, Optional CveTipoRelacion As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasGetRep")
|
||||
|
||||
@@ -1474,6 +1474,7 @@ Public Class ClsVentas
|
||||
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
|
||||
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
|
||||
.Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable
|
||||
.Add("@CveTipoRelacion", SqlDbType.Int).Value = CveTipoRelacion
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -1580,7 +1581,7 @@ Public Class ClsVentas
|
||||
CveSubProyectoEjecucion As Integer, CveEmpresa As Integer, FechaIEjec As Date, FechaFEjec As Date, Optional CveProyecto As Integer = -1,
|
||||
Optional CveSubProyecto As String = "-1", Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveMoneda As Integer = -1, Optional CveUsuarioConsulta As Integer = -1,
|
||||
Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False,
|
||||
Optional EsDistribuidor As Integer = -1) As Boolean
|
||||
Optional EsDistribuidor As Integer = -1, Optional CveTipoRelacion As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasGetRepDetalle")
|
||||
|
||||
@@ -1614,6 +1615,7 @@ Public Class ClsVentas
|
||||
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
|
||||
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
|
||||
.Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable
|
||||
.Add("@CveTipoRelacion", SqlDbType.Int).Value = CveTipoRelacion
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4624,8 +4624,8 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
|
||||
Else
|
||||
Dim Resp As RespuestaCancelacionSAT = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion)
|
||||
If Resp.Verificado Then
|
||||
Dim respCancelacion = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion)
|
||||
If respCancelacion.Verificado Then
|
||||
|
||||
If Banc.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
|
||||
CargaComplementosPago()
|
||||
@@ -6695,9 +6695,9 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
|
||||
Else
|
||||
Dim Resp As RespuestaCancelacionSAT = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion)
|
||||
|
||||
If Resp.Verificado Then
|
||||
Dim resp = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion)
|
||||
If resp.Verificado Then
|
||||
|
||||
If ObjBanco.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
|
||||
|
||||
|
||||
@@ -596,8 +596,8 @@ Partial Class Bancos_RepComplementoPago
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
If ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, Can_FolioFiscalCancelar, 0, Can_RFCReceptorCancelar, UsuarioActual.Empresa.RFC, Can_CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
|
||||
Dim resp = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, Can_FolioFiscalCancelar, 0, Can_RFCReceptorCancelar, UsuarioActual.Empresa.RFC, Can_CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion)
|
||||
If resp.Verificado Then
|
||||
|
||||
If ObjBanco.UpdateComplementoPago(Can_CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, Can_CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
|
||||
Alert("El complemento se cancelo correctamente.")
|
||||
|
||||
Binary file not shown.
@@ -88,8 +88,11 @@
|
||||
</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAddE" OnClientClick="javascript:$('#DivCrearApatir').modal({backdrop: 'static', keyboard: false}); return false;" Text="<i class='fa fa-plus'></i><span>Crear a partir de</span>" runat="server">
|
||||
</asp:LinkButton>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="LnkAddE" OnClick="LnkAddE_Click" Text="<i class='fa fa-plus'></i><span>Crear a partir de</span>" runat="server"></asp:LinkButton>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
@@ -146,7 +149,7 @@
|
||||
<asp:CheckBox ID="ChkTimmer" OnCheckedChanged="ChkTimmer_CheckedChanged" AutoPostBack="true" Text=" " runat="server" CssClass="chksino" Checked="true"></asp:CheckBox>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:Timer runat="server" ID="TimmerRefresh" Interval="30000" OnTick="TimmerRefresh_Tick"></asp:Timer>
|
||||
<asp:Timer runat="server" ID="TimmerRefresh" Interval="120000" OnTick="TimmerRefresh_Tick"></asp:Timer>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -37,9 +37,18 @@ Partial Class GPS_Trayectos
|
||||
Set(value As DataTable)
|
||||
ViewState("DtPosiciones") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
Private Property DtTrayectos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtTrayectos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtTrayectos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True
|
||||
@@ -52,7 +61,6 @@ Partial Class GPS_Trayectos
|
||||
CargaDispositivos()
|
||||
CargaGeoReferencias()
|
||||
CargaEstatus()
|
||||
CargaDdlTrayectos()
|
||||
|
||||
CargaTrayectos()
|
||||
End Sub
|
||||
@@ -98,28 +106,32 @@ Partial Class GPS_Trayectos
|
||||
|
||||
Dim CveEstatus As Integer = -1
|
||||
If ChkActivas.Checked AndAlso DdlEstatusTrayecto.SelectedValue.ToEntero() <= 0 Then
|
||||
CveEstatus = -2
|
||||
CveEstatus = -2
|
||||
Else
|
||||
CveEstatus = DdlEstatusTrayecto.SelectedValue.ToEntero()
|
||||
End If
|
||||
|
||||
Dim ObjGPS As New ClsGPS
|
||||
If ObjGPS.GetTrayectos(-1, DdlDispositivoFiltro.SelectedValue.ToEntero(), UsuarioActual.CveCliente, CveEstatus, FechaI, FechaF) Then
|
||||
GvBarra.DataSource = ObjGPS.DtResultados
|
||||
DtTrayectos = ObjGPS.DtResultados.Copy()
|
||||
End If
|
||||
ObjGPS.Dispose()
|
||||
|
||||
GvBarra.DataSource = DtTrayectos
|
||||
GvBarra.DataBind()
|
||||
UPGV.Update()
|
||||
End Sub
|
||||
Public Sub CargaDdlTrayectos()
|
||||
Dim ObjGPS As New ClsGPS
|
||||
If ObjGPS.GetTrayectos(-1, -1, UsuarioActual.CveCliente) Then
|
||||
DdlTrayecto.DataSource = ObjGPS.DtResultados.FiltraParametros("EsFin = True")
|
||||
End If
|
||||
ObjGPS.Dispose()
|
||||
Public Sub CargaDdlTrayectos()
|
||||
'Dim ObjGPS As New ClsGPS
|
||||
'If ObjGPS.GetTrayectos(-1, -1, UsuarioActual.CveCliente) Then
|
||||
' DdlTrayecto.DataSource = ObjGPS.DtResultados.FiltraParametros("EsFin = True")
|
||||
'End If
|
||||
'ObjGPS.Dispose()
|
||||
|
||||
DdlTrayecto.DataSource = DtTrayectos
|
||||
DdlTrayecto.DataBind()
|
||||
|
||||
UpAgregar.Update()
|
||||
UpDdlTrayecto.Update()
|
||||
End Sub
|
||||
Public Sub CargaEstatus()
|
||||
Dim ObjGPS As New ClsGPS
|
||||
@@ -469,5 +481,9 @@ Partial Class GPS_Trayectos
|
||||
TimmerRefresh.Enabled = ChkTimmer.Checked
|
||||
|
||||
UPGV.Update()
|
||||
End Sub
|
||||
End Sub
|
||||
Protected Sub LnkAddE_Click(sender As Object, e As EventArgs)
|
||||
CargaDdlTrayectos()
|
||||
RegistraScript("$('#DivCrearApatir').modal({backdrop: 'static', keyboard: false});")
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -62,7 +62,8 @@ public partial class Inventarios_RepTraspasoEmitido : ClsPaginas
|
||||
}
|
||||
|
||||
protected void LnkCancelarTraspaso_Click(object sender, EventArgs e)
|
||||
{
|
||||
{
|
||||
GridViewRow Gvr = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
Timbrado ObjCancelacion = new Timbrado();
|
||||
DateTime CancelacionFecha=MinFecha;
|
||||
int CveEstatusTimbrado = 0;
|
||||
|
||||
@@ -2064,20 +2064,25 @@ Partial Class Clientes
|
||||
DdlSucursalFormaPago33.DataSource = GlobalDTVtaFormaPago
|
||||
DdlSucursalFormaPago33.DataBind()
|
||||
End Sub
|
||||
Private Sub CargaComboCFDI()
|
||||
Private Sub CargaComboCFDI()
|
||||
Dim RegimenFiscalCliente = DdlRegimenFiscal.SelectedValue.ToString()
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) <> "1" Then
|
||||
RegimenFiscalCliente = "-1"
|
||||
End If
|
||||
|
||||
DdlUsoCFDI.Items.Clear()
|
||||
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica)
|
||||
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||
DdlUsoCFDI.DataBind()
|
||||
DdlUsoCFDI.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlSucursalUsoCFDI.Items.Clear()
|
||||
DdlSucursalUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica)
|
||||
DdlSucursalUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||
DdlSucursalUsoCFDI.DataBind()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "V E R M Á S"
|
||||
|
||||
|
||||
Protected Sub BtnVerMasVentas_Click(sender As Object, e As EventArgs)
|
||||
If BtnVerMasVentas.Text = "Ver Más" Then
|
||||
CargaHistorial(-1)
|
||||
|
||||
@@ -758,6 +758,15 @@ Partial Class PV
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CantidadAntesEdicion As Decimal
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CantidadAntesEdicion")), "0", ViewState("CantidadAntesEdicion").ToString()).ToDecimal()
|
||||
End Get
|
||||
Set(value As Decimal)
|
||||
ViewState("CantidadAntesEdicion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "PROPIEDADES CONTRATOS"
|
||||
@@ -1071,6 +1080,7 @@ Partial Class PV
|
||||
ViewState("ClienteRetIVA") = 0
|
||||
ViewState("ClienteRetISR") = 0
|
||||
ViewState("EnviarCorreoCliente") = False
|
||||
Me.CantidadAntesEdicion = 0
|
||||
HdnPorcentajeDescuentoMaximo.Value = If(UsuarioActual.DescuentoAutorizado > 0, UsuarioActual.DescuentoAutorizado, 15).ToString()
|
||||
CveVentaDetalle = -1
|
||||
EstablecioFolio = False
|
||||
@@ -5125,7 +5135,15 @@ Partial Class PV
|
||||
If DdlTipoComprobante.SelectedValue <> "Cot" Then
|
||||
'VALIDA EXISTENCIA
|
||||
If UsuarioActual.CveEmpresa.Contiene({1, 72, 80, 119, 140}) Then
|
||||
If Existencia - TmpDT.SUM("Cantidad", $"CvePS = {CvePS}") < TxtCantidad.Text.ToDouble Then
|
||||
Dim CantidadAgregada As Decimal = TmpDT.SUMD("Cantidad", $"CvePS = {CvePS}")
|
||||
|
||||
If Modalidad = "U" Then
|
||||
CantidadAgregada = CantidadAgregada - CantidadAntesEdicion + TxtCantidad.Text.ToDecimal()
|
||||
Else
|
||||
CantidadAgregada = CantidadAgregada + TxtCantidad.Text.ToDecimal()
|
||||
End If
|
||||
|
||||
If Existencia < CantidadAgregada Then
|
||||
Alert("No cuenta con la cantidad suficiente en inventario. Cuenta con " + Existencia.FormatoNumero(2) + ".", TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
End If
|
||||
@@ -5229,6 +5247,7 @@ Partial Class PV
|
||||
End Sub
|
||||
Private Sub CargaAgregar()
|
||||
Modalidad = "A"
|
||||
CantidadAntesEdicion = 0
|
||||
LnkAgregarPS.Text = "Agregar"
|
||||
CargaBCI()
|
||||
LimpiaAgregar()
|
||||
@@ -5268,6 +5287,7 @@ Partial Class PV
|
||||
End If
|
||||
DdlPSIndexChange(DdlPS.SelectedValue.ToEntero, DdlPS)
|
||||
DdlUnidadMedida.SelectedValueExist(GvRow.DataKey("CveUM"))
|
||||
CantidadAntesEdicion = GvRow.DataKey("Cantidad").ToDecimal()
|
||||
TxtCantidad.Text = GvRow.DataKey("Cantidad")
|
||||
|
||||
'Dim TotalCargos As Decimal = 0
|
||||
@@ -5324,6 +5344,9 @@ Partial Class PV
|
||||
RegistraScript("$('#DivAddVenta').modal({backdrop: 'static', keyboard: false});", "EdicionVenta")
|
||||
End Sub
|
||||
Protected Sub LnkAgregarPS_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
|
||||
If ChkAjuste.Checked Then
|
||||
Dim FolioGarantia As MFolioGarantiaMensaje = ValidaFolioGarantia(DdlPSAjuste.SelectedValue.ToEntero(), DdlFolioGarantia.SelectedValue.ToEntero())
|
||||
|
||||
@@ -5337,25 +5360,34 @@ Partial Class PV
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If String.IsNullOrEmpty(TxtAnioVehiculo.Text.Trim()) Then
|
||||
Alert("El campo año esta vacío.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
If DrPS IsNot Nothing Then
|
||||
'SOLO DEBE AGREGAR POLIZA VIRTUAL SI ES ACUMULADOR
|
||||
If DrPS("CveClasificacion").ToString().ToEntero().Contiene(20520, 20522, 20513, 20511, 20521, 20512, 20514, 20229) Then
|
||||
If String.IsNullOrEmpty(TxtAnioVehiculo.Text.Trim()) Then
|
||||
Alert("El campo año esta vacío.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If TxtAnioVehiculo.Text.ToDecimal() < 1900 Then
|
||||
Alert("El campo año debe ser mayor a 1900.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
If TxtAnioVehiculo.Text.ToDecimal() < 1900 Then
|
||||
Alert("El campo año debe ser mayor a 1900.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
If Not String.IsNullOrEmpty(TxtAnioVehiculo.Text.Trim()) Then
|
||||
If TxtAnioVehiculo.Text.ToDecimal() < 1900 Then
|
||||
Alert("El año del vehiculo del vehículo no tiene el formato correcto.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
If DrPS IsNot Nothing Then
|
||||
'SOLO DEBE AGREGAR POLIZA VIRTUAL SI ES ACUMULADOR
|
||||
If DrPS("CveClasificacion").ToString().ToEntero().Contiene(20520, 20522, 20513, 20511, 20521, 20512, 20514, 20229) Then
|
||||
If Not String.IsNullOrEmpty(TxtAnioVehiculo.Text.Trim()) Then
|
||||
If TxtAnioVehiculo.Text.ToDecimal() < 1900 Then
|
||||
Alert("El año del vehiculo del vehículo no tiene el formato correcto.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If AgregarPS() Then
|
||||
|
||||
@@ -308,6 +308,11 @@
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" />
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Relación:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoRelacion" CssClass=" form-control input-sm select2me" runat="server" Width="100%" DataTextField="SATTipoRelacion" DataValueField="CveTipoRelacion">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -125,7 +125,7 @@ Partial Class RepVentaDetalle
|
||||
|
||||
|
||||
Private Sub InicializaValores()
|
||||
Dim Grupo, CveCliente, CveSucursal, CveSubProyectoEjecucion, CveVendedor, CveUsuario, CveEstatusFactura, CveCorte, IVA, TipoDocto, CveClienteClasificacion, CveCondicionesPago As String
|
||||
Dim Grupo, CveCliente, CveSucursal, CveSubProyectoEjecucion, CveVendedor, CveUsuario, CveEstatusFactura, CveCorte, IVA, TipoDocto, CveClienteClasificacion, CveCondicionesPago, CveTipoRelacion As String
|
||||
Dim Anio, Mes, AnioMes, Fecha, FechaI, FechaF As String
|
||||
Dim AnioEjec, MesEjec, AnioMesEjec, FechaEjec, FechaIEjec, FechaFEjec As String
|
||||
'Dim CveSubProyecto As Integer
|
||||
@@ -162,6 +162,8 @@ Partial Class RepVentaDetalle
|
||||
CveMoneda = If(Request("CveMoneda") IsNot Nothing, Request("CveMoneda").ToString.ToEntero, -1).ToString.ToEntero
|
||||
TipoCliente = If(Request("TipoCliente") IsNot Nothing, Request("TipoCliente").ToString.ToEntero, -1).ToString.ToEntero
|
||||
|
||||
CveTipoRelacion = If(Request("CveTipoRelacion") IsNot Nothing, Request("CveTipoRelacion").ToString, "-1").ToString
|
||||
|
||||
DdlTipoCliente.SelectedValueExist(TipoCliente)
|
||||
|
||||
'LISTBOXS
|
||||
@@ -184,6 +186,8 @@ Partial Class RepVentaDetalle
|
||||
DdlVendedor.SelectedValuesIfExistM(CveVendedor)
|
||||
|
||||
DdlClienteClasificacion.SelectedValueExist(CveClienteClasificacion)
|
||||
DdlTipoRelacion.SelectedValueExist(CveTipoRelacion)
|
||||
|
||||
CargaClientes()
|
||||
DdlClientes.SelectedValue = CveCliente
|
||||
DdlUsuario.SelectedValueExist(CveUsuario)
|
||||
@@ -389,7 +393,12 @@ Partial Class RepVentaDetalle
|
||||
'Carga Clasificacion Cliente
|
||||
DdlClienteClasificacion.DataSource = GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClienteClasificacion.DataBind()
|
||||
DdlClienteClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlClienteClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
DdlTipoRelacion.DataSource = GlobalDTVtaTiposRelacion
|
||||
DdlTipoRelacion.DataBind()
|
||||
DdlTipoRelacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
CargaGrupo()
|
||||
CargaTipoCentroCosto()
|
||||
@@ -490,7 +499,7 @@ Partial Class RepVentaDetalle
|
||||
IVA, Vendedores, DdlUsuario.SelectedValue.ToEntero, Estatus, FechaI, FechaF,
|
||||
CveCorte.ToEntero, TipoComprobante, DdlSubProyectoEjecucion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FechaIEjec, FechaFEjec,
|
||||
CveProyecto, Sucursales, TipoCambio, TCEspecifico, CveMoneda, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero,
|
||||
CveCondicionesPago:=CveCondicionesPago, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=Not ChkLecturaAdmin.Checked) Then
|
||||
CveCondicionesPago:=CveCondicionesPago, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=Not ChkLecturaAdmin.Checked, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero()) Then
|
||||
DtVentas = AddRows(ObjVentas.DtResultados)
|
||||
ImgImprimir.Enabled = True
|
||||
GvDatos.DataSource = AddRows(ObjVentas.DtResultados)
|
||||
|
||||
@@ -299,7 +299,7 @@
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="divModalidadcontable" runat="server" visible="false">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Lectura administrativa:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" />
|
||||
@@ -312,6 +312,11 @@
|
||||
<asp:ListItem Text="No Distribuidor" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Relación:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoRelacion" CssClass=" form-control input-sm select2me" runat="server" Width="100%" DataTextField="SATTipoRelacion" DataValueField="CveTipoRelacion">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -520,7 +525,7 @@
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpHP" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<%-- <div class="row">
|
||||
<%-- <div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:RadioButtonList ID="RblIntervaloHP" runat="server" RepeatDirection="Horizontal" CssClass="input-group col-md-12" CellSpacing="100" OnSelectedIndexChanged="RblIntervaloHP_SelectedIndexChanged" AutoPostBack="true">
|
||||
<asp:ListItem Value="1" Class="one" Selected="True"><label><b>Semanal</b></label></asp:ListItem>
|
||||
|
||||
@@ -100,7 +100,7 @@ Partial Class Ventas_RepVentas
|
||||
|
||||
'SI ES EL USUARIO SISTEMA MOSTRAR LA MODALIDAD CONTABLE (TEMPORAL)
|
||||
'If UsuarioActual.CveUsuario = 100 Then
|
||||
divModalidadcontable.Visible = True
|
||||
'divModalidadcontable.Visible = True
|
||||
'End If
|
||||
|
||||
'Modalidad Cotizacion
|
||||
@@ -268,7 +268,11 @@ Partial Class Ventas_RepVentas
|
||||
'Carga Clasificacion Cliente
|
||||
DdlClienteClasificacion.DataSource = GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClienteClasificacion.DataBind()
|
||||
DdlClienteClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlClienteClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlTipoRelacion.DataSource = GlobalDTVtaTiposRelacion
|
||||
DdlTipoRelacion.DataBind()
|
||||
DdlTipoRelacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
@@ -321,7 +325,7 @@ Partial Class Ventas_RepVentas
|
||||
If ObjVentas.GetRepVentas(FechaI, FechaF, FechaIEjec, FechaFEjec, CveCliente, DdlSubProyectoEjecucion.SelectedValue.ToEntero, Vendedores,
|
||||
DdlUsuario.SelectedValue.ToEntero, Estatus, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, TipoComprobante, DdlProyecto.SelectedValue.ToEntero, Sucursales, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario,
|
||||
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable,
|
||||
EsDistribuidor:=DdlDistribuidor.selectedvalue.toentero) Then
|
||||
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero()) Then
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
DtVentas = ObjVentas.DtResultados
|
||||
Else
|
||||
@@ -507,7 +511,7 @@ Partial Class Ventas_RepVentas
|
||||
|
||||
|
||||
'LIGA A DETALLE
|
||||
Dim Liga As String = $"/Ventas/RepVentaDetalle.aspx?GPO={DdlGrupo.SelectedValue}&Anio={e.Row.DBCampo("Anio")}&Mes={e.Row.DBCampo("Mes")}&AnioMes={e.Row.DBCampo("AnioMes")}&Fecha={e.Row.DBCampo("Fecha")}&AnioEjec={e.Row.DBCampo("AnioEjec")}&MesEjec={e.Row.DBCampo("MesEjec")}&AnioMesEjec={e.Row.DBCampo("AnioMesEjec")}&FechaEjec={e.Row.DBCampo("FechaEjec")}&CveCliente={e.Row.DBCampo("CveCliente")}&CveVendedor={ e.Row.DBCampo("CveVendedor")}&CveUsuario={e.Row.DBCampo("CveUsuario")}&CveEstatusFactura={e.Row.DBCampo("CveEstatusFactura")}&FechaI={FechaInicial}&FechaF={FechaFinal}&FechaIEjec={FechaIEjec}&FechaFEjec={FechaFEjec}&IVA={e.Row.DBCampo("GPO_IVA")}&CveCorte={ e.Row.DBCampo("CveCorte")}&TipoDocto={ DdlTipoComprobante.GetSelectedValuesM}&CveSubProyectoEjecucion={e.Row.DBCampo("CveSubProyectoEjecucion")}&CveSubProyecto={CveSubProyecto}&CveProyecto={CveProyecto}&TipoCambio={TipoCambio}&TCEspecifico={TCEspecifico}&CveMoneda={CveMoneda}&CveClienteClasificacion={e.Row.DBCampo("CveClienteClasificacion")}&CveCondicionesPago={DdlCondicionesPago.SelectedValue}&TipoCliente={ If(DdlGrupo.SelectedValue.ToEntero = 20, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue)}&ModalidadContable={If(ChkLecturaAdmin.Checked, 0, 1)}"
|
||||
Dim Liga As String = $"/Ventas/RepVentaDetalle.aspx?GPO={DdlGrupo.SelectedValue}&Anio={e.Row.DBCampo("Anio")}&Mes={e.Row.DBCampo("Mes")}&AnioMes={e.Row.DBCampo("AnioMes")}&Fecha={e.Row.DBCampo("Fecha")}&AnioEjec={e.Row.DBCampo("AnioEjec")}&MesEjec={e.Row.DBCampo("MesEjec")}&AnioMesEjec={e.Row.DBCampo("AnioMesEjec")}&FechaEjec={e.Row.DBCampo("FechaEjec")}&CveCliente={e.Row.DBCampo("CveCliente")}&CveVendedor={ e.Row.DBCampo("CveVendedor")}&CveUsuario={e.Row.DBCampo("CveUsuario")}&CveEstatusFactura={e.Row.DBCampo("CveEstatusFactura")}&FechaI={FechaInicial}&FechaF={FechaFinal}&FechaIEjec={FechaIEjec}&FechaFEjec={FechaFEjec}&IVA={e.Row.DBCampo("GPO_IVA")}&CveCorte={ e.Row.DBCampo("CveCorte")}&TipoDocto={ DdlTipoComprobante.GetSelectedValuesM}&CveSubProyectoEjecucion={e.Row.DBCampo("CveSubProyectoEjecucion")}&CveSubProyecto={CveSubProyecto}&CveProyecto={CveProyecto}&TipoCambio={TipoCambio}&TCEspecifico={TCEspecifico}&CveMoneda={CveMoneda}&CveClienteClasificacion={e.Row.DBCampo("CveClienteClasificacion")}&CveCondicionesPago={DdlCondicionesPago.SelectedValue}&TipoCliente={ If(DdlGrupo.SelectedValue.ToEntero = 20, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue)}&ModalidadContable={If(ChkLecturaAdmin.Checked, 0, 1)}&CveTipoRelacion={DdlTipoRelacion.SelectedValue}"
|
||||
|
||||
|
||||
e.Row.FCLiteral("LtlGrupo").Text = "<a class=""" & Css & """ href=""" & Liga & """>" & e.Row.FCLiteral("LtlGrupo").Text & "</a>"
|
||||
|
||||
@@ -1080,7 +1080,7 @@
|
||||
<asp:Literal ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad") %>' Visible="false"></asp:Literal>
|
||||
<asp:Literal ID="LtlTipoDescuento" runat="server" Text='<%# Eval("TipoDescuento") %>' Visible="false"></asp:Literal>
|
||||
<asp:Literal ID="LtlDescuento" runat="server" Text='<%# Eval("Descuento") %>' Visible="false"></asp:Literal>
|
||||
<asp:TextBox ID="TxtCantidad" runat="server" CausesValidation="true" MaxLength="12" Text='<%# Eval("Cantidad") %>' ValidationGroup="GprGV" Width="45px" Height="24px"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCantidad" runat="server" CausesValidation="true" MaxLength="12" Text='<%# Eval("Cantidad", "{0:####.######}") %>' ValidationGroup="GprGV" Width="45px" Height="24px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCantidad" runat="server" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GprGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCantidad1" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:CustomValidator ID="CVCantidadEdit" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GprGV"></asp:CustomValidator>
|
||||
@@ -1186,7 +1186,7 @@
|
||||
<asp:Literal ID="LtlDesc" runat="server" Text='<%# Eval("Descuento", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtDescuento" runat="server" CausesValidation="true" MaxLength="12" Text='<%# Eval("Descuento") %>' ValidationGroup="GprGV" Width="60px" Height="24px"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtDescuento" runat="server" CausesValidation="true" MaxLength="12" Text='<%# Eval("Descuento", "{0:0.00####}") %>' ValidationGroup="GprGV" Width="60px" Height="24px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTESoloNumeros" runat="server" TargetControlID="TxtDescuento" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator ID="RFVDescuento" runat="server" ControlToValidate="TxtDescuento" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descuento''</b> es necesario, por favor ingréselo." ValidationGroup="GprGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCDescuento" runat="server" HighlightCssClass="vco" TargetControlID="RFVDescuento" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
@@ -2576,6 +2576,9 @@ Partial Class Ventas
|
||||
DdlSubProyectoDatos.Enabled = False
|
||||
BtnEmitirImprimir.Visible = False
|
||||
BtnCrearApartirDe.Visible = True
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
BtnCrearApartirDe.Visible = False
|
||||
End If
|
||||
If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue = "Ing" Then BtnEditar.Visible = True
|
||||
'DdlEstatus.Enabled = True
|
||||
|
||||
@@ -2863,6 +2866,9 @@ Partial Class Ventas
|
||||
|
||||
'DdlSucursal.Enabled = False
|
||||
BtnCrearApartirDe.Visible = True
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
BtnCrearApartirDe.Visible = False
|
||||
End If
|
||||
'DdlEstatus.Enabled = True
|
||||
|
||||
ImgAddObs.Visible = True
|
||||
@@ -15973,6 +15979,7 @@ Partial Class Ventas
|
||||
If UsuarioActual.Empresa.EstatusFacturacion Then
|
||||
|
||||
CreaObjetosVenta()
|
||||
|
||||
'PARA CUANDO YA ESTA GUARDADA LA VENTA
|
||||
ObjFactura.CveVenta = CveVenta
|
||||
ObjFactura.Serie = Serie
|
||||
@@ -16177,11 +16184,14 @@ Partial Class Ventas
|
||||
Dim RFCReceptor As String = GvRow.DataKey("RFCReceptor")
|
||||
Dim CvePACCancelacion As Integer = GvRow.DataKey("CvePAC").ToEntero()
|
||||
|
||||
If ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, 0, RFCReceptor, RFCEmisor, CvePACCancelacion) Then
|
||||
|
||||
Dim RespCancelacion = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, 0, RFCReceptor, RFCEmisor, CvePACCancelacion)
|
||||
|
||||
If RespCancelacion.Verificado Then
|
||||
|
||||
If ObjBanco.UpdateComplementoPago(CveComplementoPago, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse) Then
|
||||
CargaComplementosPago()
|
||||
Alert("El complemento se cancelo correctamente.")
|
||||
Alert("El complemento se canceló correctamente.")
|
||||
End If
|
||||
|
||||
Else
|
||||
@@ -16413,8 +16423,8 @@ Partial Class Ventas
|
||||
If Not ObjVentas.UpdateEstatusFactura(13, FolioFiscal, "", Now, CveVenta, IDPoliza) Then 'Marcamos la factura como refacturada, si no se cancelo en el SAT el estatus nos dejara cancelarla despues
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
|
||||
If ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, Total, RFCReceptor, UsuarioActual.Empresa.RFC) Then
|
||||
Dim RespCancelacion = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, Total, RFCReceptor, UsuarioActual.Empresa.RFC)
|
||||
If RespCancelacion.Verificado Then
|
||||
'falta verificar traer el acuse y reenviarlo
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
@@ -17199,8 +17209,8 @@ Partial Class Ventas
|
||||
DdlIVA.SelectedValue = "1"
|
||||
PorcentajeIVA = ViewState("IVA").ToString().ToDecimal
|
||||
Case 0.08
|
||||
DdlIVA.SelectedValue = If(EsCreaApartirDe, $"{(TmpDT.MAX("PorcentajeIVA").ToDecimal + 1).ToString()}", "1.08")
|
||||
PorcentajeIVA = If(EsCreaApartirDe, TmpDT.MAX("PorcentajeIVA").ToDecimal, ViewState("IVA").ToString().ToDecimal)
|
||||
DdlIVA.SelectedValue = If(EsCreaApartirDe, $"{(TmpDT.MAX("PorcentajeIVA").ToDecimal() + 1).RoundSQL(2).ToString()}", "1.08")
|
||||
PorcentajeIVA = If(EsCreaApartirDe, TmpDT.MAX("PorcentajeIVA").ToDecimal, ViewState("IVA").ToString().ToDecimal).RoundSQL(2)
|
||||
DdlIVA.Visible = If(Not CveVenta > 0 Or EsCreaApartirDe Or CveDevolucion > 0, True, False)
|
||||
Case 0.16
|
||||
DdlIVA.SelectedValue = "1.16"
|
||||
@@ -23638,49 +23648,50 @@ Partial Class Ventas
|
||||
RegistraScript("$('#ModalCancelarDocumento').modal('hide');")
|
||||
End Sub
|
||||
|
||||
Private Sub CancelarRefacturada()
|
||||
Dim CancelacionFecha As Date
|
||||
Dim ObjVentas As New ClsVentas() : ObjVentas.IniciaTransacSQL()
|
||||
Dim CancelacionAcuse As String = ""
|
||||
Dim Mensaje As String = ""
|
||||
Dim ObjCancelacion As New Timbrado
|
||||
Dim TotalT As Decimal = TxtTotal.Text.ToDecimal
|
||||
Dim RFCReceptor As String = LblRFC.Text.Trim
|
||||
Dim CvePACCancelacion As Integer = CvePAC
|
||||
Dim CveEstatus As Integer = 4
|
||||
'Private Sub CancelarRefacturada()
|
||||
' Dim CancelacionFecha As Date
|
||||
' Dim ObjVentas As New ClsVentas() : ObjVentas.IniciaTransacSQL()
|
||||
' Dim CancelacionAcuse As String = ""
|
||||
' Dim Mensaje As String = ""
|
||||
' Dim ObjCancelacion As New Timbrado
|
||||
' Dim TotalT As Decimal = TxtTotal.Text.ToDecimal
|
||||
' Dim RFCReceptor As String = LblRFC.Text.Trim
|
||||
' Dim CvePACCancelacion As Integer = CvePAC
|
||||
' Dim CveEstatus As Integer = 4
|
||||
|
||||
Try
|
||||
If FolioFiscal <> "" Then
|
||||
If ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, TotalT, RFCReceptor, UsuarioActual.Empresa.RFC, CvePACCancelacion) Then
|
||||
'Generamos el acuse y mandamos mail de con el acuse de cancelación - DF 13/01/2017
|
||||
CancelacionFecha = ObjCancelacion.CancelacionFecha
|
||||
CancelacionAcuse = ObjCancelacion.CancelacionAcuse
|
||||
CveEstatus = 5
|
||||
Else
|
||||
Alert("Los servicios de cancelación del SAT no se encuentran disponibles o presentan time out. Intente de nuevo en unos minutos.<br/>Origen del error: WebService www.sat.gob.mx", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
Else
|
||||
CancelacionFecha = Now.Date
|
||||
CancelacionAcuse = ""
|
||||
End If
|
||||
' Try
|
||||
' If FolioFiscal <> "" Then
|
||||
' Dim resp = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, TotalT, RFCReceptor, UsuarioActual.Empresa.RFC, CvePACCancelacion)
|
||||
' If resp.Verificado Then
|
||||
' 'Generamos el acuse y mandamos mail de con el acuse de cancelación - DF 13/01/2017
|
||||
' CancelacionFecha = ObjCancelacion.CancelacionFecha
|
||||
' CancelacionAcuse = ObjCancelacion.CancelacionAcuse
|
||||
' CveEstatus = 5
|
||||
' Else
|
||||
' Alert("Los servicios de cancelación del SAT no se encuentran disponibles o presentan time out. Intente de nuevo en unos minutos.<br/>Origen del error: WebService www.sat.gob.mx", TipoMensaje.MsgError)
|
||||
' Exit Sub
|
||||
' End If
|
||||
' Else
|
||||
' CancelacionFecha = Now.Date
|
||||
' CancelacionAcuse = ""
|
||||
' End If
|
||||
|
||||
If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, CancelacionAcuse, CancelacionFecha, CveVenta, IdPoliza, CvePAC:=CvePACCancelacion) Then
|
||||
ObjVentas.Commit()
|
||||
Alert("El nuevo estatus se guardó correctamente")
|
||||
Else
|
||||
ObjVentas.RollBack()
|
||||
Alert("Ocurrió un error al intentar cancelar la factura")
|
||||
End If
|
||||
' If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, CancelacionAcuse, CancelacionFecha, CveVenta, IdPoliza, CvePAC:=CvePACCancelacion) Then
|
||||
' ObjVentas.Commit()
|
||||
' Alert("El nuevo estatus se guardó correctamente")
|
||||
' Else
|
||||
' ObjVentas.RollBack()
|
||||
' Alert("Ocurrió un error al intentar cancelar la factura")
|
||||
' End If
|
||||
|
||||
Catch ex As Exception
|
||||
ObjVentas.RollBack()
|
||||
Mensaje = "Ocurrio un error al Cancelar la factura"
|
||||
GuardaLog($"{ex.Message}")
|
||||
End Try
|
||||
' Catch ex As Exception
|
||||
' ObjVentas.RollBack()
|
||||
' Mensaje = "Ocurrio un error al Cancelar la factura"
|
||||
' GuardaLog($"{ex.Message}")
|
||||
' End Try
|
||||
|
||||
ObjVentas.Dispose()
|
||||
End Sub
|
||||
' ObjVentas.Dispose()
|
||||
'End Sub
|
||||
Private Function DecodeBase64(ByVal strXMLCodificado As String) As String
|
||||
Try
|
||||
Dim decbuff As Byte() = Convert.FromBase64String(strXMLCodificado)
|
||||
@@ -23769,9 +23780,9 @@ Partial Class Ventas
|
||||
|
||||
Dim LigaRedirigir As String = ""
|
||||
'Si es cancelacion de una refactura ignoramos las condiciones
|
||||
If Me.CveEstatus = 13 Then
|
||||
CancelarRefacturada()
|
||||
End If
|
||||
'If Me.CveEstatus = 13 Then
|
||||
' CancelarRefacturada()
|
||||
'End If
|
||||
|
||||
Dim ObjFacturaCancelacion As New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=True)
|
||||
Try
|
||||
|
||||
@@ -91,6 +91,25 @@ Public Class WSGPSApp
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
Private Sub CreaObjetoEmpresa(ByRef UsuarioActual As Usuario)
|
||||
|
||||
Dim ObjEmpresa As New ClsSisEmpresas()
|
||||
If ObjEmpresa.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1") Then
|
||||
If ObjEmpresa.GetEmpresasFuncionalidades(UsuarioActual.CveEmpresa) Then
|
||||
Dim dttmp As Data.DataTable = ObjEmpresa.DtResultados
|
||||
|
||||
Dim EmpresasFuncionalidades As New HybridDictionary
|
||||
For Each Row As Data.DataRow In dttmp.Rows
|
||||
EmpresasFuncionalidades.Add(Convert.ToInt32(Row("CveFuncionalidad")), Row("Valor").ToString)
|
||||
Next
|
||||
ObjEmpresa.Empresa.SetFuncionalidades(EmpresasFuncionalidades)
|
||||
End If
|
||||
|
||||
UsuarioActual.Empresa = ObjEmpresa.Empresa
|
||||
End If
|
||||
ObjEmpresa.Dispose()
|
||||
End Sub
|
||||
|
||||
<SoapHeader("Credentials")>
|
||||
<WebMethod>
|
||||
Public Function Login(params As String) As String
|
||||
@@ -134,15 +153,22 @@ Public Class WSGPSApp
|
||||
Clientes.Add(New WsClientePortalGPS With {.CveCliente = Row("CveCliente").ToString.ToEntero, .Cliente = Row("Cliente").ToString})
|
||||
Next
|
||||
If UsuarioActual.CveCliente <= 0 AndAlso Clientes.Any() Then
|
||||
UsuarioRetorno.CveCliente = Clientes.FirstOrDefault().CveCliente
|
||||
If UsuarioRetorno.CveCliente > 0 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(704).Contiene(UsuarioRetorno.CveCliente.ToString()) Then
|
||||
UsuarioRetorno.RastreoSoloInicio = True
|
||||
End If
|
||||
UsuarioRetorno.CveCliente = Clientes.FirstOrDefault().CveCliente
|
||||
If UsuarioRetorno.CveCliente > 0 Then
|
||||
CreaObjetoEmpresa(UsuarioActual)
|
||||
If UsuarioActual.Empresa.Funcionalidad(704).Contiene(UsuarioRetorno.CveCliente.ToString()) OrElse UsuarioActual.CveUsuario = 3612 Then
|
||||
UsuarioRetorno.RastreoSoloInicio = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'MARCA PARA EL RASTREO SOLO INICIO
|
||||
If UsuarioRetorno.CveUsuario = 3612 Then
|
||||
UsuarioRetorno.RastreoSoloInicio = True
|
||||
End If
|
||||
|
||||
UsuarioRetorno.Clientes = Clientes
|
||||
DtClientes.Dispose()
|
||||
DtClientes = Nothing
|
||||
@@ -201,18 +227,25 @@ Public Class WSGPSApp
|
||||
Clientes.Add(New WsClientePortalGPS With {.CveCliente = Row("CveCliente").ToString.ToEntero, .Cliente = Row("Cliente").ToString})
|
||||
Next
|
||||
If UsuarioActual.CveCliente <= 0 AndAlso Clientes.Any() Then
|
||||
UsuarioRetorno.CveCliente = Clientes.FirstOrDefault().CveCliente
|
||||
If UsuarioActual.CveCliente <= 0 AndAlso Clientes.Any() Then
|
||||
UsuarioRetorno.CveCliente = Clientes.FirstOrDefault().CveCliente
|
||||
If UsuarioRetorno.CveCliente > 0 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(704).Contiene(UsuarioRetorno.CveCliente.ToString()) Then
|
||||
UsuarioRetorno.RastreoSoloInicio = True
|
||||
End If
|
||||
End If
|
||||
UsuarioRetorno.CveCliente = Clientes.FirstOrDefault().CveCliente
|
||||
If UsuarioActual.CveCliente <= 0 AndAlso Clientes.Any() Then
|
||||
UsuarioRetorno.CveCliente = Clientes.FirstOrDefault().CveCliente
|
||||
If UsuarioRetorno.CveCliente > 0 Then
|
||||
CreaObjetoEmpresa(UsuarioActual)
|
||||
If UsuarioActual.Empresa.Funcionalidad(704).Contiene(UsuarioRetorno.CveCliente.ToString()) OrElse UsuarioActual.CveUsuario = 3612 Then
|
||||
UsuarioRetorno.RastreoSoloInicio = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'MARCA PARA EL RASTREO SOLO INICIO
|
||||
If UsuarioRetorno.CveUsuario = 3612 Then
|
||||
UsuarioRetorno.RastreoSoloInicio = True
|
||||
End If
|
||||
|
||||
UsuarioRetorno.Clientes = Clientes
|
||||
DtClientes.Dispose()
|
||||
DtClientes = Nothing
|
||||
@@ -1005,13 +1038,6 @@ Public Class WSGPSApp
|
||||
End Function
|
||||
|
||||
#Region "F U N C I O N E S"
|
||||
Private Sub CreaObjetoEmpresa(ByRef UsuarioActual As Usuario)
|
||||
Dim ObjEmpresa As New ClsSisEmpresas()
|
||||
If ObjEmpresa.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1") Then
|
||||
UsuarioActual.Empresa = ObjEmpresa.Empresa
|
||||
End If
|
||||
ObjEmpresa.Dispose()
|
||||
End Sub
|
||||
Private Function CargarEventos(CveCliente As Integer, FechaI As DateTime, FechaF As DateTime) As MWSDashboard2
|
||||
Dim ObjGPS As New ClsGPS
|
||||
Dim dash As New MWSDashboard2
|
||||
@@ -1139,7 +1165,7 @@ Namespace ADGPSModels
|
||||
Public Property Contrasenia As String
|
||||
|
||||
Public Property TienePermisoOC As Boolean
|
||||
Public Property TienePermisoPS As Boolean
|
||||
Public Property TienePermisoPS As Boolean
|
||||
Public Property RastreoSoloInicio As Boolean = False
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user