--Emision de notas de credito de devolucion de efectivo
This commit is contained in:
@@ -9870,9 +9870,6 @@
|
||||
function Recargar() {
|
||||
$('#BtnRefrescarPagina').click();
|
||||
}
|
||||
function BtnAplicaNuevaNC() {
|
||||
$('#BtnAplicaNuevaNC').click();
|
||||
}
|
||||
|
||||
function BtnAplicaNuevaNC() {
|
||||
$('#BtnAplicaNuevaNC').click();
|
||||
|
||||
@@ -2273,6 +2273,15 @@ Partial Class Ventas
|
||||
ViewState("TieneBloqueoPorAutorizacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property EsNCDevolucionEfectivo As Boolean
|
||||
Get
|
||||
Return If(IsNothing(ViewState("EsNCDevolucionEfectivo")), False, CType(ViewState("EsNCDevolucionEfectivo"), Boolean))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("EsNCDevolucionEfectivo") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
'#Region "AuxiliarConta"
|
||||
@@ -4542,6 +4551,7 @@ Partial Class Ventas
|
||||
Dim DtAntRelacionados As DataTable = Nothing
|
||||
Dim SerieFolioPadre As String
|
||||
Dim DbRowVenta As DataRow = Nothing
|
||||
Dim DtVentasRelacionadas As DataTable = Nothing
|
||||
|
||||
'CARGA DTs DE VENTAS
|
||||
If CveVenta > 0 Then
|
||||
@@ -4556,10 +4566,16 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If DbRowVenta IsNot Nothing Then
|
||||
If ObjVentas.GetVentasRelacionadas(CveVenta, 1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa, TipoRelacion:=1) Then
|
||||
DtAntRelacionados = ObjVentas.DtResultados.FiltraParametros("TipoDocto IN ('Ing','Ant','Egs','Dev')")
|
||||
End If
|
||||
|
||||
If DbRowVenta("TipoDocto").ToString() = "Egs" Then
|
||||
If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa, TipoRelacion:=2) Then
|
||||
DtVentasRelacionadas = ObjVentas.DtResultados.FiltraParametros("TipoDocto IN ('Ing','Ant','Egs','Dev')")
|
||||
End If
|
||||
End If
|
||||
|
||||
'CargaDetalle
|
||||
If ObjVentas.GetVentaDetalle(CveVenta) Then
|
||||
TmpDT = ObjVentas.DtResultados.Copy()
|
||||
@@ -4826,6 +4842,12 @@ Partial Class Ventas
|
||||
Trsaldo.Visible = True
|
||||
HplSaldoAuxiliar.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
|
||||
HplPagado.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
|
||||
|
||||
'SI NO TIENE INGRESOS RELACIONADOS, SE TOMARA COMO DEVOLUCION DE EFECTIVO
|
||||
If DtVentasRelacionadas IsNot Nothing AndAlso DtVentasRelacionadas.Rows.Count = 0 Then
|
||||
EsNCDevolucionEfectivo = True
|
||||
End If
|
||||
|
||||
Case "Rem"
|
||||
'IPP 15 Julio 2017
|
||||
Trsaldo.Visible = True
|
||||
@@ -12283,11 +12305,14 @@ Partial Class Ventas
|
||||
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||
|
||||
If Timbre.Comprobante.TipoComprobante = "E" Then
|
||||
If Obj.TipoDocto = "Egs" Then
|
||||
Timbre.CFDIRelacionados.TipoRelacion = "01"
|
||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "Nota de Crédito aplicada a Ingreso"
|
||||
|
||||
If Not EsNCDevolucionEfectivo OrElse HdnFolioFiscalNC.Value.ToString() <> "" Then
|
||||
If Obj.TipoDocto = "Egs" Then
|
||||
Timbre.CFDIRelacionados.TipoRelacion = "01"
|
||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "Nota de Crédito aplicada a Ingreso"
|
||||
End If
|
||||
End If
|
||||
|
||||
If Obj.TipoDocto = "Dev" Then
|
||||
Timbre.CFDIRelacionados.TipoRelacion = "03"
|
||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso"
|
||||
@@ -27396,6 +27421,7 @@ Partial Class Ventas
|
||||
End Sub
|
||||
|
||||
Private Sub BtnAplicaNuevaNC_Click(sender As Object, e As EventArgs) Handles BtnAplicaNuevaNC.Click
|
||||
Me.EsNCDevolucionEfectivo = True
|
||||
AplicarNotaCreditoDesdeVenta(AplicaNuevoDocumento:=True)
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user