Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -3712,6 +3712,18 @@ Public Class ClsNominas
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Public Function CalculaDiasFeriados(fechaInicio As String, fechaFin As String, DiasPagos As Int32, DiasFeriados As Int32, cveEmpresa As Int32, cveUsuario As Int32) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Nom_CalculaDiasFeriados", CommandType.StoredProcedure)
|
||||||
|
addParameters("@FechaFin", SqlDbType.VarChar, fechaFin)
|
||||||
|
addParameters("@FechaInicio", SqlDbType.VarChar, fechaInicio)
|
||||||
|
addParameters("@DiasPagos", SqlDbType.Int, DiasPagos)
|
||||||
|
addParameters("@DiasFeriados", SqlDbType.Int, DiasFeriados)
|
||||||
|
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
|
||||||
|
addParameters("@CveUsuario", SqlDbType.Int, cveUsuario)
|
||||||
|
retorno = RunQuery("Ocurrió un error al realizar la carga de periodos.")
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2153,7 +2153,7 @@ Namespace Modelos
|
|||||||
PedidoContrato:=factura.PedidoContrato, ObservacionesAlmacen:=factura.ObservacionesAlmacen, CveSubProyecto:=factura.CveSubProyecto, CveSubProyectoCobranza:=factura.CveSubProyectoCobranza, CveSubProyectoEjecucion:=factura.CveSubProyectoEjecucion, CveFormaPago33:=factura.CveFormaPago33,
|
PedidoContrato:=factura.PedidoContrato, ObservacionesAlmacen:=factura.ObservacionesAlmacen, CveSubProyecto:=factura.CveSubProyecto, CveSubProyectoCobranza:=factura.CveSubProyectoCobranza, CveSubProyectoEjecucion:=factura.CveSubProyectoEjecucion, CveFormaPago33:=factura.CveFormaPago33,
|
||||||
CveMetodoPago33:=factura.CveMetodoPago33, CveUsoCFDI:=factura.CveUsoCFDI, OrdenCompra:=factura.OrdenCompra, CveCuentaTerminal:=factura.CveCuentaTerminal, CveTipoRelacion:=factura.CveTipoRelacion, ImpuestoLocal:=TotalImpuestoLocal,
|
CveMetodoPago33:=factura.CveMetodoPago33, CveUsoCFDI:=factura.CveUsoCFDI, OrdenCompra:=factura.OrdenCompra, CveCuentaTerminal:=factura.CveCuentaTerminal, CveTipoRelacion:=factura.CveTipoRelacion, ImpuestoLocal:=TotalImpuestoLocal,
|
||||||
CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)),
|
CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)),
|
||||||
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, ServicioDomicilio:=factura.ServicioDomicilio, RFCReceptor:=RFCReceptor, EsGarantia:=factura.EsGarantia) Then
|
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, ServicioDomicilio:=factura.ServicioDomicilio, RFCReceptor:=RFCReceptor, EsGarantia:=factura.EsGarantia, DescripcionVenta:=factura.DescripcionVenta) Then
|
||||||
|
|
||||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||||
|
|
||||||
@@ -7458,6 +7458,7 @@ Namespace Modelos
|
|||||||
Public Property FordASN As String = ""
|
Public Property FordASN As String = ""
|
||||||
Public Property FemsaFactura As Modelos.FemsaFactura
|
Public Property FemsaFactura As Modelos.FemsaFactura
|
||||||
Public Property DevolucionImportePagado As Decimal = 0
|
Public Property DevolucionImportePagado As Decimal = 0
|
||||||
|
Public Property DescripcionVenta As String = ""
|
||||||
|
|
||||||
Public Sub SetSubProyecto()
|
Public Sub SetSubProyecto()
|
||||||
If CveSubProyecto > 0 AndAlso UsuarioActual IsNot Nothing Then
|
If CveSubProyecto > 0 AndAlso UsuarioActual IsNot Nothing Then
|
||||||
|
|||||||
@@ -7899,88 +7899,95 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
Private Sub CalculaDiasVacaciones(fechaInicioParametro As Date, diasVacaciones As Integer, Optional fechaFinParametro As Date = Nothing)
|
Private Sub CalculaDiasVacaciones(fechaInicioParametro As Date, diasVacaciones As Integer, Optional fechaFinParametro As Date = Nothing)
|
||||||
|
|
||||||
Dim diaDescanso As Integer = GlobalDTTurno(UsuarioActual.CveEmpresa).FiltroPrimeroValor("DiaDescanso", $" CveTurno = {DdlTurno.SelectedValue.ToEntero}").ToEntero
|
'Dim diaDescanso As Integer = GlobalDTTurno(UsuarioActual.CveEmpresa).FiltroPrimeroValor("DiaDescanso", $" CveTurno = {DdlTurno.SelectedValue.ToEntero}").ToEntero
|
||||||
diaDescanso = If(diaDescanso <= 0, 1, diaDescanso)
|
'diaDescanso = If(diaDescanso <= 0, 1, diaDescanso)
|
||||||
|
|
||||||
If fechaFinParametro <> Nothing Then
|
'If fechaFinParametro <> Nothing Then
|
||||||
If fechaInicioParametro > fechaFinParametro Then
|
' If fechaInicioParametro > fechaFinParametro Then
|
||||||
Alert("La fecha fin no puede ser mayor a la fecha inicial", TipoMensaje.MsgAdvertencia)
|
' Alert("La fecha fin no puede ser mayor a la fecha inicial", TipoMensaje.MsgAdvertencia)
|
||||||
fechaFinParametro = Nothing
|
' fechaFinParametro = Nothing
|
||||||
TxtVacDiasPago.Text = DiasDisponibles.ToString
|
' TxtVacDiasPago.Text = DiasDisponibles.ToString
|
||||||
End If
|
' End If
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If fechaFinParametro <> Nothing Then
|
'If fechaFinParametro <> Nothing Then
|
||||||
|
|
||||||
Dim DiferenciaEntreFechas As Integer = (fechaFinParametro - fechaInicioParametro).Days + 1
|
' Dim DiferenciaEntreFechas As Integer = (fechaFinParametro - fechaInicioParametro).Days + 1
|
||||||
Dim DiasNolavorales As Integer = 0
|
' Dim DiasNolavorales As Integer = 0
|
||||||
Dim FechaTemp As Date = fechaInicioParametro
|
' Dim FechaTemp As Date = fechaInicioParametro
|
||||||
|
|
||||||
For x As Integer = 1 To DiferenciaEntreFechas
|
' For x As Integer = 1 To DiferenciaEntreFechas
|
||||||
Dim day_of_week As Integer = CType(FechaTemp.DayOfWeek, Integer) + 1
|
' Dim day_of_week As Integer = CType(FechaTemp.DayOfWeek, Integer) + 1
|
||||||
|
|
||||||
If day_of_week = diaDescanso Then
|
' If day_of_week = diaDescanso Then
|
||||||
DiasNolavorales = DiasNolavorales + 1
|
' DiasNolavorales = DiasNolavorales + 1
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' FechaTemp = FechaTemp.AddDays(1)
|
||||||
|
|
||||||
|
' If 1 = DiferenciaEntreFechas Then
|
||||||
|
' If day_of_week = diaDescanso Then
|
||||||
|
' DiasNolavorales = DiasNolavorales + 1
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' Next x
|
||||||
|
|
||||||
|
|
||||||
|
' If (DiferenciaEntreFechas - DiasNolavorales) >= DiasDisponibles Then
|
||||||
|
' diasVacaciones = DiasDisponibles
|
||||||
|
' Else
|
||||||
|
' diasVacaciones = DiferenciaEntreFechas - DiasNolavorales
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' TxtVacDiasPago.Text = diasVacaciones.ToString
|
||||||
|
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'If TxtVacDiasPago.Text.ToEntero > DiasDisponibles Then
|
||||||
|
' TxtVacDiasPago.Text = DiasDisponibles.ToString
|
||||||
|
' diasVacaciones = DiasDisponibles
|
||||||
|
'End If
|
||||||
|
|
||||||
|
|
||||||
|
'Dim DiasAgregados As Integer = 0
|
||||||
|
'Dim FechaFin As Date = fechaInicioParametro
|
||||||
|
'Dim Contador As Integer = 0
|
||||||
|
'For x As Integer = 2 To diasVacaciones
|
||||||
|
' Dim day_of_week As Integer = CType(FechaFin.DayOfWeek, Integer) + 1
|
||||||
|
' If day_of_week = diaDescanso Then
|
||||||
|
' FechaFin = FechaFin.AddDays(2)
|
||||||
|
' DiasAgregados = DiasAgregados + 1
|
||||||
|
' Else
|
||||||
|
' FechaFin = FechaFin.AddDays(1)
|
||||||
|
' day_of_week = CType(FechaFin.DayOfWeek, Integer) + 1
|
||||||
|
' If (diasVacaciones = Contador + 2) AndAlso day_of_week = diaDescanso Then
|
||||||
|
' FechaFin = FechaFin.AddDays(1)
|
||||||
|
' DiasAgregados = DiasAgregados + 1
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' End If
|
||||||
|
' Contador = Contador + 1
|
||||||
|
'Next
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'Dim UltimoDiamasUno As Integer = CType(FechaFin.AddDays(1).DayOfWeek, Integer) + 1
|
||||||
|
|
||||||
|
'If UltimoDiamasUno = diaDescanso Then
|
||||||
|
' FechaFin = FechaFin.AddDays(1)
|
||||||
|
' DiasAgregados = DiasAgregados + 1
|
||||||
|
'End If
|
||||||
|
'TxtFechaFinVac.Text = FechaFin.ToString
|
||||||
|
'Txtdiasinabiles.Text = DiasAgregados.ToString
|
||||||
|
Using onom As New ClsNominas
|
||||||
|
If onom.CalculaDiasFeriados(fechaInicioParametro.ToDateTime().ToString("yyyy-MM-dd"), "", diasVacaciones, 0, UsuarioActual.CveEmpresa, UsuarioActual.CvePersonal) Then
|
||||||
|
If Not IsNothing(onom.DtResultados) AndAlso onom.DtResultados.Rows.Count > 0 Then
|
||||||
|
Dim drow As DataRow = onom.DtResultados.Rows(0)
|
||||||
|
TxtFechaFinVac.Text = String.Format("{0:dd/MM/yyyy}", drow("FechaInicio"))
|
||||||
|
Txtdiasinabiles.Text = String.Format("{0}", drow("DiaFeriadoB"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
FechaTemp = FechaTemp.AddDays(1)
|
|
||||||
|
|
||||||
If 1 = DiferenciaEntreFechas Then
|
|
||||||
If day_of_week = diaDescanso Then
|
|
||||||
DiasNolavorales = DiasNolavorales + 1
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Next x
|
|
||||||
|
|
||||||
|
|
||||||
If (DiferenciaEntreFechas - DiasNolavorales) >= DiasDisponibles Then
|
|
||||||
diasVacaciones = DiasDisponibles
|
|
||||||
Else
|
|
||||||
diasVacaciones = DiferenciaEntreFechas - DiasNolavorales
|
|
||||||
End If
|
End If
|
||||||
|
End Using
|
||||||
TxtVacDiasPago.Text = diasVacaciones.ToString
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
If TxtVacDiasPago.Text.ToEntero > DiasDisponibles Then
|
|
||||||
TxtVacDiasPago.Text = DiasDisponibles.ToString
|
|
||||||
diasVacaciones = DiasDisponibles
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
Dim DiasAgregados As Integer = 0
|
|
||||||
Dim FechaFin As Date = fechaInicioParametro
|
|
||||||
Dim Contador As Integer = 0
|
|
||||||
For x As Integer = 2 To diasVacaciones
|
|
||||||
Dim day_of_week As Integer = CType(FechaFin.DayOfWeek, Integer) + 1
|
|
||||||
If day_of_week = diaDescanso Then
|
|
||||||
FechaFin = FechaFin.AddDays(2)
|
|
||||||
DiasAgregados = DiasAgregados + 1
|
|
||||||
Else
|
|
||||||
FechaFin = FechaFin.AddDays(1)
|
|
||||||
day_of_week = CType(FechaFin.DayOfWeek, Integer) + 1
|
|
||||||
If (diasVacaciones = Contador + 2) AndAlso day_of_week = diaDescanso Then
|
|
||||||
FechaFin = FechaFin.AddDays(1)
|
|
||||||
DiasAgregados = DiasAgregados + 1
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
Contador = Contador + 1
|
|
||||||
Next
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim UltimoDiamasUno As Integer = CType(FechaFin.AddDays(1).DayOfWeek, Integer) + 1
|
|
||||||
|
|
||||||
If UltimoDiamasUno = diaDescanso Then
|
|
||||||
FechaFin = FechaFin.AddDays(1)
|
|
||||||
DiasAgregados = DiasAgregados + 1
|
|
||||||
End If
|
|
||||||
|
|
||||||
TxtFechaFinVac.Text = FechaFin.ToString
|
|
||||||
Txtdiasinabiles.Text = DiasAgregados.ToString
|
|
||||||
|
|
||||||
UpSolicitarVacaciones.Update()
|
UpSolicitarVacaciones.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -322,6 +322,12 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr align="left" id="TrDescripcionVenta" runat="server" visible="false">
|
||||||
|
<td><b>Descripción:</b></td>
|
||||||
|
<td colspan="3">
|
||||||
|
<asp:TextBox ID="TxtDescripcionVenta" runat="server" Rows="2" TextMode="MultiLine" Width="100%" MaxLength="300" CssClass="form-control input-sm" Enabled="false"></asp:TextBox></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr align="left" style="border: 4px solid red" runat="server" id="TrEsDistribuidor" visible="false">
|
<tr align="left" style="border: 4px solid red" runat="server" id="TrEsDistribuidor" visible="false">
|
||||||
<td><b style="color: red;">Es Distribuidor</b></td>
|
<td><b style="color: red;">Es Distribuidor</b></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
|
|||||||
@@ -1283,6 +1283,13 @@ Partial Class PV
|
|||||||
End If
|
End If
|
||||||
DdlTipoDefecto.Width = New Unit(260%)
|
DdlTipoDefecto.Width = New Unit(260%)
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(163) = "1" Then
|
||||||
|
TrDescripcionVenta.Visible = True
|
||||||
|
If CveVenta <= 0 Then
|
||||||
|
TxtDescripcionVenta.Enabled = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
'Le quitamos el tamaño extra
|
'Le quitamos el tamaño extra
|
||||||
'RegistraScript("window.onload = function AjustarVentana() { $('.page-content').css('min-height','100%'); }")
|
'RegistraScript("window.onload = function AjustarVentana() { $('.page-content').css('min-height','100%'); }")
|
||||||
End If
|
End If
|
||||||
@@ -1510,6 +1517,11 @@ Partial Class PV
|
|||||||
HdnFolioFiscalNC.Value = DbRowVenta("FolioFiscalPadre").ToString
|
HdnFolioFiscalNC.Value = DbRowVenta("FolioFiscalPadre").ToString
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(163) = "1" Then
|
||||||
|
TrDescripcionVenta.Visible = True
|
||||||
|
TxtDescripcionVenta.Text = DbRowVenta("DescripcionVenta").ToString()
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
'Envio Direccion
|
'Envio Direccion
|
||||||
If DbRowVenta("CveDireccionEnvio").ToString.ToEntero > 0 AndAlso DbRowVenta("CveDireccionEnvio").ToString IsNot Nothing Then
|
If DbRowVenta("CveDireccionEnvio").ToString.ToEntero > 0 AndAlso DbRowVenta("CveDireccionEnvio").ToString IsNot Nothing Then
|
||||||
@@ -3770,6 +3782,8 @@ Partial Class PV
|
|||||||
|
|
||||||
ObjFactura.GenerarPDFFactura = False
|
ObjFactura.GenerarPDFFactura = False
|
||||||
|
|
||||||
|
ObjFactura.DescripcionVenta = TxtDescripcionVenta.Text.Trim()
|
||||||
|
|
||||||
Dim CveTipoAlmacen As Integer = If(TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.Rows.Count > 0, 6, 22)
|
Dim CveTipoAlmacen As Integer = If(TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.Rows.Count > 0, 6, 22)
|
||||||
If GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveTipoAlmacen = {CveTipoAlmacen} AND CveSubProyecto= {DdlSubProyectoDatos.SelectedValue}").Rows.Count > 0 Then
|
If GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveTipoAlmacen = {CveTipoAlmacen} AND CveSubProyecto= {DdlSubProyectoDatos.SelectedValue}").Rows.Count > 0 Then
|
||||||
ObjFactura.CveAlmacenRecepcionUsados = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveTipoAlmacen = {CveTipoAlmacen} AND CveSubProyecto= {DdlSubProyectoDatos.SelectedValue}").Rows(0)("CveAlmacen").ToString.ToEntero
|
ObjFactura.CveAlmacenRecepcionUsados = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveTipoAlmacen = {CveTipoAlmacen} AND CveSubProyecto= {DdlSubProyectoDatos.SelectedValue}").Rows(0)("CveAlmacen").ToString.ToEntero
|
||||||
@@ -6088,7 +6102,10 @@ Partial Class PV
|
|||||||
TxtFechaPago.Text = NowADS().AddDays(PlazoCobranza).ToShortDateString
|
TxtFechaPago.Text = NowADS().AddDays(PlazoCobranza).ToShortDateString
|
||||||
Case 2 'CONTADO
|
Case 2 'CONTADO
|
||||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant") Then
|
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant") Then
|
||||||
DivContado.Visible = True
|
'SI ES MODALIDAD COBRANZA, NO MOSTRAR
|
||||||
|
If Not (UsuarioActual.Empresa.Funcionalidad(109) = "1") Then
|
||||||
|
DivContado.Visible = True
|
||||||
|
End If
|
||||||
TxtImporteContado.Text = TxtTotal.Text
|
TxtImporteContado.Text = TxtTotal.Text
|
||||||
End If
|
End If
|
||||||
TxtFechaPago.Text = NowADS().ToShortDateString
|
TxtFechaPago.Text = NowADS().ToShortDateString
|
||||||
|
|||||||
@@ -378,6 +378,9 @@
|
|||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkSolicitarCredito" Visible="false" runat="server"><i class="fa fa-plus"></i>Solicitar autorización de crédito</asp:LinkButton>
|
<asp:LinkButton ID="LnkSolicitarCredito" Visible="false" runat="server"><i class="fa fa-plus"></i>Solicitar autorización de crédito</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkCancelarSoloCFDI" Visible="false" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea cancelar el CFDI?" data-btn-ok-label="si" OnClick="LnkCancelarSoloCFDI_Click"><i class="fa fa-plus"></i>Cancelar solo CFDI</asp:LinkButton>
|
||||||
|
</li>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
<Triggers>
|
<Triggers>
|
||||||
<asp:AsyncPostBackTrigger ControlID="LnkImprimir" EventName="Click" />
|
<asp:AsyncPostBackTrigger ControlID="LnkImprimir" EventName="Click" />
|
||||||
|
|||||||
@@ -2340,6 +2340,11 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
|
|
||||||
|
''SOLO SISTEMA DEBE VER ESTA OPCION
|
||||||
|
'If UsuarioActual.CveUsuario = 100 Then
|
||||||
|
' LnkCancelarSoloCFDI.Visible = True
|
||||||
|
'End If
|
||||||
|
|
||||||
If IfNull(Request("Opcionx"), "").ToString = "Saldar" And UsuarioActual.CveUsuario = 100 Then
|
If IfNull(Request("Opcionx"), "").ToString = "Saldar" And UsuarioActual.CveUsuario = 100 Then
|
||||||
TxtFechaSaldarVenta.Text = "2021/12/31"
|
TxtFechaSaldarVenta.Text = "2021/12/31"
|
||||||
SaldarVenta()
|
SaldarVenta()
|
||||||
@@ -16194,6 +16199,8 @@ Partial Class Ventas
|
|||||||
#Region " BTN ELIMINAR "
|
#Region " BTN ELIMINAR "
|
||||||
Protected Sub BtnEmitir_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnEmitir.Click
|
Protected Sub BtnEmitir_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnEmitir.Click
|
||||||
|
|
||||||
|
'ChkEnviarFactura.Checked = False
|
||||||
|
|
||||||
If CveVenta <= 0 Then
|
If CveVenta <= 0 Then
|
||||||
Alert("Ocurrió un error al emitir la factura", TipoMensaje.MsgError)
|
Alert("Ocurrió un error al emitir la factura", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -35733,5 +35740,32 @@ Partial Class Ventas
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
Protected Sub LnkCancelarSoloCFDI_Click(sender As Object, e As EventArgs)
|
||||||
|
If CveVenta > 0 Then
|
||||||
|
Dim RowVenta As DataRow = Nothing
|
||||||
|
|
||||||
|
Using ObjVentas As New ClsVentas
|
||||||
|
If (ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa)) Then
|
||||||
|
RowVenta = ObjVentas.DtResultados.Copy().Rows(0)
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
|
||||||
|
If RowVenta IsNot Nothing Then
|
||||||
|
Dim FolioFiscal As String = RowVenta("FolioFiscal").ToString().Trim()
|
||||||
|
Dim Total As Decimal = RowVenta("Total").ToString().ToDecimal()
|
||||||
|
Dim RFCReceptor As String = RowVenta("RFCReceptor").ToString()
|
||||||
|
Dim ObjTimbrado As New Timbrado
|
||||||
|
Dim resp = ObjTimbrado.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, Total, RFCReceptor, UsuarioActual.Empresa.RFC, CvePACCancelacion:=4, ValidaFactura:=False, CveSATMotivoCancelacion:=2)
|
||||||
|
If resp IsNot Nothing Then
|
||||||
|
Alert(resp.Estado)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user