-- mejoras en refacturación
This commit is contained in:
@@ -70,7 +70,7 @@
|
|||||||
<asp:BoundField HeaderText="Motivo" DataField="MotivoCancelacion" ItemStyle-Width="25%" />
|
<asp:BoundField HeaderText="Motivo" DataField="MotivoCancelacion" ItemStyle-Width="25%" />
|
||||||
<asp:TemplateField ItemStyle-Width="35px" HeaderText="Verificar">
|
<asp:TemplateField ItemStyle-Width="35px" HeaderText="Verificar">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton runat="server" OnClick="BtnValidar_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea verificar la cancelación?" data-btn-ok-label="si"></asp:LinkButton>
|
<asp:LinkButton runat="server" OnClick="BtnValidar_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea verificar la cancelación?" data-btn-ok-label="si"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
|
|||||||
@@ -281,11 +281,11 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (respCancelacion.CveEstatus.Contiene(4, 5) && EsRefacturacion)
|
//if (respCancelacion.CveEstatus.Contiene(4, 5) && EsRefacturacion)
|
||||||
{
|
//{
|
||||||
retorno.IrARefacturar = true;
|
// retorno.IrARefacturar = true;
|
||||||
retorno.LigaRefacturacion = string.Format("Ventas.aspx?CveDevolucion={0}&NuevaFactura=1", CveVenta);
|
// retorno.LigaRefacturacion = string.Format("Ventas.aspx?CveDevolucion={0}&NuevaFactura=1", CveVenta);
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -333,11 +333,11 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (respCancelacion.CveEstatus.Contiene(4, 5) && EsRefacturacion)
|
//if (respCancelacion.CveEstatus.Contiene(4, 5) && EsRefacturacion)
|
||||||
{
|
//{
|
||||||
retorno.IrARefacturar = true;
|
// retorno.IrARefacturar = true;
|
||||||
retorno.LigaRefacturacion = string.Format("Ventas.aspx?CveDevolucion={0}&NuevaFactura=1", CveVenta);
|
// retorno.LigaRefacturacion = string.Format("Ventas.aspx?CveDevolucion={0}&NuevaFactura=1", CveVenta);
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
else if (resp.EstatusCancelacion.ToUpper() == "SOLICITUD RECHAZADA")
|
else if (resp.EstatusCancelacion.ToUpper() == "SOLICITUD RECHAZADA")
|
||||||
{
|
{
|
||||||
@@ -390,13 +390,13 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
retorno.Mensaje = sb.ToString();
|
retorno.Mensaje = sb.ToString();
|
||||||
return retorno;
|
return retorno;
|
||||||
}
|
}
|
||||||
private Modelos.Factura.MCancelacionVentaMensaje CancelarDocumento(int CveVenta, int CveEstatus, int CveCliente, string Folio, string FolioFiscal, string CancelacionAcuse, DateTime CancelacionFecha, string TipoComprobante, double Total, int CvePACCancelacion, bool EsRefacturacion = false, string FolioSustitucion = "", int CveEstatusRefacturacion = -1)
|
private Modelos.Factura.MCancelacionVentaMensaje CancelarDocumento(int CveVenta, int CveEstatus, int CveCliente, string Folio, string FolioFiscal, string CancelacionAcuse, DateTime CancelacionFecha, string TipoComprobante, double Total, int CvePACCancelacion, bool EsRefacturacion = false, string FolioSustitucion = "", int CveEstatusRefacturacion = 0)
|
||||||
{
|
{
|
||||||
Modelos.Factura.MCancelacionVentaMensaje retorno = null;
|
Modelos.Factura.MCancelacionVentaMensaje retorno = null;
|
||||||
var factura = new Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion: true);
|
var factura = new Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion: true);
|
||||||
if (EsRefacturacion)
|
if (EsRefacturacion)
|
||||||
{
|
{
|
||||||
if (CveEstatusRefacturacion > 0)
|
if (CveEstatusRefacturacion >= 0)
|
||||||
{
|
{
|
||||||
factura.CveEstatusRefacturacion = CveEstatusRefacturacion;
|
factura.CveEstatusRefacturacion = CveEstatusRefacturacion;
|
||||||
}
|
}
|
||||||
@@ -616,6 +616,41 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//protected void BtnAcuse_Click(object sender, EventArgs e)
|
||||||
|
//{
|
||||||
|
// GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||||
|
// string UsuarioServicio = "rene.molina@adsistemas.mx";
|
||||||
|
// string ClaveServicio = "rene2018";
|
||||||
|
// string UrlServicio = "https://cfdi.gofac.com.mx/timbrado.asmx?WSDL";
|
||||||
|
|
||||||
|
// this.CveVenta = GvRow.DataKey("CveVenta").ToEntero();
|
||||||
|
|
||||||
|
// string Uuid = GvRow.DataKey("FolioFiscal");
|
||||||
|
// decimal Total = GvRow.DataKey("Total").ToDecimal();
|
||||||
|
// string RFCCliente = GvRow.DataKey("RFCCliente");
|
||||||
|
// string FolioFiscalSustitucion = GvRow.DataKey("FolioFiscalSustitucion");
|
||||||
|
// Cancelacion2022.AcuseSat resp = new Cancelacion2022.AcuseSat();
|
||||||
|
// GoFac.GoCfdi a = new GoFac.GoCfdi();
|
||||||
|
// a.ObtenerAcuse(UrlServicio, UsuarioActual.Empresa.RFC, UsuarioServicio, ClaveServicio, Uuid);
|
||||||
|
|
||||||
|
// if (a.CodigoError != 0)
|
||||||
|
// {
|
||||||
|
// //no se pudo obtener, la mandamos cancelar
|
||||||
|
// Timbrado ObjCancelacion = new Timbrado();
|
||||||
|
|
||||||
|
// if (ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, Uuid, Total, RFCCliente, UsuarioActual.Empresa.RFC, 4, ValidaFactura:false, CveSATMotivoCancelacion: 1, FolioSustitucion: FolioFiscalSustitucion ))
|
||||||
|
// {
|
||||||
|
// string b = ObjCancelacion.CancelacionAcuse;
|
||||||
|
// //falta actualizar
|
||||||
|
// Alert("Se regeneró la solicitud de cancelación");
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
public class MRespuestaSAT
|
public class MRespuestaSAT
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user