diff --git a/App_Code/CFDITimbre.vb b/App_Code/CFDITimbre.vb
index 4a747409e..3138f25ba 100644
--- a/App_Code/CFDITimbre.vb
+++ b/App_Code/CFDITimbre.vb
@@ -33,6 +33,13 @@ Public Class CFDITimbre
End Get
End Property
+ Public ReadOnly Property AplicaImpuestosTraslados As Boolean 'detecte si va la etiqueta de impuestos, aunque sea en cero
+ Get
+ Return (From c In Conceptos
+ Select c.Impuestos.Where(Function(tra) tra.TrasladooRetencion = "T" And tra.TipoFactor = "Tasa")).Count() > 0
+ End Get
+ End Property
+
Public ReadOnly Property Retenciones As List(Of CFDIRetenciones)
Get
Dim tRetorno As New List(Of CFDIRetenciones)
@@ -272,8 +279,8 @@ End Class
Public Class CFDIReceptor
Public Property RFC As String
Public Property Nombre As String
- Public Property RegimenFiscalReceptor As String = "601"
- Public Property DomicilioFiscalReceptor As String = "601"
+ Public Property RegimenFiscalReceptor As String = ""
+ Public Property DomicilioFiscalReceptor As String = ""
Public Property ResidenciaFiscal As String = ""
Public Property NumeroRegistroTributario As String = ""
Public Property UsoCFDI As String
diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb
index 9845e2643..e9826f77e 100644
--- a/App_Code/ClsClientes.vb
+++ b/App_Code/ClsClientes.vb
@@ -125,6 +125,7 @@ Public Class ClsClientes
Public Property Celular As String
Public Property ExtOtros As String
Public Property CveUsoCFDI As Integer
+ Public Property CveRegimenFiscal As Integer
Public Property CveFormaPago33 As Integer
Public Property CveMetodoPago33 As Integer
Public Property CveClienteCorporativo As String
@@ -384,6 +385,8 @@ Public Class ClsClientes
_CveFormaPago33 = Data(0)("CveFormaPago33").ToString.ToEntero
_CveMetodoPago33 = Data(0)("CveMetodoPago33").ToString.ToEntero
+ _CveRegimenFiscal = Data(0)("CveRegimenFiscal").ToString.ToEntero
+
_CveClienteCorporativo = Data(0)("CveClienteCorporativo").ToString
_DesglosaIEPS = CType(Data(0)("DesglosaIEPS"), Boolean)
_NoDesglosaIVA = CType(Data(0)("NoDesglosaIVA"), Boolean)
@@ -573,7 +576,7 @@ Public Class ClsClientes
Optional AplicaComercioExterior As Boolean = False, Optional CveTipoOperacion As Integer = -1, Optional CvePedimento As Integer = -1, Optional CveIncoterm As Integer = -1, Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1,
Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1", Optional RequiereOC As Boolean = False,
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0,
- Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1) As Boolean
+ Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional CveRegimenFiscal As Integer = 0) As Boolean
Dim Retorno As Boolean = False
@@ -714,7 +717,7 @@ Public Class ClsClientes
.Add("@CveSATEstado", SqlDbType.Int).Value = CveSATEstado
.Add("@CveAdminTrayecto", SqlDbType.TinyInt).Value = CveAdminTrayecto
-
+ .Add("@CveRegimenFiscal", SqlDbType.TinyInt).Value = CveRegimenFiscal
End With
Try
@@ -763,7 +766,7 @@ Public Class ClsClientes
Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "-1", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1",
Optional ApellidoPaternoPF As String = "-1", Optional ApellidoMaternoPF As String = "-1", Optional NombresPF As String = "-1", Optional RequiereOC As Boolean = False,
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1",
- Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional NoDesglosaIVA As Boolean = False) As Boolean
+ Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional NoDesglosaIVA As Boolean = False, Optional CveRegimenFiscal As Integer = 0) As Boolean
Dim Retorno As Boolean = False
@@ -920,6 +923,7 @@ Public Class ClsClientes
.Add("@CveSATEstado", SqlDbType.Int).Value = CveSATEstado
.Add("@CveAdminTrayecto", SqlDbType.TinyInt).Value = CveAdminTrayecto
+ .Add("@CveRegimenFiscal", SqlDbType.TinyInt).Value = CveRegimenFiscal
End With
Try
diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb
index 9f6902b8d..329fd4b7a 100644
--- a/App_Code/ClsContabilidad.vb
+++ b/App_Code/ClsContabilidad.vb
@@ -73,6 +73,8 @@ Public Class ClsContabilidad
Public Property YaEstabaUnifida As Boolean = False
Public Property EstaContabilizada As Boolean = False
+ Public Property FolioPoliza As Integer
+
#End Region
Public Function IniciaTransacSQL() As SqlTransaction
@@ -191,8 +193,9 @@ Public Class ClsContabilidad
Return Retorno
End Function
- Public Function AddPrePolizas(Modulo As String, CvePlantillaPoliza As Integer, Cargos As Double, Abonos As Double, CveMoneda As Integer, Fecha As Date, Concepto As String, CveUsuario As Integer, CveEmpresa As Integer, Optional FolioFijo As Integer = 0, Optional ReglaFolioPoliza As String = "", Optional CveTipoPoliza As Integer = -1) As Integer
-
+ Public Function AddPrePolizas(Modulo As String, CvePlantillaPoliza As Integer, Cargos As Double, Abonos As Double, CveMoneda As Integer, Fecha As Date, Concepto As String, CveUsuario As Integer, CveEmpresa As Integer, Optional FolioFijo As Integer = 0, Optional ReglaFolioPoliza As String = "", Optional CveTipoPoliza As Integer = -1,
+ Optional AgregarFolio As Boolean = False) As Integer
+ FolioPoliza = -1
Dim Retorno As Integer = -1
DataAdapter("PA_Conta_PrePolizasAdd")
@@ -210,12 +213,16 @@ Public Class ClsContabilidad
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@FolioFijo", SqlDbType.Int).Value = FolioFijo
.Add("@CvePrePoliza", SqlDbType.Int).Direction = ParameterDirection.Output
+ .Add("@FolioPoliza", SqlDbType.Int).Direction = ParameterDirection.Output
.Add("@ReglaFolioPoliza", SqlDbType.VarChar).Value = ReglaFolioPoliza
+ .Add("@AgregarFolio", SqlDbType.Bit).Value = AgregarFolio
End With
Try
SqlAdapter.Fill(Data)
Retorno = SqlAdapter.SelectCommand.Parameters("@CvePrePoliza").Value.ToString.ToEntero
+ FolioPoliza = SqlAdapter.SelectCommand.Parameters("@FolioPoliza").Value.ToString.ToEntero
+
Catch ex As Exception
If ex.Message.Contains("50015;") Then
diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb
index c30973073..04d56a648 100644
--- a/App_Code/ClsGenerales.vb
+++ b/App_Code/ClsGenerales.vb
@@ -2947,6 +2947,24 @@ Public Class ClsGenerales
Return Retorno
End Function
+
+ Public Function GetSATObjetoImpuesto() As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Gral_SAT_ObjetosImpuestos")
+
+ Try
+ SqlAdapter.Fill(Data)
+ If Data.Rows.Count > 0 Then
+ Retorno = True
+ End If
+
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener los objetos de impuestos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+
+ Return Retorno
+ End Function
+
#Region "P A Q U E T E R I A S G U I A S"
Public Function AddPaqueteriasGuias(CvePaqueteria As Integer, CvePaqueteriaGuiaTipo As Integer, CveEstatus As Integer, CveSubProyecto As Integer, Fecha As String, Rastreo As String, Guia As String, NumCajas As Integer,
Peso As Double, Dimensiones As String, FechaEstimada As String, Observaciones As String, CveUsuario As Integer, CveEmpresa As Integer, Optional ImplicaCosto As Boolean = True,
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index eccfb731a..ca387ce30 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -716,6 +716,23 @@ Public Class ClsPaginas
Application("GlobalDTNomSatRegimenContratacion") = value
End Set
End Property
+
+ Property GlobalDTRegimenesFiscales() As DataTable
+ Get
+ Dim AppNombre As String = String.Format("GlobalDTRegimenesFiscales")
+ 'sino existe, recarga los datos
+ If Application(AppNombre) Is Nothing Then
+ Dim ObjGral As New ClsSisEmpresas
+ If ObjGral.GetRegimenFiscal(-1) Then Application(AppNombre) = ObjGral.DtResultados
+ ObjGral.Dispose()
+ End If
+ GlobalDTRegimenesFiscales = DirectCast(Application(AppNombre), DataTable)
+ End Get
+ Set(value As DataTable)
+ Dim AppNombre As String = String.Format("GlobalDTRegimenesFiscales")
+ Application(AppNombre) = value
+ End Set
+ End Property
Property GlobalDTNomSatRiesgoPuesto() As DataTable
Get
GlobalDTNomSatRiesgoPuesto = DirectCast(Application("GlobalDTNomSatRiesgoPuesto"), DataTable)
@@ -1170,6 +1187,25 @@ Public Class ClsPaginas
End Set
End Property
+ Public Shared Property GlobalDTSATObjetosImpuestos() As DataTable
+ Get
+ Dim AppNombre As String = "GlobalDTSATObjetosImpuestos"
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ Dim ObjGral As New ClsGenerales()
+ If ObjGral.GetSATObjetoImpuesto() Then
+ HttpContext.Current.Application(AppNombre) = ObjGral.DtResultados
+ End If
+ ObjGral.Dispose()
+ End If
+
+ Return CType(HttpContext.Current.Application(AppNombre), DataTable)
+ End Get
+ Set(value As DataTable)
+ Dim AppNombre As String = "GlobalDTSATObjetosImpuestos"
+ HttpContext.Current.Application(AppNombre) = value
+ End Set
+ End Property
+
Public Shared Property GlobalDTMotivosCancelacionEmpresa(CveEmpresa As Integer, Optional CveMotivoCancelacion As Integer = -1, Optional CveSATMotivoCancelacion As Integer = -1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTMotivosCancelacionEmpresa-{0}", CveEmpresa)
@@ -6933,7 +6969,7 @@ Public Class ClsPaginas
Dim TC As Decimal = ValorNodoXML(XmlDoc.DocumentElement, "TC").ToDecimal
If TC <= 0 Then TC = 1
- If ValorNodoXML(XmlDoc.DocumentElement, "version") = "3.3" Then
+ If ValorNodoXML(XmlDoc.DocumentElement, "version").Contiene("3.3", "4.0") Then
Vta.FechaEmision = ValorNodoXML(XmlDoc.DocumentElement, "fecha").ToDate
Vta.NoSerieCertificadoContribuyente = ValorNodoXML(XmlDoc.DocumentElement, "NoCertificado")
@@ -7039,7 +7075,7 @@ Public Class ClsPaginas
'Dim CadenaOriginals As String = "||1.0|" + Vta.FolioFiscal + "|" + Vta.FechaCertificacion.ToString("yyyy-MM-dd") + "T" + Vta.FechaCertificacion.ToString("HH:mm:ss") + "|" + Vta.SelloCFDi + "|" + Vta.NoSerieCertificado + "||"
- Dim CadenaOriginals As String = String.Format("||{0}|{1}|{2}T{3}|{4}|{5}||", If(Vta.Version = "3.3", "1.1", "1.0"), Vta.FolioFiscal, Vta.FechaCertificacion.ToString("yyyy-MM-dd"), Vta.FechaCertificacion.ToString("HH:mm:ss"), Vta.SelloCFDi, Vta.NoSerieCertificado)
+ Dim CadenaOriginals As String = String.Format("||{0}|{1}|{2}T{3}|{4}|{5}||", If(Vta.Version.Contiene("3.3", "4.0"), "1.1", "1.0"), Vta.FolioFiscal, Vta.FechaCertificacion.ToString("yyyy-MM-dd"), Vta.FechaCertificacion.ToString("HH:mm:ss"), Vta.SelloCFDi, Vta.NoSerieCertificado)
If Not ImagenCBB.Exists Then ImgCBB = ""
Dim RutaFormato As String = ""
Dim RutaFormatoDefault As String = ""
@@ -7162,7 +7198,7 @@ Public Class ClsPaginas
params.Add(New ReportParameter("MetodoPago", Vta.ClaveMetodoPagoSAT.ToString))
End If
- If Vta.Version = "3.3" Then
+ If Vta.Version.Contiene("3.3", "4.0") Then
params.Add(New ReportParameter("FormaPago", Vta.FormaPago33.ToString))
params.Add(New ReportParameter("MetodoPago", Vta.MetodoPago33.ToString))
params.Add(New ReportParameter("UsoCFDI", Vta.UsoCFDI))
@@ -8342,7 +8378,7 @@ Public Class ClsPaginas
'XmlDoc.Load(Ruta & "XML\\Nomina\NOM A-3845.xml")
XmlDoc.Load(PathXML)
- If ValorNodoXML(XmlDoc.DocumentElement, "version") = "3.3" Then
+ If ValorNodoXML(XmlDoc.DocumentElement, "version").Contiene("3.3", "4.0") Then
FechaEmision = XmlDoc.DocumentElement.Attributes("Fecha").InnerText.ToDate
NoSerieCertificadoContribuyente = XmlDoc.DocumentElement.Attributes("NoCertificado").InnerText
diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb
index e245b1f44..225d0ba99 100644
--- a/App_Code/ClsProductosServicios.vb
+++ b/App_Code/ClsProductosServicios.vb
@@ -418,7 +418,7 @@ Public Class ClsProductosServicios
Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "",
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False,
Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False,
- Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "") As Integer
+ Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0) As Integer
Dim Retorno As Integer = -1
DataAdapter("PA_ProductosServiciosAdd")
@@ -506,6 +506,7 @@ Public Class ClsProductosServicios
.Add("@CveEmbalaje", SqlDbType.Int).Value = CveEmbalaje
.Add("@PesoKg", SqlDbType.SmallMoney).Value = PesoKg
.Add("@Dimensiones", SqlDbType.VarChar).Value = Dimensiones
+ .Add("@CveObjetoImpuesto", SqlDbType.TinyInt).Value = CveObjetoImpuesto
End With
@@ -654,7 +655,7 @@ Public Class ClsProductosServicios
Optional CveClasificacionDetalle As Integer = -1, Optional CveTamaño As Integer = -1, Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "",
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False,
Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False,
- Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "") As Boolean
+ Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0) As Boolean
Dim Retorno As Boolean = False
@@ -744,6 +745,7 @@ Public Class ClsProductosServicios
.Add("@CveEmbalaje", SqlDbType.Int).Value = CveEmbalaje
.Add("@PesoKg", SqlDbType.SmallMoney).Value = PesoKg
.Add("@Dimensiones", SqlDbType.VarChar).Value = Dimensiones
+ .Add("@CveObjetoImpuesto", SqlDbType.TinyInt).Value = CveObjetoImpuesto
End With
diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb
index 2af43a2fd..2f98c6f49 100644
--- a/App_Code/Timbrado.vb
+++ b/App_Code/Timbrado.vb
@@ -868,7 +868,7 @@ Public Class Timbrado
Timbre.Comprobante.FormadePago = ""
Timbre.Comprobante.CondicionesdePago = ""
Timbre.Comprobante.MetodoPago = ""
- Timbre.Comprobante.Subtotal = 0
+ Timbre.Comprobante.SubTotal = 0
Timbre.Comprobante.Descuentos = 0
Timbre.Comprobante.Moneda = "XXX"
Timbre.Comprobante.TipoCambio = ""
@@ -1016,7 +1016,7 @@ Public Class Timbrado
Retorno = TimbrarFacturaProFact(UsuarioActual, Ventas)
'Retorno = TimbrarFacturaProFact(UsuarioActual, Ventas, TmpDTConceptos, TmpDTImpuestos, TmpDTComplementos, Ruta, LstFordASN, FordGSDBM, ObjV)
Case 4
- If Ventas.Version = "4.0" Then
+ If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
Dim Ret As String = TimbrarFacturaGoCFDIv40(Ventas, UsuarioActual, CvePACEspecial)
If Ret <> "" Then MensajeErrorCFDI = Ret
Retorno = If(Ret = "", True, False)
@@ -1094,7 +1094,7 @@ Public Class Timbrado
ObjCFDITimbre.Comprobante.Fecha,
ObjCFDITimbre.Comprobante.FormadePago,
ObjCFDITimbre.Comprobante.CondicionesdePago,
- ObjCFDITimbre.Comprobante.Subtotal,
+ ObjCFDITimbre.Comprobante.SubTotal,
ObjCFDITimbre.Comprobante.Descuentos,
ObjCFDITimbre.Comprobante.TipoCambio.ToDecimal,
ObjCFDITimbre.Comprobante.Moneda,
@@ -1513,7 +1513,7 @@ Public Class Timbrado
ObjCFDITimbre.Comprobante.Fecha.ToString("yyyy-MM-ddTHH:mm:ss"),
ObjCFDITimbre.Comprobante.FormadePago,
ObjCFDITimbre.Comprobante.CondicionesdePago,
- ObjCFDITimbre.Comprobante.Subtotal,
+ ObjCFDITimbre.Comprobante.SubTotal,
ObjCFDITimbre.Comprobante.Descuentos,
ObjCFDITimbre.Comprobante.Moneda,
ObjCFDITimbre.Comprobante.TipoCambio.ToString,
@@ -2106,7 +2106,7 @@ Public Class Timbrado
ObjCFDITimbre.Comprobante.Fecha.ToString("yyyy-MM-ddTHH:mm:ss"),
ObjCFDITimbre.Comprobante.FormadePago,
ObjCFDITimbre.Comprobante.CondicionesdePago,
- ObjCFDITimbre.Comprobante.Subtotal,
+ ObjCFDITimbre.Comprobante.SubTotal,
ObjCFDITimbre.Comprobante.Descuentos,
ObjCFDITimbre.Comprobante.Moneda,
ObjCFDITimbre.Comprobante.TipoCambio.ToString,
@@ -2161,7 +2161,7 @@ Public Class Timbrado
#Region "Impuestos"
'SI NO ES FACTURA EN 0 AGREGA LOS IMPUESTOS
- If Ventas.Total <> 0 And (ObjCFDITimbre.TotalImpuestosRetenidos > 0 OrElse ObjCFDITimbre.TotalImpuestosTrasladados > 0) Then
+ If Ventas.Total <> 0 And (ObjCFDITimbre.TotalImpuestosRetenidos > 0 OrElse ObjCFDITimbre.AplicaImpuestosTraslados) Then
cfdi.Impuestos(ObjCFDITimbre.TotalImpuestosRetenidos, ObjCFDITimbre.TotalImpuestosTrasladados)
End If
#End Region
@@ -2175,8 +2175,8 @@ Public Class Timbrado
Next
End If
-
- If ObjCFDITimbre.Traslados.Sum(Function(x) x.Importe) > 0 Then
+ '' si el importe de impuestos es mayor a cero o si es tasa con importe = 0, debe de ir el atributo
+ If ObjCFDITimbre.AplicaImpuestosTraslados Then
''se acumulan los importes
For Each Tras In ObjCFDITimbre.Traslados
cfdi.Traslado(Tras.Impuesto, Tras.TipoFactor, Tras.TasaOCuota, Tras.Importe)
@@ -2189,45 +2189,45 @@ Public Class Timbrado
If ObjCFDITimbre.RetencionesLocales.Sum(Function(x) x.Importe) > 0 OrElse ObjCFDITimbre.TrasladosLocales.Sum(Function(x) x.Importe) > 0 Then
- cfdi.ImpuestosLocales(ObjCFDITimbre.RetencionesLocales.Sum(Function(x) x.Importe), ObjCFDITimbre.TrasladosLocales.Sum(Function(x) x.Importe))
+ cfdi.ImpuestosLocales(ObjCFDITimbre.RetencionesLocales.Sum(Function(x) x.Importe), ObjCFDITimbre.TrasladosLocales.Sum(Function(x) x.Importe))
- For Each ret As CFDIRetencionesLocales In ObjCFDITimbre.RetencionesLocales
- If ret.Importe > 0 Then
- cfdi.RetencionLocal(ret.ImpuestoLocalRetenido, ret.TasaRetencion, ret.Importe)
- End If
- Next
+ For Each ret As CFDIRetencionesLocales In ObjCFDITimbre.RetencionesLocales
+ If ret.Importe > 0 Then
+ cfdi.RetencionLocal(ret.ImpuestoLocalRetenido, ret.TasaRetencion, ret.Importe)
+ End If
+ Next
- For Each ret As CFDITrasladosLocales In ObjCFDITimbre.TrasladosLocales
- If ret.Importe > 0 Then
- cfdi.TrasladoLocal(ret.ImpuestoLocalTraslado, ret.TasaTraslado, ret.Importe)
- End If
- Next
- End If
+ For Each ret As CFDITrasladosLocales In ObjCFDITimbre.TrasladosLocales
+ If ret.Importe > 0 Then
+ cfdi.TrasladoLocal(ret.ImpuestoLocalTraslado, ret.TasaTraslado, ret.Importe)
+ End If
+ Next
+ End If
- If Ventas.CveComplementoTimbrado > 0 Then
+ If Ventas.CveComplementoTimbrado > 0 Then
- Select Case Ventas.CveComplementoTimbrado
- Case 5 'INE Proceso Ordinario Directivo Estatal"
- cfdi.Ine11("Ordinario", "Directivo Estatal", "0")
+ Select Case Ventas.CveComplementoTimbrado
+ Case 5 'INE Proceso Ordinario Directivo Estatal"
+ cfdi.Ine11("Ordinario", "Directivo Estatal", "0")
- cfdi.IneEntidad(Ventas.ComplementoINE.INEEntidad, "")
- cfdi.IneContabilidad(Ventas.ComplementoINE.INEIdContabilidad)
- Case 6 'INE Proceso Ordinario Ejecutivo Estatal"
- cfdi.Ine11("Ordinario", "Ejecutivo Estatal", "0")
+ cfdi.IneEntidad(Ventas.ComplementoINE.INEEntidad, "")
+ cfdi.IneContabilidad(Ventas.ComplementoINE.INEIdContabilidad)
+ Case 6 'INE Proceso Ordinario Ejecutivo Estatal"
+ cfdi.Ine11("Ordinario", "Ejecutivo Estatal", "0")
- cfdi.IneEntidad(Ventas.ComplementoINE.INEEntidad, "")
- cfdi.IneContabilidad(Ventas.ComplementoINE.INEIdContabilidad)
- Case 7 'INE Proceso Ordinario Ejecutivo Nacional"
+ cfdi.IneEntidad(Ventas.ComplementoINE.INEEntidad, "")
+ cfdi.IneContabilidad(Ventas.ComplementoINE.INEIdContabilidad)
+ Case 7 'INE Proceso Ordinario Ejecutivo Nacional"
- cfdi.Ine11("Ordinario", "Ejecutivo Nacional", Ventas.ComplementoINE.INEIdContabilidad.ToString)
- Case 8 'INE PreCampaña
- cfdi.Ine11(Ventas.ComplementoINE.INETipoProceso, "", "0")
+ cfdi.Ine11("Ordinario", "Ejecutivo Nacional", Ventas.ComplementoINE.INEIdContabilidad.ToString)
+ Case 8 'INE PreCampaña
+ cfdi.Ine11(Ventas.ComplementoINE.INETipoProceso, "", "0")
- cfdi.IneEntidad(Ventas.ComplementoINE.INEEntidad, Ventas.ComplementoINE.INETipoComite)
- cfdi.IneContabilidad(Ventas.ComplementoINE.INEIdContabilidad)
- End Select
+ cfdi.IneEntidad(Ventas.ComplementoINE.INEEntidad, Ventas.ComplementoINE.INETipoComite)
+ cfdi.IneContabilidad(Ventas.ComplementoINE.INEIdContabilidad)
+ End Select
- End If
+ End If
@@ -2236,11 +2236,11 @@ Public Class Timbrado
#Region "Comercio Exterior"
- If Ventas.Cliente.AplicaComercioExterior And ObjCFDITimbre.Complementos.ComercioExterior11.AplicaComercioExteriorSubProyecto Then
- If ObjCFDITimbre.Complementos.ComercioExterior11 IsNot Nothing Then
+ If Ventas.Cliente.AplicaComercioExterior And ObjCFDITimbre.Complementos.ComercioExterior11.AplicaComercioExteriorSubProyecto Then
+ If ObjCFDITimbre.Complementos.ComercioExterior11 IsNot Nothing Then
- 'DATOS GENERALES
- cfdi.ComercioExterior11(ObjCFDITimbre.Complementos.ComercioExterior11.MotivoTraslado,
+ 'DATOS GENERALES
+ cfdi.ComercioExterior11(ObjCFDITimbre.Complementos.ComercioExterior11.MotivoTraslado,
ObjCFDITimbre.Complementos.ComercioExterior11.TipoOperacion,
ObjCFDITimbre.Complementos.ComercioExterior11.ClavedePedimento,
ObjCFDITimbre.Complementos.ComercioExterior11.CertificadoOrigen,
@@ -2251,9 +2251,9 @@ Public Class Timbrado
ObjCFDITimbre.Complementos.ComercioExterior11.Observaciones,
ObjCFDITimbre.Complementos.ComercioExterior11.TipoCambioUSD,
ObjCFDITimbre.Complementos.ComercioExterior11.TotalUSD)
- 'EMISOR
- cfdi.ComercioExterior11Emisor(If(EmisorRFC.Length >= 12, "", ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.CURP))
- cfdi.ComercioExterior11Domicilio(ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Calle,
+ 'EMISOR
+ cfdi.ComercioExterior11Emisor(If(EmisorRFC.Length >= 12, "", ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.CURP))
+ cfdi.ComercioExterior11Domicilio(ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Calle,
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroExterior,
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroInterior,
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Colonia,
@@ -2263,9 +2263,9 @@ Public Class Timbrado
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Estado,
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Pais,
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.CP)
- 'RECEPTOR
- cfdi.ComercioExterior11Receptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumRegIdTrib)
- cfdi.ComercioExterior11DomicilioReceptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Calle,
+ 'RECEPTOR
+ cfdi.ComercioExterior11Receptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumRegIdTrib)
+ cfdi.ComercioExterior11DomicilioReceptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Calle,
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroExterior,
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroInterior,
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Colonia,
@@ -2275,7 +2275,7 @@ Public Class Timbrado
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Estado,
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Pais,
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.CP)
- cfdi.ComercioExterior11Destinatario(ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumRegIdTrib,
+ cfdi.ComercioExterior11Destinatario(ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumRegIdTrib,
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Nombre,
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Calle,
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumeroExterior,
@@ -2287,35 +2287,35 @@ Public Class Timbrado
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Estado,
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Pais,
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.CP)
- 'MERCANCIAS
- If ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias IsNot Nothing AndAlso ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias.Count > 0 Then
- For Each concep As CFDIComercioExterior11Mercancias In ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias
- cfdi.ComercioExterior11Mercancia(concep.NoIdentificacion, concep.FraccionArancelaria, concep.CantidadAduana, concep.UnidadAduana, concep.ValorUnitarioAduana, concep.ValorDolares)
- If concep.DescripcionesEspecificas.Marca <> "" Then
- cfdi.ComercioExterior11MercanciaDescripcionesEspeciales(concep.DescripcionesEspecificas.Marca,
+ 'MERCANCIAS
+ If ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias IsNot Nothing AndAlso ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias.Count > 0 Then
+ For Each concep As CFDIComercioExterior11Mercancias In ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias
+ cfdi.ComercioExterior11Mercancia(concep.NoIdentificacion, concep.FraccionArancelaria, concep.CantidadAduana, concep.UnidadAduana, concep.ValorUnitarioAduana, concep.ValorDolares)
+ If concep.DescripcionesEspecificas.Marca <> "" Then
+ cfdi.ComercioExterior11MercanciaDescripcionesEspeciales(concep.DescripcionesEspecificas.Marca,
concep.DescripcionesEspecificas.Modelo,
concep.DescripcionesEspecificas.SubModelo,
concep.DescripcionesEspecificas.NumeroSerie)
- End If
- Next
-
- End If
-
+ End If
+ Next
End If
+
+
End If
+ End If
#End Region
- End If
+ End If
#Region "C O M P L E M E N T O C A R T A P O R T E"
- If ObjCFDITimbre.Complementos.CartaPorte IsNot Nothing Then
+ If ObjCFDITimbre.Complementos.CartaPorte IsNot Nothing Then
Dim Carta As CFDICartaPorte = ObjCFDITimbre.Complementos.CartaPorte
diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index 240c533cd..66dec1738 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -369,9 +369,14 @@ Partial Class PopUpVerFactura
Dim Envase As String = ""
Dim Tamano As String = ""
Dim Cultivo As String = ""
+ Dim Cultivoingles As String = ""
Dim noPallet As String = ""
Dim FormatoImpresion As String = ""
-
+ Dim Consecutivo As String = ""
+ Dim Fecha As String = ""
+ Dim NoCajas As String = ""
+ Dim NumberOfCode As String = ""
+ Dim CvetypeImpresion As Integer
'Envase = "1 1/9"
'Tamano = "Small"
'Cultivo = "Tomate"
@@ -382,22 +387,46 @@ Partial Class PopUpVerFactura
Envase = row("Envase").ToString()
Tamano = row("Tamaño").ToString()
Cultivo = row("Cultivo").ToString()
+ Cultivoingles = row("Cultivoingles").ToString()
noPallet = row("Codigo").ToString()
FormatoImpresion = row("FormatoImpresion").ToString()
+ Consecutivo = row("Consecutivo").ToString()
+ NoCajas = row("NoCajas").ToString()
+ Fecha = String.Format("{0:MMM dd}", row("Fecha")).Replace(".", "").ToUpper()
+ CvetypeImpresion = row("CvetypeImpresion").ToString().ToEntero()
+ NumberOfCode = String.Format("(01)00856977005186(13){0:ddMMyy}(10){0}01", Regex.Match(row("Cuadro").ToString(), "\\d+"), row("Fecha"))
End If
-
End Using
Dim params As New List(Of ReportParameter)
- params.Add(New ReportParameter("Envase", Envase))
params.Add(New ReportParameter("Tamano", Tamano))
- params.Add(New ReportParameter("Cultivo", Cultivo))
params.Add(New ReportParameter("noPallet", noPallet))
params.Add(New ReportParameter("FormatoImpresion", FormatoImpresion))
+ params.Add(New ReportParameter("Consecutivo", Consecutivo))
+ params.Add(New ReportParameter("Fecha", Fecha))
+ params.Add(New ReportParameter("CveFormato", If(Cultivo.ToLower() = "tomate", "3", CvetypeImpresion.ToString())))
+ params.Add(New ReportParameter("NoCajas", NoCajas))
+ params.Add(New ReportParameter("NumberOfCode", NumberOfCode))
+ params.Add(New ReportParameter("Cultivo", If(CvetypeImpresion = 2, Cultivoingles, Cultivo)))
+ params.Add(New ReportParameter("Envase", If(CvetypeImpresion = 2, "PLU 4062", Envase)))
+
Dim tablaReporte As New DataTable
+
+
+ tablaReporte.Columns.Add(New DataColumn("Codigo", GetType(String)))
+ tablaReporte.Rows.Add(tablaReporte.NewRow)
+ tablaReporte.Rows.Add(tablaReporte.NewRow)
+
+ Dim lrds As New List(Of ReportDataSource)
+ Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = tablaReporte}
+ lrds.Add(rds)
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
- ImprimirPDF("GPS/PalletEtiqueta.rdlc", (New List(Of ReportDataSource)), params, "Pallet Caja")
+ Dim ruta As String = "GPS/PalletEtiquetaCaja.rdlc"
+ 'If CvetypeImpresion = 2 Then
+ ' ruta = "GPS/PalletEtiqueta_2.rdlc"
+ 'End If
+ ImprimirPDF(ruta, lrds, params, "Pallet Caja")
End Sub
#Region "U S U A R I O - T O K E N"
diff --git a/Contabilidad/RegPrePolizaS.aspx b/Contabilidad/RegPrePolizaS.aspx
index 39325be4d..ccd045873 100644
--- a/Contabilidad/RegPrePolizaS.aspx
+++ b/Contabilidad/RegPrePolizaS.aspx
@@ -1,4 +1,4 @@
-<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegPrePolizaS.aspx.vb" Inherits="ContabilidadC_RegPrePolizaS" %>
+<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegPrePolizaS.aspx.vb" Inherits="ContabilidadC_RegPrePolizaS" EnableEventValidation="false" %>
@@ -82,8 +82,12 @@
Folio Bancario: {1}", CveIE, FolioIE)
End If
Next
- If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 1) Then
+ If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePolizaInsertada, 1) Then
If ObjMov.ValorPolizaDescuadre > 0 Then
- GuardaLogAD($"Contabilidad/RegPrePolizas | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
+ GuardaLogAD($"Contabilidad/RegPrePolizas | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePolizaInsertada}", "LogPrePolizas")
MsgError = ObjMov.MensajePolizaDescuadre
End If
End If
- 'El movimiento 2 es el de Pago
- If ChkAutoConta.Checked AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
- If idCuentaContabilizacion > 0 Then
- If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
-
- 'MENSAJE PRINCIPAL
- MensajeAlert.AppendFormat("
Folio de Salida: {1}", ObjMov.ContaIdPoliza, ObjMov.ContaFolio)
- 'Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion)
- Else
- Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico")
- End If
- Else
- Alert("No se puede contabilizar la Prepoliza debido a que una o mas cuentas son inválidas")
- End If
- Else
- MensajeAlert.AppendFormat("
Folio: {1}", CvePrePoliza, ObjMov.ContaFolio)
- End If
-
+
+
Else
MsgError = "No se pudo insertar la póliza"
End If
@@ -1055,23 +1117,27 @@ Partial Class ContabilidadC_RegPrePolizaS
MsgError = "Error"
End Try
- If MsgError = "" Then
- 'MENSAJE IE
- If CveIE Then
- Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion, "window.location.reload()")
- Else
- Alert(If(MensajeAlert.ToString = "", "Se registro con exito.", MensajeAlert.ToString), TipoMensaje.MsgInformacion, "window.location.reload()")
- End If
+ If MsgError = "" Then
+ 'MENSAJE IE
+
+ 'If CveIE Then
+ ' Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion, "window.location.reload()")
+ 'Else
+ ' Alert(If(MensajeAlert.ToString = "", "Se registro con exito.", MensajeAlert.ToString), TipoMensaje.MsgInformacion, "window.location.reload()")
+ 'End If
+
+ Alert(If(MensajeAlert.ToString = "", $"Se registro con exito {If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")}", $"Se registro con exito {If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")} " & MensajeAlert.ToString), TipoMensaje.MsgInformacion, $"window.location.href=""./RegPrePolizaS.aspx?CvePrePoliza={CvePrePolizaInsertada}""")
+
ObjIE.Commit()
If Conta IsNot Nothing Then Conta.Commit()
UPPDocumento.Update()
- TxtObservaciones.Text = ""
+ TxtConcepto.Text = ""
GvMov.DataBind()
- TxtFecha.Text = ""
- TxtObservaciones.Text = ""
+ TxtFechaDocumento.Text = ""
+
Else
Alert(MsgError.ToString, ModExtensiones.TipoMensaje.MsgError)
ObjIE.RollBack()
@@ -1141,7 +1207,7 @@ Partial Class ContabilidadC_RegPrePolizaS
If Not OcurrioError Then
If IdPoliza > 0 AndAlso contador Then
- BtnContabilizar_Click(Nothing, Nothing)
+ ' BtnContabilizar_Click(Nothing, Nothing)
End If
End If
@@ -1152,13 +1218,16 @@ Partial Class ContabilidadC_RegPrePolizaS
BtnAceptar.Text = "Agregar"
LimpiaCampos()
- CargaConceptosContablesE()
+ 'CargaConceptosContablesE()
CargaSubProyectoE()
CargaTipoGastoE()
- UpdatePanel1.Update()
+ UpModalConcepto.Update()
End Sub
- Protected Sub GvPrePoliza_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvPrePoliza.RowUpdating
+
+
+ Protected Sub GvPrePoliza_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvPrePoliza.RowUpdating
+
RegistraScript(String.Format("$('#{0}').modal();", "DivEditConcepto"))
LtlTitulo.Text = "Editar Concepto"
BtnAceptar.Text = "Aceptar"
@@ -1181,10 +1250,32 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim Abono As Double = GvPrePoliza.Rows(IndiceGrid).FCLiteral("TxtAbono").Text.ToDouble
Dim PorcentajeImpuesto As Double = GvPrePoliza.Rows(IndiceGrid).DataKey("PorcentajeImpuesto").ToEntero
- CargaConceptosContablesE()
- DdlConceptosContablesE.SelectedValueExist(CveConceptoContable)
- DdlConceptosContablesE_SelectedIndexChanged(DdlConceptosContablesE, e)
+ 'CargaConceptosContablesE()
+ 'CargaModalConceptoCuentas()
+ DdlConceptosContablesE.SelectedValueExist(CveConceptoContable)
+ DdlConceptosContablesE_SelectedIndexChanged(DdlConceptosContablesE, e)
+
+ TxtModalConceptoTipoCambio.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("TC").ToString.ToDouble.ToString("###,###,###.00")
+ DdlModalConceptoTipoTransaccion.SelectedValueExist(GvPrePoliza.Rows(IndiceGrid).DataKey("ContadoTipoTransaccion"))
+ DdlModalConceptoCuenta.SelectedValueExist(GvPrePoliza.Rows(IndiceGrid).DataKey("ContadoCuenta"))
+ TxtModalConceptoDocumentoFolio.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("ContadoNumeroFolio")
+ TxtModalConceptoDocumentoBeneficiario.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("ContadoBeneficiario")
+ TxtModalConceptoDocumentoObservaciones.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("ContadoObservaciones")
+ TxtModalConceptoDocumentoImporte.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("ContadoImporte").ToDecimal.ToString("###,###,###.00")
+
+ DdlPorcentajeIVAE.SelectedValueExist(PorcentajeImpuesto)
+
+ 'GvPrePoliza.Rows(IndiceGrid).DataKey("")
+
+ 'dr("ContadoTipoTransaccion") = DdlModalConceptoTipoTransaccion.SelectedValue.ToEntero
+ 'dr("ContadoCuenta") = DdlModalConceptoCuenta.SelectedValue.ToEntero
+ 'dr("ContadoNumeroFolio") = TxtModalConceptoDocumentoFolio.Text
+ 'dr("ContadoBeneficiario") = TxtModalConceptoDocumentoBeneficiario.Text
+ 'dr("ContadoObservaciones") = TxtModalConceptoDocumentoObservaciones.Text
+ 'dr("ContadoImporte") = TxtModalConceptoDocumentoImporte.Text.ToDecimal
+
+
DdlProveedoresE.SelectedValueExist(CveProveedor)
DdlProveedoresE_SelectedIndexChanged(DdlProveedoresE, e)
DdlComprasE.SelectedValueExist(CveCompra)
@@ -1215,9 +1306,18 @@ Partial Class ContabilidadC_RegPrePolizaS
If Abono <> 0 Then
TxtAbonoE.Text = Abono
- End If
-
- UpdatePanel1.Update()
+ End If
+
+ If Abono = 0 Then
+ CargaModalConceptoTipoTransaccion("Ing")
+ Else
+ CargaModalConceptoTipoTransaccion("Egs")
+ End If
+
+
+
+
+ UpModalConcepto.Update()
End Sub
Private Sub LimpiaCampos()
@@ -1251,41 +1351,194 @@ Partial Class ContabilidadC_RegPrePolizaS
DdlCuentaContableE.DataBind()
DdlCuentaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0"))
End Sub
+
+
+
+
Private Sub DdlConceptosContablesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContablesE.SelectedIndexChanged
- Dim dr As DataRow = GlobalDTContaConceptosContables(DdlConceptosContablesE.SelectedValue.ToEntero).FiltroPrimero("")
- If dr IsNot Nothing Then
- DdlPorcentajeIVAE.Visible = dr("AplicaImpuesto") = "True"
+
+ 'Aquii hay que consultar el concepto y determinar que es lo que se vba aplicar
+
+ Dim CveConceptoContableInsertar As Integer = DdlConceptosContablesE.SelectedValue.ToEntero
+ Dim DT_Concepto As DataTable
+
+ If CveConceptoContableInsertar > 0 Then
+
+ DT_Concepto = GlobalDTContaConceptosContables(CveConceptoContableInsertar)
+
+ Dim AplicaActivoFijo As Boolean = False
+ Dim AplicaAlmacen As Boolean = False
+ Dim AplicaBancos As Boolean = False 'ok
+ Dim AplicaClasificacion As Boolean = False 'ok
+ Dim AplicaCliente As Boolean = False 'ok
+ Dim AplicaCompra As Boolean = False
+ Dim AplicaImpuesto As Boolean = False
+ Dim AplicaNomina As Boolean = False
+ Dim AplicaPersonal As Boolean = False
+ Dim AplicaProveedor As Boolean = False
+ Dim AplicaSubProyecto As Boolean = False
+ Dim AplicaTC As Boolean = False 'ok
+ Dim AplicaVenta As Boolean = False
+
+ AplicaActivoFijo = Boolean.Parse(DT_Concepto.Rows(0)("AplicaActivoFijo").ToString)
+ AplicaAlmacen = Boolean.Parse(DT_Concepto.Rows(0)("AplicaAlmacen").ToString)
+
+ AplicaBancos = Boolean.Parse(DT_Concepto.Rows(0)("AplicaBancos").ToString)
+ AplicaClasificacion = Boolean.Parse(DT_Concepto.Rows(0)("AplicaClasificacion").ToString)
+ AplicaCliente = Boolean.Parse(DT_Concepto.Rows(0)("AplicaCliente").ToString)
+ AplicaCompra = Boolean.Parse(DT_Concepto.Rows(0)("AplicaCompra").ToString)
+
+ AplicaImpuesto = Boolean.Parse(DT_Concepto.Rows(0)("AplicaImpuesto").ToString)
+ AplicaNomina = Boolean.Parse(DT_Concepto.Rows(0)("AplicaNomina").ToString)
+ AplicaPersonal = Boolean.Parse(DT_Concepto.Rows(0)("AplicaPersonal").ToString)
+ AplicaProveedor = Boolean.Parse(DT_Concepto.Rows(0)("AplicaProveedor").ToString)
+ AplicaSubProyecto = Boolean.Parse(DT_Concepto.Rows(0)("AplicaSubProyecto").ToString)
+ AplicaTC = Boolean.Parse(DT_Concepto.Rows(0)("AplicaTC").ToString)
+ AplicaVenta = Boolean.Parse(DT_Concepto.Rows(0)("AplicaVenta").ToString)
+
+
+
+ If AplicaImpuesto Then
+ DdlPorcentajeIVAE.Visible = True
+ Else
+ DdlPorcentajeIVAE.Visible = False
+ End If
+
+ If AplicaProveedor Then
+ CargaProveedoresE()
+ DvmodalconceptoProveddor.Visible = True
+ DvModalconceptoCompra.Visible = True
+
+ Else
+ DvmodalconceptoProveddor.Visible = False
+ DvModalconceptoCompra.Visible = False
+
+ End If
+
+ If AplicaPersonal Then
+ CargaPersonalE()
+ DvModalconceptoPersonal.Visible = True
+
+ 'DdlPersonalE.Visible = True
+ Else
+ DvModalconceptoPersonal.Visible = False
+
+ 'DdlPersonalE.Visible = False
+ End If
+
+
+ If AplicaClasificacion Then
+ CargaClasificacionesE()
+ DvModalconceptoClasificacion.Visible = True
+ 'DdlClasificacionesE.Visible = True
+ Else
+ DvModalconceptoClasificacion.Visible = False
+ 'DdlClasificacionesE.Visible = False
+ End If
+
+
+ If AplicaCliente Then
+ CargaClientesE()
+
+ DvModalconceptoCliente.Visible = True
+ DvModalconceptoVenta.Visible = True
+
+
+ 'DdlClientesE.Visible = True
+ 'DdlVentasE.Visible = True
+ Else
+
+ DvModalconceptoCliente.Visible = False
+ DvModalconceptoVenta.Visible = False
+
+ 'DdlClientesE.Visible = False
+ 'DdlVentasE.Visible = False
+ End If
+
+
+ If AplicaBancos Then
+ 'DvMoldalConceptoAncho.Attributes.Add("style", "width:1000px")
+ DvMoldalConceptoSeccion1.Attributes.Add("class", "col-md-6")
+ DvMoldalConceptoSeccion2.Visible = True
+ RegistraScript("$('#DvMoldalConceptoAncho').attr('style','width:1000px');")
+ Else
+ ' DvMoldalConceptoAncho.Attributes.Add("style", "width:450px")
+ DvMoldalConceptoSeccion1.Attributes.Add("class", "col-md-12")
+ RegistraScript("$('#DvMoldalConceptoAncho').attr('style','width:450px');")
+ DvMoldalConceptoSeccion2.Visible = False
+ End If
+
+ If AplicaTC Then
+ DVmodalConceptoTipoCambio.Visible = True
+ Else
+ DVmodalConceptoTipoCambio.Visible = False
+ End If
+
+
End If
- If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(5, 17, 201, 206, 14, 15, 16, 19, 25, 26, 21) Then
- CargaProveedoresE()
- DdlProveedoresE.Visible = True
- DdlComprasE.Visible = True
- Else
- DdlProveedoresE.Visible = False
- DdlComprasE.Visible = False
- End If
-
- If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(28, 29) Then
- CargaPersonalE()
- DdlPersonalE.Visible = True
- Else
- DdlPersonalE.Visible = False
- End If
-
- If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(51) Then
- CargaClasificacionesE()
- DdlClasificacionesE.Visible = True
- Else
- DdlClasificacionesE.Visible = False
- End If
- If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39, 12, 91) Then
- CargaClientesE()
- DdlClientesE.Visible = True
- DdlVentasE.Visible = True
- Else
- DdlClientesE.Visible = False
- DdlVentasE.Visible = False
- End If
+
+
+
+
+ 'Dim dr As DataRow = GlobalDTContaConceptosContables(DdlConceptosContablesE.SelectedValue.ToEntero).FiltroPrimero("")
+
+ 'If dr IsNot Nothing Then
+ ' DdlPorcentajeIVAE.Visible = dr("AplicaImpuesto") = "True"
+
+ 'End If
+
+ 'If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(5, 17, 201, 206, 14, 15, 16, 19, 25, 26, 21) Then
+ ' CargaProveedoresE()
+ ' DdlProveedoresE.Visible = True
+ ' DdlComprasE.Visible = True
+ 'Else
+ ' DdlProveedoresE.Visible = False
+ ' DdlComprasE.Visible = False
+ 'End If
+
+ 'If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(28, 29) Then
+ ' CargaPersonalE()
+ ' DdlPersonalE.Visible = True
+ 'Else
+ ' DdlPersonalE.Visible = False
+ 'End If
+
+ 'If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(51) Then
+ ' CargaClasificacionesE()
+ ' DdlClasificacionesE.Visible = True
+ 'Else
+ ' DdlClasificacionesE.Visible = False
+ 'End If
+
+ 'If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39, 12, 91) Then
+ ' CargaClientesE()
+ ' DdlClientesE.Visible = True
+ ' DdlVentasE.Visible = True
+ 'Else
+ ' DdlClientesE.Visible = False
+ ' DdlVentasE.Visible = False
+ 'End If
+
+ 'If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(30) Then
+
+ ' DvMoldalConceptoAncho.Attributes.Add("style", "width:1000px")
+ ' DvMoldalConceptoSeccion1.Attributes.Add("class", "col-md-6")
+ ' DvMoldalConceptoSeccion2.Visible = True
+ 'Else
+
+ ' DvMoldalConceptoAncho.Attributes.Add("style", "width:450px")
+ ' DvMoldalConceptoSeccion1.Attributes.Add("class", "col-md-12")
+ ' DvMoldalConceptoSeccion2.Visible = False
+ 'End If
+
+
+
+
+
+
+ UpModalConcepto.Update()
+
+
End Sub
Private Sub CargaProveedoresE()
DdlProveedoresE.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
@@ -1348,11 +1601,19 @@ Partial Class ContabilidadC_RegPrePolizaS
Private Sub DdlClientesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClientesE.selectedindexchange
CargaVentasE(DdlClientesE.SelectedValue.ToEntero)
End Sub
- Protected Sub BtnAceptar_Click(sender As Object, e As EventArgs) Handles BtnAceptar.Click
+
+
+
+ Protected Sub BtnAceptar_Click(sender As Object, e As EventArgs) Handles BtnAceptar.Click
+
+ 'asdasdasd
If IndiceGrid = -1 Then
+
If DtMovimientos Is Nothing Then CreaDT()
+
If CvePrePoliza > 0 Then
+
Dim IdCtaContable As Integer = CargaCuentasContpaq(DdlCuentaContableE.SelectedValue.ToEntero)
Dim dr As DataRow = DtMovimientos.NewRow
dr("IdCtaContable") = IdCtaContable
@@ -1380,18 +1641,21 @@ Partial Class ContabilidadC_RegPrePolizaS
If DdlPorcentajeIVAE.Visible Then
dr("PorcentajeImpuesto") = DdlPorcentajeIVAE.SelectedValue.ToDecimal
- End If
-
-
+ End If
+
+
+
DtMovimientos.Rows.Add(dr)
DtMovimientos.AcceptChanges()
- If CvePrePoliza > 0 Then
+ If CvePrePoliza > 0 Or CvePrePolizaOrigen Then
GvPrePoliza.DataSource = DtMovimientos
GvPrePoliza.DataBind()
UpPrePoliza.Update()
End If
+
+
TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero
TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero
UpTotalCargo.Update()
@@ -1468,6 +1732,18 @@ Partial Class ContabilidadC_RegPrePolizaS
dr("FolioFactura") = If(DdlComprasE.Visible = True, DdlComprasE.SelectedItem.ToString, If(DdlVentasE.Visible = True, DdlVentasE.SelectedItem.ToString, ""))
dr("Modificado") = True
+ dr("ContadoCuenta") = DdlModalConceptoCuenta.SelectedValue.ToEntero
+ dr("ContadoTipoTransaccion") = DdlModalConceptoTipoTransaccion.SelectedValue.ToEntero
+ dr("ContadoNumeroFolio") = TxtModalConceptoDocumentoFolio.Text
+ dr("ContadoBeneficiario") = TxtModalConceptoDocumentoBeneficiario.Text
+ dr("ContadoObservaciones") = TxtModalConceptoDocumentoObservaciones.Text
+ dr("ContadoImporte") = TxtModalConceptoDocumentoImporte.Text.ToDecimal
+
+ dr("TC") = TxtModalConceptoTipoCambio.Text.ToDecimal
+
+ dr("PorcentajeImpuesto") = DdlPorcentajeIVAE.SelectedValue.ToString.ToDecimal
+
+
'GvPrePoliza.Rows(IndiceGrid).FCHiddenField("HdnConceptoContable").Value = DdlConceptosContablesE.SelectedValue.ToEntero
'GvPrePoliza.Rows(IndiceGrid).FCHiddenField("HdnProveedor").Value = DdlProveedoresE.SelectedValue.ToEntero
@@ -1492,7 +1768,7 @@ Partial Class ContabilidadC_RegPrePolizaS
DtMovimientos.AcceptChanges()
GvPrePoliza.EditIndex = -1
- If CvePrePoliza > 0 Then
+ If CvePrePoliza > 0 Or CvePrePolizaOrigen > 0 Then
GvPrePoliza.DataSource = DtMovimientos
GvPrePoliza.DataBind()
UpPrePoliza.Update()
@@ -1557,7 +1833,7 @@ Partial Class ContabilidadC_RegPrePolizaS
dr("CodigoCuenta") = CodigoCuenta & " " & NombreCuenta
dr("Cuenta") = DdlConceptosContables.SelectedItem
dr("Referencia") = TxtReferencia.Text
- dr("Concepto") = TxtObservaciones.Text
+ dr("Concepto") = TxtConcepto.Text
dr("TipoMovto") = If(Math.Abs(TxtCargo.Text.ToDouble) > 0, 0, 1)
dr("EsComodin") = 0
dr("CveConcepto") = DdlConceptosContables.SelectedValue
@@ -1629,7 +1905,7 @@ Partial Class ContabilidadC_RegPrePolizaS
dr("CodigoCuenta") = CodigoCuenta & " " & NombreCuenta
dr("Cuenta") = DdlConceptosContables.SelectedItem.Text
dr("Referencia") = TxtReferencia.Text
- dr("Concepto") = TxtObservaciones.Text
+ dr("Concepto") = TxtConcepto.Text
dr("TipoMovto") = If(Math.Abs(TxtCargo.Text.ToDouble) > 0, 0, 1)
dr("EsComodin") = 0
dr("CveConcepto") = DdlConceptosContables.SelectedValue
@@ -1815,22 +2091,25 @@ Partial Class ContabilidadC_RegPrePolizaS
If DrM IsNot Nothing Then
HdnCve.Value = idMov.ToString
- DdlCuentaContable.SelectedValue = DrM("CveCuenta")
- TxtReferencia.Text = DrM("Referencia")
- TxtObservaciones.Text = DrM("Concepto")
+ DdlCuentaContable.SelectedValueExist(DrM("CveCuenta").ToString)
+ TxtReferencia.Text = DrM("Referencia").ToString
+ TxtConcepto.Text = DrM("Concepto")
' (Math.Abs(TxtCargo.Text.ToDouble) > 0, 0, 1) = dr("TipoMovto")
DrM("EsComodin") = 0
- DdlConceptosContables.SelectedValue = DrM("CveConcepto").ToString
+ DdlConceptosContables.SelectedValueExist(DrM("CveConcepto").ToString)
TxtCargo.Text = DrM("Cargo").ToString
TxtAbono.Text = DrM("Abono").ToString
- TxtDescripcion.Text = DrM("Descripcion")
- DdlSubProyecto.SelectedValue = DrM("CveSubProyecto")
- DdlProveedores.SelectedValue = DrM("CveProveedor")
- DdlCompras.SelectedValue = DrM("CveCompra")
- DdlPersonal.SelectedValue = DrM("CvePersonal")
- ' DrM("CveClasificacion") = -1
- DdlClientes.SelectedValue = DrM("CveCliente")
- DdlVentas.SelectedValue = DrM("CveVenta")
+ TxtDescripcion.Text = DrM("Descripcion").ToString
+ DdlSubProyecto.SelectedValueExist(DrM("CveSubProyecto").ToString)
+ DdlProveedores.SelectedValueExist(DrM("CveProveedor").ToString)
+ DdlCompras.SelectedValueExist(DrM("CveCompra").ToString)
+ DdlPersonal.SelectedValueExist(DrM("CvePersonal").ToString)
+ ' DrM("CveClasificacion") = -1
+
+ DdlClientes.txtValue.Value = DrM("CveCliente").ToString
+ 'DdlClientes.txtText.Value = DrM("CveCliente").ToString
+
+ DdlVentas.SelectedValueExist(DrM("CveVenta").ToString)
LbCancelarEdicion.Visible = True
LbAgregar.Text = "Actualizar"
@@ -1892,7 +2171,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Private Sub LbCancelarEdicion_Click(sender As Object, e As EventArgs) Handles LbCancelarEdicion.Click
LbCancelarEdicion.Visible = False
- TxtObservaciones.Text = ""
+ TxtConcepto.Text = ""
Actualizar = False
LbAgregar.Text = "Agregar"
End Sub
@@ -2298,29 +2577,29 @@ Partial Class ContabilidadC_RegPrePolizaS
End Function
#End Region
- Private Sub BtnContabilizar_Click(sender As Object, e As EventArgs) Handles BtnContabilizar.Click
+ 'Private Sub BtnContabilizar_Click(sender As Object, e As EventArgs) Handles BtnContabilizar.Click
- Contabilizar()
+ ' Contabilizar()
- End Sub
+ 'End Sub
- Private Sub Contabilizar()
+ 'Private Sub Contabilizar()
- Dim ObjConta As New ClsContabilidad
+ ' Dim ObjConta As New ClsContabilidad
- If IdPoliza > 0 Then 'si está bloqueada, lo desbloqueaprimero
- ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False)
- End If
+ ' If IdPoliza > 0 Then 'si está bloqueada, lo desbloqueaprimero
+ ' ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False)
+ ' End If
- If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IdPoliza > 0, IdPoliza, -1), Concepto:=TxtConcepto.Text, Fecha:=TxtFechaDocumento.Text.ToDateTime()) Then
- Alert(String.Format("Prepóliza contabilizada.
Folio:Ver Póliza", ObjConta.ContaIdPoliza), ModExtensiones.TipoMensaje.MsgInformacion)
+ ' Else
- Alert($"Ocurrio un error al contabilizar {ObjConta.AlertaMensaje}", TipoMensaje.MsgAdvertencia)
- End If
+ ' Alert($"Ocurrio un error al contabilizar {ObjConta.AlertaMensaje}", TipoMensaje.MsgAdvertencia)
+ ' End If
- ObjConta.Dispose()
- End Sub
+ ' ObjConta.Dispose()
+ 'End Sub
#Region "Paquete Egresos"
@@ -2384,5 +2663,392 @@ Partial Class ContabilidadC_RegPrePolizaS
#End Region
+#Region "Crear A Partier de"
+
+
+ Private Sub OcultarControlesCrearApartirDe()
+
+ BtnEliminar.Visible = False
+ 'BtnContabilizar.Visible = False
+ GvPrePoliza.Columns(5).Visible = False
+ DivTG.Visible = False
+ GvMov.Columns(5).Visible = False
+
+ TxtConcepto.Enabled = True
+ TxtFechaDocumento.Text = Now.ToString("dd/MM/yyyy")
+ TxtFechaelaboracion.Text = Now.ToString("dd/MM/yyyy")
+
+ TxtUsuarioElaboro.Text = UsuarioActual.Usuario
+
+
+ End Sub
+
+
+ Private Function ValidaCrearAPartirDe() As Boolean
+
+ Dim Respuesta As Boolean = False
+
+ If CvePlantillaPoliza > 0 Then
+
+ Dim TmpCvePlantillaPoliza As Integer = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("CvePlantillaPoliza", $"CvePlantillaPoliza = {CvePlantillaPoliza}").ToEntero
+
+ If TmpCvePlantillaPoliza > 0 Then
+ Respuesta = True
+ LnkCrearAPartirDe.Visible = True
+ End If
+
+ End If
+
+ Return Respuesta
+
+ End Function
+
+
+ Private Sub CargaPrePolizaOrigen()
+ BtnEliminar.Visible = True
+ LblEncabezado.Text = "Crear a partir de"
+
+ Dim ObjContabilidad As New ClsContabilidad
+ If ObjContabilidad.GetPrePoliza(CvePrePolizaOrigen, UsuarioActual.CveEmpresa) Then
+ Dim dr As DataRow = ObjContabilidad.DtResultados.FiltroPrimero("")
+ If dr IsNot Nothing Then
+ DivAgregarConceptos.Visible = False
+ DdlTipoPoliza.SelectedValue = dr("CveTipoPoliza")
+ TxtFechaDocumento.Text = dr("Fecha")
+ TxtConcepto.Text = dr("Concepto")
+ DivDatosPoliza.Visible = True
+ TipoPoliza = DdlTipoPoliza.SelectedItem.Text
+ Folio = dr("FolioPoliza").ToString
+
+ TxtFolio.Text = ""
+ TxtUsuarioElaboro.Text = dr("Usuario").ToString
+ TxtFechaelaboracion.Text = dr("FechaIng").ToString.ToDate.ToString("dd/MM/yyyy")
+ ' TxtEstatus.Text = If(Boolean.Parse(dr("Estatus").ToString), "Activa", "Inactiva")
+ CvePlantillaPoliza = dr("CvePlantillaPoliza").ToString
+
+ If UsuarioActual.CveRol = 1 OrElse UsuarioActual.TienePermisoProceso(221) Then
+ 'DivAgregarConceptos.Visible = True
+ LnkAddConcepto.Visible = True
+ CargaConceptos()
+ CargaSubProyectos()
+ CargaCuentasContables()
+ End If
+
+ ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePolizaOrigen)
+ DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
+
+
+ If Not DtMovimientos.Columns.Contains("ContadoCuenta") Then
+
+ DtMovimientos.Columns.Add("ContadoCuenta", GetType(Integer))
+ DtMovimientos.Columns.Add("ContadoTipoTransaccion", GetType(Integer))
+ DtMovimientos.Columns.Add("ContadoNumeroFolio", GetType(String))
+ DtMovimientos.Columns.Add("ContadoBeneficiario", GetType(String))
+ DtMovimientos.Columns.Add("ContadoObservaciones", GetType(String))
+ DtMovimientos.Columns.Add("ContadoImporte", GetType(Decimal))
+
+
+ End If
+
+ GvPrePoliza.DataSource = DtMovimientos
+ GvPrePoliza.DataBind()
+
+ If UsuarioActual.CveRol = 1 AndAlso DtMovimientos.COUNT("TC", "TC > 1") > 0 Then
+ GvPrePoliza.Columns(7).Visible = True
+ End If
+
+ If DtMovimientos.FiltraParametros("CveConceptoContable IN (2,17)").Rows.Count > 0 Then
+ LnkComplementoPago.Visible = True
+ End If
+
+
+ If UsuarioActual.CveEmpresa = 119 Then
+ ' BtnContabilizar.Visible = True
+ End If
+
+
+ If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
+ If dr("FolioPoliza").ToString.ToEntero > 0 Then
+ divContabilizada.Visible = True
+ LblFolio.Text = dr("FolioPoliza").ToString
+ Folio = dr("FolioPoliza").ToString
+
+ End If
+ Else
+ If dr("IdPoliza").ToString.ToEntero > 0 Then
+ HplContabilizada.NavigateUrl = String.Format("RegPoliza.aspx?IdPoliza={0}", dr("IdPoliza"))
+ divContabilizada.Visible = True
+ IdPoliza = dr("IdPoliza").ToString.ToEntero
+ ElseIf TxtTotalCargos.Text.ToDouble = TxtTotalAbonos.Text.ToDouble Then
+ 'sino está contabilizada, se activa el botón
+ 'BtnContabilizar.Visible = True
+ End If
+ End If
+
+
+ 'divDatosPrincipales.Visible = False
+ 'divObservaciones.Visible = False
+ UPMovs.Visible = False
+ UPMovs.Update()
+ UPPDocumento.Update()
+ UpPrePoliza.Update()
+
+ RegistraScript("comparar();")
+
+ If Request("Tipo") IsNot Nothing AndAlso IsNumeric(Request("Tipo")) AndAlso Request("Tipo").ToEntero = 1 AndAlso UsuarioActual.CveUsuario <> 100 Then
+ 'For Each row As GridViewRow In GvPrePoliza.Rows
+ ' row.FCTextBox("TxtCargo").Enabled = False
+ ' row.FCTextBox("TxtAbono").Enabled = False
+ 'Next
+ End If
+ LnkExcel.Visible = False
+ LnkImprimirPDF.Visible = True
+ Else
+ Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia)
+ BtnEliminar.Visible = False
+ End If
+
+ End If
+
+ ObjContabilidad.Dispose()
+ UpPoliza.Update()
+ End Sub
+
+
+ Protected Sub LnkCrearAPartirDe_Click(sender As Object, e As EventArgs)
+ Response.Redirect($"./RegPrePolizaS.aspx?CvePrePolizaOrigen={CvePrePoliza}")
+ End Sub
+
+
+ Private Sub CrarPrePolizaApartirDe()
+ Dim CvePrePoliza As Integer
+ Dim FolioPoliza As Integer
+
+ Dim TotalCargos, TotalAbonos As Decimal
+
+ For Each Gvr As GridViewRow In GvPrePoliza.Rows
+ TotalCargos += Gvr.FCLiteral("TxtCargo").Text.ToDecimal
+ TotalAbonos += Gvr.FCLiteral("TxtAbono").Text.ToDecimal
+ Next
+
+
+ 'validaciones
+ If Not (TotalCargos = TotalAbonos AndAlso (GvPrePoliza.Rows.Count > 0)) Then
+ Alert($"La suma de los movimientos no son iguales ({TotalCargos}-{TotalAbonos})", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+
+
+ 'terminan validaciones
+
+ If CvePrePoliza > 0 Then
+ ActualizarPrePoliza()
+ Else
+ Dim MensajeAlert = New StringBuilder
+ Dim ObjIE As New ClsBancos()
+ Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
+ ' Dim ObjNom As New ClsNominas(ObjIE.IniciaTransacSQL)
+ Dim Conta As ClsContPAQi = Nothing
+ Dim IDPoliza As Integer = 0
+ Dim MsgError As String = ""
+ Dim CveIE As Integer
+ Dim FolioIE As String = ""
+
+ Try
+
+ Dim ConceptoPoliza As String = TxtConcepto.Text
+
+ CvePrePoliza = ObjMov.AddPrePolizas("Contabilidad/RegPrePolizaCrear", CvePlantillaPoliza, TotalCargos, TotalAbonos, 1, TxtFechaDocumento.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=DdlTipoPoliza.SelectedValue.ToEntero, AgregarFolio:=True)
+
+ If CvePrePoliza > 0 Then
+
+ FolioPoliza = ObjMov.FolioPoliza
+
+ Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:
"
+ Dim idCuentaContabilizacion As Long = 1
+ Dim Importe As Double = 0
+ Dim ImporteME As Decimal = 0
+ Dim TipoCambio As Decimal = 1
+ Dim TipoMovto As Boolean = False
+ Dim IdCtaContable As Integer = 0
+
+
+ 'inserto las compras que voy a pagarDdlSaldos
+ For Each gvr As GridViewRow In GvPrePoliza.Rows
+
+
+
+ ImporteME = 0
+ TipoCambio = 1
+
+ If Boolean.Parse(gvr.DataKey("TipoMovto")) Then
+
+ Importe = gvr.FCLiteral("TxtAbono").Text.ToDouble
+ TipoMovto = True
+
+ If gvr.DataKey("EsComplementaria") = "True" Then
+ ImporteME = gvr.FCLiteral("TxtAbono").Text.ToDecimal 'me
+ TipoCambio = gvr.FCTextBox("TxtModalConceptoDocumentoImporte").Text.ToDecimal
+ End If
+
+ Else
+ Importe = gvr.FCLiteral("TxtCargo").Text.ToDouble
+ TipoMovto = False
+
+ If gvr.DataKey("EsComplementaria") = "True" Then
+ ImporteME = gvr.FCTextBox("TxtCargo").Text.ToDecimal 'me
+ TipoCambio = gvr.FCTextBox("TxtModalConceptoDocumentoImporte").Text.ToDecimal
+ End If
+
+ End If
+
+
+ If gvr.DataKey("CveConceptoContable").ToEntero = 30 Then
+
+
+ CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, gvr.DataKey("ContadoNumeroFolio").ToString,
+ gvr.DataKey("ContadoBeneficiario").ToString, Importe, CveMoneda, 0, gvr.DataKey("ContadoObservaciones").ToString, "",
+ False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
+ FolioIE = gvr.DataKey("ContadoNumeroFolio").ToString
+ If CveIE < 0 Then
+ MsgError = "No se pudo registrar movimiento bancario"
+ Exit For
+ End If
+
+ End If
+
+
+
+
+ If gvr.DataKey("CveConceptoContable").ToEntero <> 30 Then
+
+ If gvr.DataKey("CveConceptoContable").ToEntero = 41 Then
+ CveIE = gvr.FCDropDownList("DdlSaldos").SelectedValue.ToEntero
+ Else
+ CveIE = -1
+ End If
+
+ End If
+
+
+ If idCuentaContabilizacion = 1 AndAlso (IdCtaContable = 0) Then
+ idCuentaContabilizacion = 0
+ End If
+ If Importe <> 0 Then
+ Dim tCveCuenta As Integer = gvr.DataKey("CveCuenta").ToEntero
+
+
+
+ If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, gvr.DataKey("Referencia"), gvr.DataKey("CveConceptoContable").ToEntero, gvr.DataKey("Concepto"),
+ TxtFechaDocumento.Text.ToDate, IdCtaContable, -1, CveSubProyecto:=gvr.DataKey("CveSubProyecto").ToEntero, CveIE:=CveIE,
+ CveProveedor:=gvr.DataKey("CveProveedor").ToEntero, CveCompra:=gvr.DataKey("CveCompra").ToEntero,
+ CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, CveClasificacion:=gvr.DataKey("CveClasificacion").ToEntero,
+ ImporteMX:=Importe, ImporteME:=ImporteME, TipoCambio:=TipoCambio, CveTipoGasto:=gvr.DataKey("CveTipoGasto").ToEntero,
+ CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCuenta:=tCveCuenta) Then
+
+
+ Else
+ MsgError = "No se pudo insertar el detalle de la póliza2"
+ Exit For
+ End If
+ End If
+ If CveIE > 0 AndAlso gvr.DataKey("CveConceptoContable").ToEntero = 30 Then
+ MensajeAlert.AppendFormat("
diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb
index 3f903f6d9..fe9167a1a 100644
--- a/Ventas/Clientes.aspx.vb
+++ b/Ventas/Clientes.aspx.vb
@@ -753,6 +753,10 @@ Partial Class Clientes
DivRetIVA.Visible = False
End If
+ If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
+ divRegimen.Visible = True
+ End If
+
If Request("CveCliente") IsNot Nothing AndAlso IsNumeric(Request("CveCliente")) AndAlso Request("CveCliente").ToEntero() > 0 Then
'If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 77 AndAlso Not Request("CveCliente").Contiene("10450", "10460", "10458") Then
' BtnGuardar.Enabled = False : BtnEliminar.Enabled = False : LbAgregarSucursal.Enabled = False : LbEnviarActivacionPortal.Enabled = False
@@ -788,8 +792,16 @@ Partial Class Clientes
UpAccionesCRM.Update()
End If
- If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso UsuarioActual.CveRol.Contiene(1280, 1511) Then
- DeshabilitarDatosClienteCajas()
+ If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'si es acumuladora
+ 'AndAlso UsuarioActual.CveRol.Contiene(1280, 1511)
+ If Not PermiteEditar() Then 'sino puede editar todos los datos del cliente, se bloquean los de distribuidor
+ DeshabilitarDatosClienteCajas()
+ If UsuarioActual.TienePermisoProceso(309) Then 'si tiene permiso para edditar datos pero no de distribuidro
+ BtnGuardar.Visible = True
+ End If
+
+ End If
+
End If
End If
@@ -816,6 +828,7 @@ Partial Class Clientes
Else
'Configuración de Modalidad Insert
CargaEstados()
+ BtnGuardar.Visible = PermiteGuardar()
If UsuarioActual.Empresa.Funcionalidad(525) = "1" Then
Dim ObjClientes As New ClsClientes
@@ -876,15 +889,6 @@ Partial Class Clientes
'Crea y carga CuentasBancarias - tab:Bancos
CargaCuentasBancarias()
-
- 'PERMISOS PAGINA
- If CveCliente > 0 Then
- LtlTareaNueva.Text = String.Format(" Tarea", CveCliente)
- BtnEliminar.Visible = PermiteEliminar()
- BtnGuardar.Visible = PermiteEditar()
- Else
- BtnGuardar.Visible = PermiteGuardar()
- End If
UpGuardar.Update()
'[IPP]: SOLO PARA JAM
@@ -1246,10 +1250,9 @@ Partial Class Clientes
CargaClasificaciones()
- If UsuarioActual.Empresa.UsaContabilidad Then
- 'CargaCuentasContables()
- End If
+ DdlRegimenFiscal.DataSource = GlobalDTRegimenesFiscales
+ DdlRegimenFiscal.DataBind()
CargaCombosComercioExterior()
@@ -1426,6 +1429,9 @@ Partial Class Clientes
If ObjClientes.DtResultados.Rows.Count > 0 Then
Existe = True
Retorno = True
+ LtlTareaNueva.Text = String.Format(" Tarea", CveCliente)
+ BtnEliminar.Visible = PermiteEliminar()
+ BtnGuardar.Visible = PermiteEditar()
CargaDdlSucursalCliente()
CargaDocumentosVenta(CveCliente)
@@ -1574,6 +1580,7 @@ Partial Class Clientes
DdlUsoCFDI.SelectedValueExist(ObjClientes.CveUsoCFDI.ToString())
DdlMetodoPago33.SelectedValueExist(ObjClientes.CveMetodoPago33.ToString())
DdlFormaPago33.SelectedValueExist(ObjClientes.CveFormaPago33.ToString())
+ DdlRegimenFiscal.SelectedValueExist(ObjClientes.CveRegimenFiscal)
ChkDesglosarIEPS.Checked = ObjClientes.DesglosaIEPS
ChkNoDesglosaIVA.Checked = ObjClientes.NoDesglosaIVA
@@ -2613,7 +2620,8 @@ Partial Class Clientes
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(), DesglosaIEPS:=ChkDesglosarIEPS.Checked, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero(), CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero(), CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero(),
CvePais:=DdlPais.SelectedValue.ToEntero(), CveEstado:=DdlEstado.SelectedValue.ToEntero(), CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero(), CveColonia:=DdlColonia.SelectedValue.ToEntero(), CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(),
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked,
- TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero())) Then
+ TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()),
+ CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero) Then
ViewState("CveCliente") = ObjClientes.CveCliente
@@ -2710,7 +2718,7 @@ Partial Class Clientes
ApellidoPaternoPF:=IIf(TxtApellidoPaterno.Text = "", "-1", TxtApellidoPaterno.Text).ToString(), ApellidoMaternoPF:=IIf(TxtApellidoMaterno.Text = "", "-1", TxtApellidoMaterno.Text).ToString(), NombresPF:=IIf(TxtNombres.Text = "", "-1", TxtNombres.Text).ToString(),
RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(),
CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()),
- NoDesglosaIVA:=ChkNoDesglosaIVA.Checked) Then
+ NoDesglosaIVA:=ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero) Then
ObjClientes.LimpiaImpuestosLocales(CveCliente)
@@ -9475,14 +9483,12 @@ Partial Class Clientes
GvUsadosResumen.DataSource = ObjAcum.DtResultados
ImporteBonificacion = ObjAcum.DtResultados.Rows(5)("Valor").ToString().ToDecimal()
End If
- GvUsadosResumen.DataBind()
-
-
- 'LnkFacturaUsadosCargos.Visible = If(ImporteCargo > 0, True, False)
- LnkFacturaUsadosBonificacion.Visible = If(ImporteBonificacion > 0, True, False)
ObjAcum.Dispose()
GvAcum.DataBind()
+ GvUsadosResumen.DataBind()
+ 'LnkFacturaUsadosCargos.Visible = If(ImporteCargo > 0, True, False)
+ LnkFacturaUsadosBonificacion.Visible = If(ImporteBonificacion > 0, True, False)
UpAcciones.Update()
'UpUsadosResumen.Update()
diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb
index 8daf157f8..08500af56 100644
--- a/Ventas/ClientesAbonar.aspx.vb
+++ b/Ventas/ClientesAbonar.aspx.vb
@@ -621,46 +621,46 @@ Partial Class Ventas_ClientesAbonar
End If
End If
- Dim ValFechaDocumento As Boolean = False
+ If RblTipoPago.SelectedValue = "1" Then
+
+
+ Dim ValFechaDocumento As Boolean = False
Dim FoliosFechasValFechaDocumento As New StringBuilder
FoliosFechasValFechaDocumento.AppendLine("Se seleccionaron facturas con fecha de mes superior al mes del pago: ")
- For Each gvRowVal As GridViewRow In GvCxC.Rows
+ For Each gvRowVal As GridViewRow In GvCxC.Rows
- If gvRowVal.FCCheckBox("Chk").Checked Then
+ If gvRowVal.FCCheckBox("Chk").Checked Then
- Dim FechaFactura As Date = gvRowVal.DataKey("Fecha").ToDate
- Dim FechaDocumento As Date = TxtFechaDocumento.Text.ToDate
+ Dim FechaFactura As Date = gvRowVal.DataKey("Fecha").ToDate
+ Dim FechaDocumento As Date = TxtFechaDocumento.Text.ToDate
- Dim AnioFactura As Integer = FechaFactura.Year
- Dim MesFactura As Integer = FechaFactura.Month
+ Dim AnioFactura As Integer = FechaFactura.Year
+ Dim MesFactura As Integer = FechaFactura.Month
- Dim AnioDocumento As Integer = FechaDocumento.Year
- Dim MesDocumento As Integer = FechaDocumento.Month
+ Dim AnioDocumento As Integer = FechaDocumento.Year
+ Dim MesDocumento As Integer = FechaDocumento.Month
+
+ If UsuarioActual.Empresa.UsaAC = False Then
+ If AnioFactura > AnioDocumento Then
+ FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") } ")
+ ValFechaDocumento = True
+ ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then
+ FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") } ")
+ ValFechaDocumento = True
+ End If
- If UsuarioActual.Empresa.UsaAC = False Then
- If AnioFactura > AnioDocumento Then
- FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") } ")
- ValFechaDocumento = True
- ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then
- FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") } ")
- ValFechaDocumento = True
End If
-
End If
+ Next
+
+ If ValFechaDocumento Then
+ Alert(FoliosFechasValFechaDocumento.ToString, TipoMensaje.MsgAdvertencia)
+ Exit Sub
End If
-
- Next
-
-
- If ValFechaDocumento Then
- Alert(FoliosFechasValFechaDocumento.ToString, TipoMensaje.MsgAdvertencia)
- Exit Sub
End If
-
-
If Not TxtImporte.Text.ToDecimal > 0 Then
Alert("Debe de llevar un Importe", TipoMensaje.MsgAdvertencia)
Exit Sub
diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx
index 8c5172390..9d68c30bf 100644
--- a/Ventas/ProductosServicios.aspx
+++ b/Ventas/ProductosServicios.aspx
@@ -501,10 +501,19 @@
$
-
+
+
+
+
+
+
+
+
+
+
-
+
@@ -947,6 +956,7 @@
+
@@ -997,44 +1007,74 @@
-
-
-
-
- Carta Porte
-
-
-
+
+
+
+
+
+
+
+ Carta Porte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Limpiar datos
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb
index 386782326..0ff1aca73 100644
--- a/Ventas/ProductosServicios.aspx.vb
+++ b/Ventas/ProductosServicios.aspx.vb
@@ -276,6 +276,9 @@ Partial Class ProductosyServicios
'DdlTipoPSDes.Attributes.Add("onChange", "CreaDescripcionPS();")
End If
+
+
+
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
TxtPS.CssClass = "form-control Mayuscula"
End If
@@ -338,6 +341,12 @@ Partial Class ProductosyServicios
CargaCombosSeccionAlmacen()
+ If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then 'emisión 4.0
+ DivObjetoImpuesto.Visible = True
+ DdlObjetoImpuesto.DataSource = GlobalDTSATObjetosImpuestos
+ DdlObjetoImpuesto.DataBind()
+ End If
+
CreaDtSeccionAlmacen()
If UsuarioActual.Empresa.UsaContabilidad Then
@@ -902,6 +911,7 @@ Partial Class ProductosyServicios
DdlMedida.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveMedida").ToString)
DdlRin.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveRinTamaño").ToString)
+ DdlObjetoImpuesto.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveObjetoImpuesto").ToString)
'If ObjProductosServicios.CvePSAdicional > 0 Then
' DdlPSAdicional.SelectedValue = ObjProductosServicios.CvePSAdicional.ToString
' DdlPSAdicional.SelectedText = ObjProductosServicios.PSCodigoAdicional
@@ -1366,7 +1376,8 @@ Partial Class ProductosyServicios
CveModelo:=DdlModelo.SelectedValue.ToEntero(), CveMedida:=DdlMedida.SelectedValue.ToEntero(), CveRinTamaño:=DdlRin.SelectedValue.ToEntero(),
ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString,
ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked,
- CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim) > 0 Then
+ CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim,
+ CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero) > 0 Then
ViewState("CvePS") = ObjProductosServicios.CvePS
For Each GVR As GridViewRow In GvImpuestosLocales.Rows
If GVR.FCCheckBox("ChkDeduccion").Checked Then
@@ -1416,7 +1427,8 @@ Partial Class ProductosyServicios
ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString,
ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked,
AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked,
- CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim) Then
+ CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim,
+ CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero) Then
If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then
TieneError = True
@@ -3117,7 +3129,7 @@ Partial Class ProductosyServicios
Else
'No es matgerial peligroso
- If DdlMaterialPeligroso.txtValue.Value.ToEntero > 0 Or DdlEmbalaje.txtValue.Value.ToEntero > 0 Or TxtPesoKg.Text.Trim.Length > 0 Then
+ If DdlMaterialPeligroso.txtValue.Value.ToEntero > 0 Or DdlEmbalaje.txtValue.Value.ToEntero > 0 Then
RegistraScript("$('#DivModalMensaje').modal('show');")
ValidaMaterialPeligrosoMensaje = False
LblModalMensajeCuerpo.Text = "El producto servicio del SAT seleccionado no esta clasificado como material peligroso, favor de limpiar los datos de la sección carta porte en la pestaña Contabilidad - Inventarios, el incluir estos datos en un material no peligroso generara errores al timbrar traslados."
@@ -3153,4 +3165,19 @@ Partial Class ProductosyServicios
+ Protected Sub LnkCPLimpiarConfiguracion_Click(sender As Object, e As EventArgs)
+
+ DdlMaterialPeligroso.txtText.Value = ""
+ DdlMaterialPeligroso.txtValue.Value = ""
+
+
+ DdlEmbalaje.txtText.Value = ""
+ DdlEmbalaje.txtValue.Value = ""
+
+ UpCartaPorte.Update()
+
+ End Sub
+
+
+
End Class
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index 586392173..1d3e82ccf 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -10983,13 +10983,15 @@ Partial Class Ventas
If Obj.FacturarSucursal Then
Timbre.Receptor.RFC = Obj.ClienteSucursal.RFC
Timbre.Receptor.Nombre = Obj.ClienteSucursal.Nombre
+ Timbre.Receptor.DomicilioFiscalReceptor = Obj.ClienteSucursal.CP
Else
Timbre.Receptor.RFC = Obj.Cliente.RFC
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
+ Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP
End If
Timbre.Receptor.RegimenFiscalReceptor = Obj.Cliente.CodigoRegimenFiscal
- Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP
+
Timbre.Receptor.ResidenciaFiscal = ""
Timbre.Receptor.NumeroRegistroTributario = ""
Timbre.Receptor.UsoCFDI = Obj.ClaveUsoCFDI
@@ -11129,7 +11131,8 @@ Partial Class Ventas
.ClaveProdServ = drr("SATClaveProdServ").ToString(),
.Noidentificacion = drr("Noidentificacion").ToString(),
.CuentaPredial = drr("CuentaPredial").ToString(),
- .ImporteGravaIVAAdicional = drr("ImporteIEPS").ToString().ToDecimal}
+ .ImporteGravaIVAAdicional = drr("ImporteIEPS").ToString().ToDecimal,
+ .ObjetoImpuesto = drr("CodigoObjetoImpuesto").ToString()}
'verifica suma subtotales
If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal.RoundSQL(2) <> concepto.Importe.RoundSQL(2) AndAlso Math.Abs(totSubTotal.RoundSQL(2) - concepto.Importe.RoundSQL(2)) <= 0.01 Then 'proceso de ajusta de decimales
concepto.Importe = totSubTotal
@@ -17751,6 +17754,7 @@ Partial Class Ventas
Row("CveTipoPS") = DrPS("CveTipoPS")
Row("CveTipoInvPS") = DrPS("Inv_CveMetodoInventario")
Row("CveTamaño") = DrPS("CveTamaño")
+ Row("CodigoObjetoImpuesto") = DrPS("CodigoObjetoImpuesto")
If CveClasificacion <= 0 Then Row("CveClasificacion") = DrPS("CveClasificacion")
If Clasificacion = "" Then Row("Clasificacion") = DrPS("Clasificacion")
@@ -18300,6 +18304,7 @@ Partial Class Ventas
TmpDT.Columns.Add("TieneProntoPago", GetType(String))
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
+ TmpDT.Columns.Add("CodigoObjetoImpuesto", GetType(String))
TmpDT.Columns("EsOutSourcing").DefaultValue = False
TmpDT.Columns("EsCargo").DefaultValue = False
@@ -18307,6 +18312,7 @@ Partial Class Ventas
TmpDT.Columns("TieneProntoPago").DefaultValue = "No"
TmpDT.Columns("ImporteProntoPago").DefaultValue = 0
+
End Sub
Private Sub CreaDTmpC()
DTmpC = New DataTable
diff --git a/vwd.webinfo b/vwd.webinfo
index 5b42c0490..7266d7de6 100644
--- a/vwd.webinfo
+++ b/vwd.webinfo
@@ -408,6 +408,8 @@
+
+