diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index f22ae9243..fa5270557 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -7444,8 +7444,8 @@ Partial Class Ventas For Each gvr As GridViewRow In GvImpuestosLocales2.Rows If gvr.RowType = DataControlRowType.DataRow Then Dim Orden As Integer = 80 - If gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble > 0 Then - DR("ImpuestoLocal") = gvr.DataKey("ImpuestoLocal").ToString : DR("Importe") = gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble : DR("Orden") = Orden : DR("Porcentaje") = gvr.DataKey("Porcentaje").ToString : DR("TipoImpuesto") = gvr.DataKey("TipoImpuesto").ToString : DR("IdCtaContable") = gvr.DataKey("IdCtaContable").ToString.ToEntero : TmpDTImpuestos.Rows.Add(DR) + If gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDecimal > 0 Then + DR("ImpuestoLocal") = gvr.DataKey("ImpuestoLocal").ToString : DR("Importe") = gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDecimal.RoundSQL(2) : DR("Orden") = Orden : DR("Porcentaje") = gvr.DataKey("Porcentaje").ToString : DR("TipoImpuesto") = gvr.DataKey("TipoImpuesto").ToString : DR("IdCtaContable") = gvr.DataKey("IdCtaContable").ToString.ToEntero : TmpDTImpuestos.Rows.Add(DR) DR = TmpDTImpuestos.NewRow() Orden = Orden + 1 End If @@ -8266,7 +8266,12 @@ Partial Class Ventas For Each DrImpuestosLocales As DataRow In TmpDTImpuestos.FiltraParametros("TipoImpuesto = 1").Rows If DrImpuestosLocales("Importe").ToString.ToDecimal > 0 Then - Dim ret As New CFDIRetencionesLocales With {.TasaRetencion = DrImpuestosLocales("Porcentaje").ToString.ToDecimal, .ImpuestoLocalRetenido = DrImpuestosLocales("ImpuestoLocal").ToString, .Importe = DrImpuestosLocales("Importe").ToString.ToDecimal(If(ObjFactura.ConvertirPesos, ObjFactura.TipoCambio, 1))} + Dim ret As New CFDIRetencionesLocales With + { + .TasaRetencion = DrImpuestosLocales("Porcentaje").ToString.ToDecimal, + .ImpuestoLocalRetenido = DrImpuestosLocales("ImpuestoLocal").ToString, + .Importe = DrImpuestosLocales("Importe").ToString.ToDecimal(If(ObjFactura.ConvertirPesos, ObjFactura.TipoCambio, 1)).RoundSQL(2) + } ObjFactura.Timbre.RetencionesLocales.Add(ret) End If Next @@ -18429,39 +18434,44 @@ Partial Class Ventas 'Else 'End If - If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Dev", "Egs", "RNC") Then - Dim sb As New StringBuilder() - sb.Append("La factura se encuentra en el siguiente estatus del SAT:
") - Dim TotalT As Decimal = TxtTotal.Text.ToDecimal - Dim RFCReceptor As String = LblRFC.Text.Trim - Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, UsuarioActual.Empresa.RFC, RFCReceptor, TotalT.ToString(), True) - If Vigencia IsNot Nothing Then - If Vigencia.EsCancelable.ToUpper() = "NO CANCELABLE" Then - Alert("Esta factura no es cancelable.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - If String.IsNullOrEmpty(Vigencia.EsCancelable) Then - If Not String.IsNullOrEmpty(FolioFiscal) Then - Alert("No se pudo encontrar el estatus de la factura en el SAT.", TipoMensaje.MsgAdvertencia) + 'SI ES PRODUCCION VERIFICA EL ESTATUS ANTE EL SAT + If UsuarioActual.Empresa.FacturaProduccion AndAlso Not FolioFiscal.Contains("test") Then + Dim sb As New StringBuilder() + sb.Append("La factura se encuentra en el siguiente estatus del SAT:
") + + Dim TotalT As Decimal = TxtTotal.Text.ToDecimal + Dim RFCReceptor As String = LblRFC.Text.Trim + Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, UsuarioActual.Empresa.RFC, RFCReceptor, TotalT.ToString(), True) + If Vigencia IsNot Nothing Then + If Vigencia.EsCancelable.ToUpper() = "NO CANCELABLE" Then + Alert("Esta factura no es cancelable.", TipoMensaje.MsgAdvertencia) Exit Sub End If - sb.Append("No encontrado
") + If String.IsNullOrEmpty(Vigencia.EsCancelable) Then + If Not String.IsNullOrEmpty(FolioFiscal) Then + Alert("No se pudo encontrar el estatus de la factura en el SAT.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + sb.Append("No encontrado
") + Else + sb.AppendFormat("{0}
", Vigencia.EsCancelable) + End If Else - sb.AppendFormat("{0}
", Vigencia.EsCancelable) + sb.Append("No encontrado
") End If + + sb.Append("Está seguro de cancelar el documento?.") + + LblCancelarDocumento.Text = sb.ToString() + + RegistraScript("$('#ModalCancelarDocumento').modal();") + UpCancelarDocumento.Update() Else - sb.Append("No encontrado
") + CancelarDocumento() End If - sb.Append("Está seguro de cancelar el documento?.") - - LblCancelarDocumento.Text = sb.ToString() - - RegistraScript("$('#ModalCancelarDocumento').modal();") - UpCancelarDocumento.Update() - Else CancelarDocumento() End If diff --git a/vwd.webinfo b/vwd.webinfo index 5155bd0b4..824b76cb0 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -15,6 +15,8 @@ + + \ No newline at end of file