--Timbrado de Servicio parcial de construcción
This commit is contained in:
@@ -475,7 +475,7 @@ Public Class ClsVentas
|
||||
Optional DevolucionImportePagado As Decimal = 0, Optional EsGarantia As Boolean = False, Optional CveLineaAdicional As Integer = -1, Optional DescripcionVenta As String = "",
|
||||
Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional RequiereOS As Boolean = False,
|
||||
Optional FechaParaSurtir As DateTime = MinFecha, Optional Paciente As String = "-1", Optional Episodio As String = "-1", Optional EsFacturaGlobal As Boolean = False, Optional CveSATPeriodicidad As Integer = -1, Optional CveSATMes As Integer = -1, Optional SATAnio As Integer = -1, Optional CveMotivoDevolucion As Integer = -1,
|
||||
Optional CveCobranzaEstatusTurno As Integer = -1, Optional Addenda As String = "", Optional Bloqueada As Boolean = False, Optional CveVentaComplemento As Integer = -1, Optional ComplementoSAT As String = "") As Boolean
|
||||
Optional CveCobranzaEstatusTurno As Integer = -1, Optional Addenda As String = "", Optional Bloqueada As Boolean = False, Optional CveComplementoTimbrado As Integer = -1, Optional ComplementoSAT As String = "") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_VentasAdd")
|
||||
@@ -593,7 +593,7 @@ Public Class ClsVentas
|
||||
.Add("@CveCobranzaEstatusTurno", SqlDbType.Int).Value = CveCobranzaEstatusTurno
|
||||
.Add("@Addenda", SqlDbType.VarChar).Value = Addenda
|
||||
.Add("@Bloqueada", SqlDbType.Bit).Value = Bloqueada
|
||||
.Add("@CveVentaComplemento", SqlDbType.Bit).Value = CveVentaComplemento
|
||||
.Add("@CveComplementoTimbrado", SqlDbType.Int).Value = CveComplementoTimbrado
|
||||
.Add("@ComplementoSAT", SqlDbType.VarChar).Value = ComplementoSAT
|
||||
End With
|
||||
'SqlTypes.SqlDateTime.Null
|
||||
|
||||
@@ -426,6 +426,8 @@ Namespace Modelos
|
||||
'required
|
||||
Public Property Municipio As String
|
||||
'required
|
||||
Public Property CveEstado As Integer
|
||||
'required
|
||||
Public Property Estado As String
|
||||
'required
|
||||
Public Property CodigoPostal As String
|
||||
@@ -8034,6 +8036,7 @@ Namespace Modelos
|
||||
Public Property DescripcionContrato As String = ""
|
||||
Public Property NumeroDescripcionContrato As String = ""
|
||||
Public Property CveComplementoTimbrado As Integer = 0
|
||||
Public Property ComplementoSAT As String = ""
|
||||
Public Property ComplementoINE As Modelos.ComplementoINE
|
||||
Public Property FordGSDB As String = ""
|
||||
Public Property FordASN As String = ""
|
||||
|
||||
@@ -9,6 +9,8 @@ Imports System.Reflection
|
||||
Imports System.Xml
|
||||
Imports System.Xml.Serialization
|
||||
Imports Extensiones
|
||||
Imports Modelos
|
||||
Imports Newtonsoft.Json
|
||||
Imports Newtonsoft.Json.Linq
|
||||
Imports Profact.TimbraCFDI33.Complementos
|
||||
Imports ProfactCartaPorte = Profact.TimbraCFDI33.Complementos.CartaPorte30
|
||||
@@ -993,7 +995,7 @@ Public Class Timbrado
|
||||
' Retorno = If(Ret = "", True, False)
|
||||
|
||||
Case 3
|
||||
Retorno = TimbrarFacturaProFactv40(UsuarioActual, Ventas)
|
||||
Retorno = TimbrarFacturaProFactV40(UsuarioActual, Ventas)
|
||||
Case 4
|
||||
Dim Ret As String = TimbrarFacturaGoCFDIv40(Ventas, UsuarioActual, CvePACEspecial)
|
||||
If Ret <> "" Then MensajeErrorCFDI = Ret
|
||||
@@ -2829,6 +2831,17 @@ concep.DescripcionesEspecificas.NumeroSerie)
|
||||
End If
|
||||
#End Region
|
||||
|
||||
If Ventas.CveComplementoTimbrado = 9 Then
|
||||
Dim settings As New JsonSerializerSettings
|
||||
settings.NullValueHandling = NullValueHandling.Ignore
|
||||
|
||||
Dim pc As Modelos.MParcialesConstruccion = JsonConvert.DeserializeObject(Of MParcialesConstruccion)(Ventas.ComplementoSAT, settings)
|
||||
If pc IsNot Nothing Then
|
||||
cfdi.ParcialesConstruccion(pc.NumPerLicoAut)
|
||||
cfdi.Inmueble(pc.Calle, pc.NoExterior, pc.NoInterior, pc.Colonia, pc.Localidad, pc.Referencia, pc.Municipio, pc.Estado, pc.CodigoPostal)
|
||||
End If
|
||||
End If
|
||||
|
||||
#Region "Genera XML"
|
||||
Dim ArchivoGenerado As Boolean = False
|
||||
Try
|
||||
|
||||
BIN
Bin/GoCfdi.dll
BIN
Bin/GoCfdi.dll
Binary file not shown.
@@ -3436,6 +3436,110 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light xspadding bordered whitoutcol">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">S. Parcial construcción</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form-horizontal form-row-sepe formnombottom" style="display: none;">
|
||||
<div class="form-body">
|
||||
<div class="row" style="display: flex; align-items: center; margin-bottom: 10px;">
|
||||
<div class="col-md-4">
|
||||
NumPerLicoAut
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtNumPerLicoAut" CssClass="form-control" runat="server" CausesValidation="true" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="display: flex; align-items: center; margin-bottom: 10px;">
|
||||
<div class="col-md-4">
|
||||
Calle
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtSCCalle" CssClass="form-control" runat="server" CausesValidation="true" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="display: flex; align-items: center; margin-bottom: 10px;">
|
||||
<div class="col-md-4">
|
||||
No Exterior
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtSCNoExt" CssClass="form-control" runat="server" CausesValidation="true" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="display: flex; align-items: center; margin-bottom: 10px;">
|
||||
<div class="col-md-4">
|
||||
No Interior
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtSCNoInt" CssClass="form-control" runat="server" CausesValidation="true" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="display: flex; align-items: center; margin-bottom: 10px;">
|
||||
<div class="col-md-4">
|
||||
Colonia
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtSCColonia" CssClass="form-control" runat="server" CausesValidation="true" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="display: flex; align-items: center; margin-bottom: 10px;">
|
||||
<div class="col-md-4">
|
||||
Localidad
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtSCLocalidad" CssClass="form-control" runat="server" CausesValidation="true" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="display: flex; align-items: center; margin-bottom: 10px;">
|
||||
<div class="col-md-4">
|
||||
Referencia
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtSCReferencia" CssClass="form-control" runat="server" CausesValidation="true" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="display: flex; align-items: center; margin-bottom: 10px;">
|
||||
<div class="col-md-4">
|
||||
Municipio
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtSCMunicipio" CssClass="form-control" runat="server" CausesValidation="true" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="display: flex; align-items: center; margin-bottom: 10px;">
|
||||
<div class="col-md-4">
|
||||
Estado
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlSCEstado" DataTextField="NombreEstado" DataValueField="CveEstado" runat="server" CssClass="form-control input-sm select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="display: flex; align-items: center; margin-bottom: 10px;">
|
||||
<div class="col-md-4">
|
||||
Código Postal
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtSCCP" CssClass="form-control" runat="server" CausesValidation="true" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -8256,7 +8360,7 @@
|
||||
</div>
|
||||
<div id="DivCancelarEgs" runat="server" visible="false">
|
||||
<h5>
|
||||
<asp:CheckBox ID="ChkCancelarNC" runat="server" Checked="false"/><asp:Label ID="Label4" Text="Cancelar Nota de crédito" runat="server"></asp:Label>
|
||||
<asp:CheckBox ID="ChkCancelarNC" runat="server" Checked="false" /><asp:Label ID="Label4" Text="Cancelar Nota de crédito" runat="server"></asp:Label>
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -15,6 +15,7 @@ Imports Microsoft.Reporting.WebForms
|
||||
Imports Modelos
|
||||
Imports Newtonsoft.Json.Linq
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
Partial Class Ventas
|
||||
Inherits ClsPaginas
|
||||
@@ -2737,6 +2738,10 @@ Partial Class Ventas
|
||||
CargaDdlClientesSucursal()
|
||||
End If
|
||||
|
||||
DdlSCEstado.DataSource = GlobalDTGralEstados("MEX")
|
||||
DdlSCEstado.DataBind()
|
||||
DdlSCEstado.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
|
||||
'SI USUARIO USA AMORTIZACIÓN CONTABLE, se carga las tablas para usarlas mas adelante
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
|
||||
@@ -5295,6 +5300,26 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
HplDownXML.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", DbRowVenta("SerieFolio"), DbRowVenta("TipoDocto"))))
|
||||
|
||||
If Not String.IsNullOrEmpty(DbRowVenta("ComplementoSAT").ToString()) AndAlso DbRowVenta("CveComplementoTimbrado").ToString() = "9" Then
|
||||
Dim settings As New JsonSerializerSettings
|
||||
settings.NullValueHandling = NullValueHandling.Ignore
|
||||
|
||||
Dim pc As Modelos.MParcialesConstruccion = JsonConvert.DeserializeObject(Of MParcialesConstruccion)(DbRowVenta("ComplementoSAT").ToString(), settings)
|
||||
If pc IsNot Nothing Then
|
||||
TxtNumPerLicoAut.Text = pc.NumPerLicoAut
|
||||
TxtSCCalle.Text = pc.Calle
|
||||
TxtSCNoInt.Text = pc.NoInterior
|
||||
TxtSCNoExt.Text = pc.NoExterior
|
||||
TxtSCColonia.Text = pc.Colonia
|
||||
TxtSCLocalidad.Text = pc.Localidad
|
||||
TxtSCReferencia.Text = pc.Referencia
|
||||
TxtSCMunicipio.Text = pc.Municipio
|
||||
DdlSCEstado.SelectedValueExist(pc.CveEstado)
|
||||
TxtSCCP.Text = pc.CodigoPostal
|
||||
End If
|
||||
End If
|
||||
|
||||
Case "Egs"
|
||||
HplDownXML.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", DbRowVenta("SerieFolio"), DbRowVenta("TipoDocto"))))
|
||||
HdnFolioFiscalNC.Value = DbRowVenta("FolioFiscalPadre").ToString()
|
||||
@@ -13498,6 +13523,25 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrEmpty(TxtNumPerLicoAut.Text.Trim()) Then
|
||||
Dim ObjComplemento As New Modelos.MParcialesConstruccion
|
||||
ObjComplemento.NumPerLicoAut = TxtNumPerLicoAut.Text.Trim
|
||||
ObjComplemento.Calle = TxtSCCalle.Text.Trim
|
||||
ObjComplemento.NoInterior = TxtSCNoInt.Text.Trim
|
||||
ObjComplemento.NoExterior = TxtSCNoExt.Text.Trim
|
||||
ObjComplemento.Colonia = TxtSCColonia.Text.Trim
|
||||
ObjComplemento.Localidad = TxtSCLocalidad.Text.Trim
|
||||
ObjComplemento.Referencia = TxtSCReferencia.Text.Trim
|
||||
ObjComplemento.Municipio = TxtSCMunicipio.Text.Trim
|
||||
ObjComplemento.CveEstado = DdlSCEstado.SelectedValue.ToEntero()
|
||||
Dim Estado = GlobalDTGralEstados("MEX").FiltroPrimeroValor("ClaveImpuestoEstado", $"CveEstado = {ObjComplemento.CveEstado}")
|
||||
ObjComplemento.Estado = Estado
|
||||
ObjComplemento.CodigoPostal = TxtSCCP.Text.Trim
|
||||
|
||||
ObjFactura.CveComplementoTimbrado = 9
|
||||
ObjFactura.ComplementoSAT = JsonConvert.SerializeObject(ObjComplemento)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CreaObjetosVentaDevolucion()
|
||||
@@ -14811,7 +14855,6 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC,
|
||||
factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC,
|
||||
factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, 0, factura.FechaPago, factura.Fecha, factura.MotivoDescuento,
|
||||
@@ -14830,7 +14873,7 @@ Partial Class Ventas
|
||||
FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor, Adjunto:=Adjunto, DevolucionImportePagado:=factura.DevolucionImportePagado, EsGarantia:=factura.EsGarantia, ServicioDomicilio:=TrServicioDomicilio.Visible,
|
||||
CveLineaAdicional:=CveLAdicional, DescripcionVenta:=DescripcionVenta,
|
||||
CveMedico:=CveMedico, CveProcedimiento:=CveProcedimiento, CveTipoVenta:=CveTipoVentaGuardar, RequiereOS:=ChkRequiereTecnico.Checked, FechaParaSurtir:=factura.FechaParaSurtir,
|
||||
Paciente:=TxtPaciente.Text, Episodio:=TxtEpisodio.Text, CveMotivoDevolucion:=CveMotivoDevolucion, CveCobranzaEstatusTurno:=DdlGestionCobranza.SelectedValue.ToEntero, Addenda:=factura.Addenda, Bloqueada:=factura.Bloqueada) Then
|
||||
Paciente:=TxtPaciente.Text, Episodio:=TxtEpisodio.Text, CveMotivoDevolucion:=CveMotivoDevolucion, CveCobranzaEstatusTurno:=DdlGestionCobranza.SelectedValue.ToEntero, Addenda:=factura.Addenda, Bloqueada:=factura.Bloqueada, CveComplementoTimbrado:=factura.CveComplementoTimbrado, ComplementoSAT:=factura.ComplementoSAT) Then
|
||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
Else
|
||||
If factura.TipoDocto.Contiene("Dev", "Egs") OrElse DtVentasNC IsNot Nothing OrElse CveEstatusRefacturacion > 0 OrElse CveAnticipoPadre > 0 Then
|
||||
|
||||
Reference in New Issue
Block a user