--Emision de notas de credito de devolucion de efectivo
This commit is contained in:
@@ -9870,9 +9870,6 @@
|
|||||||
function Recargar() {
|
function Recargar() {
|
||||||
$('#BtnRefrescarPagina').click();
|
$('#BtnRefrescarPagina').click();
|
||||||
}
|
}
|
||||||
function BtnAplicaNuevaNC() {
|
|
||||||
$('#BtnAplicaNuevaNC').click();
|
|
||||||
}
|
|
||||||
|
|
||||||
function BtnAplicaNuevaNC() {
|
function BtnAplicaNuevaNC() {
|
||||||
$('#BtnAplicaNuevaNC').click();
|
$('#BtnAplicaNuevaNC').click();
|
||||||
|
|||||||
@@ -2273,6 +2273,15 @@ Partial Class Ventas
|
|||||||
ViewState("TieneBloqueoPorAutorizacion") = value
|
ViewState("TieneBloqueoPorAutorizacion") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
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
|
#End Region
|
||||||
|
|
||||||
'#Region "AuxiliarConta"
|
'#Region "AuxiliarConta"
|
||||||
@@ -4542,6 +4551,7 @@ Partial Class Ventas
|
|||||||
Dim DtAntRelacionados As DataTable = Nothing
|
Dim DtAntRelacionados As DataTable = Nothing
|
||||||
Dim SerieFolioPadre As String
|
Dim SerieFolioPadre As String
|
||||||
Dim DbRowVenta As DataRow = Nothing
|
Dim DbRowVenta As DataRow = Nothing
|
||||||
|
Dim DtVentasRelacionadas As DataTable = Nothing
|
||||||
|
|
||||||
'CARGA DTs DE VENTAS
|
'CARGA DTs DE VENTAS
|
||||||
If CveVenta > 0 Then
|
If CveVenta > 0 Then
|
||||||
@@ -4556,10 +4566,16 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If DbRowVenta IsNot Nothing Then
|
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')")
|
DtAntRelacionados = ObjVentas.DtResultados.FiltraParametros("TipoDocto IN ('Ing','Ant','Egs','Dev')")
|
||||||
End If
|
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
|
'CargaDetalle
|
||||||
If ObjVentas.GetVentaDetalle(CveVenta) Then
|
If ObjVentas.GetVentaDetalle(CveVenta) Then
|
||||||
TmpDT = ObjVentas.DtResultados.Copy()
|
TmpDT = ObjVentas.DtResultados.Copy()
|
||||||
@@ -4826,6 +4842,12 @@ Partial Class Ventas
|
|||||||
Trsaldo.Visible = True
|
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"))
|
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"))
|
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"
|
Case "Rem"
|
||||||
'IPP 15 Julio 2017
|
'IPP 15 Julio 2017
|
||||||
Trsaldo.Visible = True
|
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", ""))
|
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||||
|
|
||||||
If Timbre.Comprobante.TipoComprobante = "E" Then
|
If Timbre.Comprobante.TipoComprobante = "E" Then
|
||||||
|
|
||||||
|
If Not EsNCDevolucionEfectivo OrElse HdnFolioFiscalNC.Value.ToString() <> "" Then
|
||||||
If Obj.TipoDocto = "Egs" Then
|
If Obj.TipoDocto = "Egs" Then
|
||||||
Timbre.CFDIRelacionados.TipoRelacion = "01"
|
Timbre.CFDIRelacionados.TipoRelacion = "01"
|
||||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "Nota de Crédito aplicada a Ingreso"
|
Timbre.CFDIRelacionados.TipoRelacionTexto = "Nota de Crédito aplicada a Ingreso"
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If Obj.TipoDocto = "Dev" Then
|
If Obj.TipoDocto = "Dev" Then
|
||||||
Timbre.CFDIRelacionados.TipoRelacion = "03"
|
Timbre.CFDIRelacionados.TipoRelacion = "03"
|
||||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso"
|
Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso"
|
||||||
@@ -27396,6 +27421,7 @@ Partial Class Ventas
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub BtnAplicaNuevaNC_Click(sender As Object, e As EventArgs) Handles BtnAplicaNuevaNC.Click
|
Private Sub BtnAplicaNuevaNC_Click(sender As Object, e As EventArgs) Handles BtnAplicaNuevaNC.Click
|
||||||
|
Me.EsNCDevolucionEfectivo = True
|
||||||
AplicarNotaCreditoDesdeVenta(AplicaNuevoDocumento:=True)
|
AplicarNotaCreditoDesdeVenta(AplicaNuevoDocumento:=True)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user