Parametro para verificacion de cancelacion ante el SAT
This commit is contained in:
@@ -126,6 +126,7 @@
|
|||||||
<asp:LinkButton ID="LnkCancelar" Visible="false" runat="server" OnClick="BtnCancelarDocumento_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-check'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el documento?" data-btn-ok-label="si"></asp:LinkButton>
|
<asp:LinkButton ID="LnkCancelar" Visible="false" runat="server" OnClick="BtnCancelarDocumento_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-check'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el documento?" data-btn-ok-label="si"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:HyperLinkField HeaderText="Refacturar" Text="Refacturar" DataNavigateUrlFields="CveVenta" ItemStyle-Width="100px" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveDevolucion={0}&NuevaFactura=1" />
|
||||||
</Columns>
|
</Columns>
|
||||||
<RowStyle CssClass="Texto" />
|
<RowStyle CssClass="Texto" />
|
||||||
<HeaderStyle CssClass="Titulos" />
|
<HeaderStyle CssClass="Titulos" />
|
||||||
@@ -134,7 +135,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<asp:HiddenField ID="HdnLigaRefacturar" runat="server" Value="" ClientIDMode="Static" />
|
<%--<asp:HiddenField ID="HdnLigaRefacturar" runat="server" Value="" ClientIDMode="Static" />--%>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<asp:Button ID="BtnEnviarMailCancelacion" runat="server" ClientIDMode="Static" Text="Enviar Mail Cliente" Style="display: none;" OnClick="BtnEnviarMailCancelacion_Click" />
|
<asp:Button ID="BtnEnviarMailCancelacion" runat="server" ClientIDMode="Static" Text="Enviar Mail Cliente" Style="display: none;" OnClick="BtnEnviarMailCancelacion_Click" />
|
||||||
@@ -143,7 +144,7 @@
|
|||||||
<script src="/Metronic/assets/global/plugins/jquery.pulsate.min.js"></script>
|
<script src="/Metronic/assets/global/plugins/jquery.pulsate.min.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function RefacturarDocumento() {
|
function RefacturarDocumento() {
|
||||||
window.location.replace(HdnLigaRefacturar.value);
|
//window.location.replace(HdnLigaRefacturar.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function BtnEnviarMailCancelacion() {
|
function BtnEnviarMailCancelacion() {
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
}
|
}
|
||||||
private void CargaDatos()
|
private void CargaDatos()
|
||||||
{
|
{
|
||||||
HdnLigaRefacturar.Value = "";
|
//HdnLigaRefacturar.Value = "";
|
||||||
|
|
||||||
if (Request["CveVenta"] != null)
|
if (Request["CveVenta"] != null)
|
||||||
{
|
{
|
||||||
@@ -68,9 +68,9 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
}
|
}
|
||||||
|
|
||||||
ObjVentas.Dispose();
|
ObjVentas.Dispose();
|
||||||
GvDatos.DataSource = DtVentas.FiltraParametros("CveEstatusFactura = 20 AND CveEstatusRefacturacion = 0");
|
GvDatos.DataSource = DtVentas.FiltraParametros("(CveEstatusFactura = 20 AND CveEstatusRefacturacion = 0)");
|
||||||
|
|
||||||
var DtRefacturar = DtVentas.FiltraParametros("CveEstatusRefacturacion IN (1,3)");
|
var DtRefacturar = DtVentas.FiltraParametros("CveEstatusRefacturacion IN (1,3) OR (CveEstatusFactura = 20 AND CveEstatusRefacturacion > 0) OR CveEstatusFactura = 23");
|
||||||
if (DtRefacturar != null && DtRefacturar.Rows.Count > 0)
|
if (DtRefacturar != null && DtRefacturar.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
DivRefacturar.Visible = true;
|
DivRefacturar.Visible = true;
|
||||||
@@ -83,7 +83,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
}
|
}
|
||||||
protected void BtnValidar_Click(object sender, EventArgs e)
|
protected void BtnValidar_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
this.HdnLigaRefacturar.Value = "";
|
//this.HdnLigaRefacturar.Value = "";
|
||||||
this.CveVenta = -1;
|
this.CveVenta = -1;
|
||||||
|
|
||||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||||
@@ -114,7 +114,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
}
|
}
|
||||||
protected void BtnValidarRefacturacion_Click(object sender, EventArgs e)
|
protected void BtnValidarRefacturacion_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
this.HdnLigaRefacturar.Value = "";
|
//this.HdnLigaRefacturar.Value = "";
|
||||||
this.CveVenta = -1;
|
this.CveVenta = -1;
|
||||||
|
|
||||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||||
@@ -136,7 +136,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
CargaDatos();
|
CargaDatos();
|
||||||
if (respuesta.CveEstatus.Contiene(4, 5))
|
if (respuesta.CveEstatus.Contiene(4, 5))
|
||||||
{
|
{
|
||||||
HdnLigaRefacturar.Value = respuesta.LigaRefacturacion;
|
//HdnLigaRefacturar.Value = respuesta.LigaRefacturacion;
|
||||||
Alert(respuesta.Mensaje, JSBtnAceptar: $"RefacturarDocumento();");
|
Alert(respuesta.Mensaje, JSBtnAceptar: $"RefacturarDocumento();");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -160,7 +160,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
|
|
||||||
protected void BtnCancelarDocumento_Click(object sender, EventArgs e)
|
protected void BtnCancelarDocumento_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
this.HdnLigaRefacturar.Value = "";
|
//this.HdnLigaRefacturar.Value = "";
|
||||||
this.CveVenta = -1;
|
this.CveVenta = -1;
|
||||||
|
|
||||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||||
@@ -228,7 +228,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
}
|
}
|
||||||
private MRespuestaSAT VerificarVigenciaSAT(int CveVenta, int CveCliente, string Folio, string TipoDocto, string uuid, string emisor, string receptor, string total, bool EsRefacturacion = false, string FolioSustitucion = "")
|
private MRespuestaSAT VerificarVigenciaSAT(int CveVenta, int CveCliente, string Folio, string TipoDocto, string uuid, string emisor, string receptor, string total, bool EsRefacturacion = false, string FolioSustitucion = "")
|
||||||
{
|
{
|
||||||
HdnLigaRefacturar.Value = "";
|
//HdnLigaRefacturar.Value = "";
|
||||||
|
|
||||||
var retorno = new MRespuestaSAT()
|
var retorno = new MRespuestaSAT()
|
||||||
{
|
{
|
||||||
@@ -431,7 +431,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
|
|
||||||
protected void LnkValidar_Click(object sender, EventArgs e)
|
protected void LnkValidar_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
this.HdnLigaRefacturar.Value = "";
|
//this.HdnLigaRefacturar.Value = "";
|
||||||
this.CveVenta = -1;
|
this.CveVenta = -1;
|
||||||
|
|
||||||
if (DtVentas != null)
|
if (DtVentas != null)
|
||||||
@@ -462,10 +462,10 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
{
|
{
|
||||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||||
{
|
{
|
||||||
//if (e.Row.DBCampo("PuedeRefacturar").ToString().ToEntero() == 0)
|
if (e.Row.DBCampo("PuedeRefacturar").ToString().ToEntero() == 0 || !string.IsNullOrEmpty(e.Row.DBCampo("FolioFiscalSustitucion").ToString()))
|
||||||
//{
|
{
|
||||||
// e.Row.Cells[14].Text = "";
|
e.Row.Cells[12].Text = "";
|
||||||
//}
|
}
|
||||||
|
|
||||||
//if (e.Row.DBCampo("PuedeRefacturar").ToString().ToEntero() == 1 && e.Row.DBCampo("CveEstatusFactura").ToString().ToEntero() == 23)
|
//if (e.Row.DBCampo("PuedeRefacturar").ToString().ToEntero() == 1 && e.Row.DBCampo("CveEstatusFactura").ToString().ToEntero() == 23)
|
||||||
//{
|
//{
|
||||||
|
|||||||
Reference in New Issue
Block a user