This commit is contained in:
2023-07-05 22:08:55 -07:00
19 changed files with 219 additions and 226 deletions

View File

@@ -1125,27 +1125,16 @@ Public Class ClsBancos
Dim Timbrado As New Timbrado Dim Timbrado As New Timbrado
Dim CFDIVersion As String = "4.0" Dim CFDIVersion As String = "4.0"
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then If GetComplementoPagosImpuestos(CveIE, UsuarioActual.CveEmpresa) Then
dttpagosimpuestos = DtResultados
End If
If GetComplementoPagosImpuestos(CveIE, UsuarioActual.CveEmpresa) Then Timbre = Timbrado.PreparaTimbrePago40(RFCEmpresa, UsuarioActual.Empresa.Empresa, UsuarioActual.Empresa.CodigoRegimenFiscal,
dttpagosimpuestos = DtResultados
End If
Timbre = Timbrado.PreparaTimbrePago40(RFCEmpresa, UsuarioActual.Empresa.Empresa, UsuarioActual.Empresa.CodigoRegimenFiscal,
RFCCliente, dr("NombreCliente").ToString, dr("ClienteCP").ToString, dr("CodigoRegimenFiscal").ToString, Serie, Folio.ToString, FechaTimbrado, Cuentapago, RFCCliente, dr("NombreCliente").ToString, dr("ClienteCP").ToString, dr("CodigoRegimenFiscal").ToString, Serie, Folio.ToString, FechaTimbrado, Cuentapago,
dr("FechaDocumento").ToString.ToDate, dr("ClaveFormaPagoSAT").ToString, dr("AbreviaturaSAT").ToString, dr("VentasTotalPagado").ToString.ToDecimal, dr("FechaDocumento").ToString.ToDate, dr("ClaveFormaPagoSAT").ToString, dr("AbreviaturaSAT").ToString, dr("VentasTotalPagado").ToString.ToDecimal,
UsuarioActual.Empresa.CP.ToString, CuentaBeneficiario, dr("TipoCambioPago").ToString.ToDecimal, dttpagos, dttpagosimpuestos, CFDIRelacionado:=CFDIRelacionado, UsuarioActual.Empresa.CP.ToString, CuentaBeneficiario, dr("TipoCambioPago").ToString.ToDecimal, dttpagos, dttpagosimpuestos, CFDIRelacionado:=CFDIRelacionado,
RfcACuentaTerceros:=dr("RfcACuentaTerceros").ToString, NombreACuentaTerceros:=dr("NombreACuentaTerceros").ToString, RegimenFiscalACuentaTerceros:=dr("RegimenFiscalACuentaTerceros").ToString, DomicilioFiscalACuentaTerceros:=dr("DomicilioFiscalACuentaTerceros").ToString) RfcACuentaTerceros:=dr("RfcACuentaTerceros").ToString, NombreACuentaTerceros:=dr("NombreACuentaTerceros").ToString, RegimenFiscalACuentaTerceros:=dr("RegimenFiscalACuentaTerceros").ToString, DomicilioFiscalACuentaTerceros:=dr("DomicilioFiscalACuentaTerceros").ToString)
Else
CFDIVersion = "3.3"
Timbre = Timbrado.PreparaTimbrePago(RFCEmpresa, UsuarioActual.Empresa.Empresa, UsuarioActual.Empresa.CodigoRegimenFiscal,
RFCCliente, dr("NombreCliente").ToString, Serie, Folio.ToString, FechaTimbrado, Cuentapago,
dr("FechaDocumento").ToString.ToDate, dr("ClaveFormaPagoSAT").ToString, dr("AbreviaturaSAT").ToString, dr("VentasTotalPagado").ToString.ToDecimal,
UsuarioActual.Empresa.CP.ToString, CuentaBeneficiario, dr("TipoCambioPago").ToString.ToDecimal, dttpagos, CFDIRelacionado:=CFDIRelacionado, EsCancelacion:=False)
End If
''PREPARA PARA CANCELACION POR SUSTITUCION DE COMPLEMENTO DE PAGO ''PREPARA PARA CANCELACION POR SUSTITUCION DE COMPLEMENTO DE PAGO
'If CFDIRelacionado <> "-1" And CFDIRelacionado <> "" Then 'If CFDIRelacionado <> "-1" And CFDIRelacionado <> "" Then

View File

@@ -5423,11 +5423,9 @@ Public Class ClsPaginas
params.Add(New ReportParameter("CETipoCambio", CETipoCambio)) params.Add(New ReportParameter("CETipoCambio", CETipoCambio))
End If End If
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then params.Add(New ReportParameter("CFDIVersion", Vta.Version))
params.Add(New ReportParameter("CFDIVersion", Vta.Version)) If Vta.Cliente.CodigoRegimenFiscal.ToString.Length > 0 Then
If Vta.Cliente.CodigoRegimenFiscal.ToString.Length > 0 Then params.Add(New ReportParameter("RegimenFiscalCodigo", $"{Vta.Cliente.CodigoRegimenFiscal}-{Vta.Cliente.RegimenFiscal}"))
params.Add(New ReportParameter("RegimenFiscalCodigo", $"{Vta.Cliente.CodigoRegimenFiscal}-{Vta.Cliente.RegimenFiscal}"))
End If
End If End If
'CLIENTE 'CLIENTE
@@ -6963,7 +6961,7 @@ Public Class ClsPaginas
Dim FechaRecibo = "" Dim FechaRecibo = ""
Dim ProveedorIntermediario As String = "" Dim ProveedorIntermediario As String = ""
Dim RegimenFiscalCodigo As String = "" Dim RegimenFiscalCodigo As String = ""
Dim CFDIVersion As String = If(UsuarioActual.Empresa.Funcionalidad(350) = "1", "4.0", "3.3") Dim CFDIVersion As String = "4.0"
Dim Observaciones As String = "" Dim Observaciones As String = ""
'DT PAGO 'DT PAGO
@@ -7060,10 +7058,8 @@ Public Class ClsPaginas
params.Add(New ReportParameter("ClienteCP", ObjClientes.CP)) params.Add(New ReportParameter("ClienteCP", ObjClientes.CP))
params.Add(New ReportParameter("ClienteRFC", ObjClientes.RFC)) params.Add(New ReportParameter("ClienteRFC", ObjClientes.RFC))
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then If ObjClientes.CodigoRegimenFiscal.ToString.Length > 0 Then
If ObjClientes.CodigoRegimenFiscal.ToString.Length > 0 Then RegimenFiscalCodigo = $"{ObjClientes.CodigoRegimenFiscal}-{ObjClientes.RegimenFiscal}"
RegimenFiscalCodigo = $"{ObjClientes.CodigoRegimenFiscal}-{ObjClientes.RegimenFiscal}"
End If
End If End If
End If End If
ObjClientes.Dispose() ObjClientes.Dispose()
@@ -7102,11 +7098,9 @@ Public Class ClsPaginas
cfdVer = "http://www.sat.gob.mx/cfd/4" cfdVer = "http://www.sat.gob.mx/cfd/4"
End If End If
If Version = "4.0" Then If Version = "4.0" Then
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then params.Add(New ReportParameter("CFDIVersion", Version))
params.Add(New ReportParameter("CFDIVersion", Version)) If ObjClientes.CodigoRegimenFiscal.ToString.Length > 0 Then
If ObjClientes.CodigoRegimenFiscal.ToString.Length > 0 Then params.Add(New ReportParameter("RegimenFiscalCodigo", RegimenFiscalCodigo))
params.Add(New ReportParameter("RegimenFiscalCodigo", RegimenFiscalCodigo))
End If
End If End If
End If End If
namespaces.AddNamespace(Prefijo, cfdVer) namespaces.AddNamespace(Prefijo, cfdVer)
@@ -7162,7 +7156,7 @@ Public Class ClsPaginas
If Version = "3.3" Then DrRelacionado("MetodoDePagoDR") = Relacionado.Attributes("MetodoDePagoDR").Value If Version = "3.3" Then DrRelacionado("MetodoDePagoDR") = Relacionado.Attributes("MetodoDePagoDR").Value
If Version = "4.0" Then DrRelacionado("ObjetoImpDR") = Relacionado.Attributes("ObjetoImpDR").Value If Version = "4.0" Then DrRelacionado("ObjetoImpDR") = Relacionado.Attributes("ObjetoImpDR").Value
DrRelacionado("MonedaDR") = Relacionado.Attributes("MonedaDR").Value DrRelacionado("MonedaDR") = Relacionado.Attributes("MonedaDR").Value
If UsuarioActual.Empresa.Funcionalidad(350) = "1" AndAlso Version = "4.0" Then If Version = "4.0" Then
Dim NodosTraslados = Relacionado.SelectNodes($"{PagoVersion}:ImpuestosDR/{PagoVersion}:TrasladosDR/{PagoVersion}:TrasladoDR", namespaces) Dim NodosTraslados = Relacionado.SelectNodes($"{PagoVersion}:ImpuestosDR/{PagoVersion}:TrasladosDR/{PagoVersion}:TrasladoDR", namespaces)
For Each NodoTraslados As XmlNode In NodosTraslados For Each NodoTraslados As XmlNode In NodosTraslados
Dim BaseDR As String = ValorXML(NodoTraslados, "BaseDR") Dim BaseDR As String = ValorXML(NodoTraslados, "BaseDR")

View File

@@ -86,7 +86,7 @@ Public Class LogicNominas
Dim versionTimbre As VersionTimbradoEnum = versionTimbrex Dim versionTimbre As VersionTimbradoEnum = versionTimbrex
If versionTimbre = VersionTimbradoEnum.PorDefectoEmpresa Then If versionTimbre = VersionTimbradoEnum.PorDefectoEmpresa Then
versionTimbre = If(UsuarioActual.Empresa.Funcionalidad(350) = "1", VersionTimbradoEnum.Version4_0, VersionTimbradoEnum.Version3_3) versionTimbre = VersionTimbradoEnum.Version4_0
End If End If
Dim continuar As Boolean = True Dim continuar As Boolean = True

View File

@@ -42,8 +42,7 @@ Public Class Timbres
Private Sub CreaObjetosTraslados(TipoDocto As String, CveTimbre As Integer) Private Sub CreaObjetosTraslados(TipoDocto As String, CveTimbre As Integer)
ObjFactura = New Modelos.Factura ObjFactura = New Modelos.Factura
ObjFactura.Version = "3.3" ObjFactura.Version = "4.0"
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then ObjFactura.Version = "4.0"
ObjFactura.CveUsuario = UsuarioActual.CveUsuario ObjFactura.CveUsuario = UsuarioActual.CveUsuario
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa

View File

@@ -1497,11 +1497,7 @@ Partial Class Ventas_ClientesAbonar
ObjFacturaDevolucion.TipoDocto = "Egs" ObjFacturaDevolucion.TipoDocto = "Egs"
ObjFacturaDevolucion.Fecha = Now ObjFacturaDevolucion.Fecha = Now
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then ObjFacturaDevolucion.Version = "4.0"
ObjFacturaDevolucion.Version = "4.0"
Else
ObjFacturaDevolucion.Version = "3.3"
End If
ObjFacturaDevolucion.CveMetodoPago33 = 1 ObjFacturaDevolucion.CveMetodoPago33 = 1
ObjFacturaDevolucion.MetodoPago33 = "PUE - Pago en una sola exhibición" ObjFacturaDevolucion.MetodoPago33 = "PUE - Pago en una sola exhibición"
@@ -1671,11 +1667,7 @@ Partial Class Ventas_ClientesAbonar
Timbre.Receptor.DomicilioFiscalReceptor = Obj.ClienteSucursal.CP Timbre.Receptor.DomicilioFiscalReceptor = Obj.ClienteSucursal.CP
Else Else
Timbre.Receptor.RFC = Obj.Cliente.RFC Timbre.Receptor.RFC = Obj.Cliente.RFC
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then Timbre.Receptor.Nombre = Obj.Cliente.Nombre
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
Else
Timbre.Receptor.Nombre = Obj.Cliente.Nombre + " " + Obj.Cliente.RegimenSociedad
End If
Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP
End If End If

View File

@@ -5782,8 +5782,12 @@ Partial Class PopUpVerFactura
Dim EstadoCancelacion = drv("EstadoCancelacion").ToString() Dim EstadoCancelacion = drv("EstadoCancelacion").ToString()
Dim FechaCancelacion = drv("FechaCancelacion").ToString.ToDateTime Dim FechaCancelacion = drv("FechaCancelacion").ToString.ToDateTime
Dim MotivoCancelacion As String = "" ' drv("MotivoCancelacion").ToString()
Dim FolioSustitucion As String = "" ' drv("FolioFiscalPadre").ToString()
Dim DirectorioArchivo As String = String.Format("{0}Empresas\Grales\Formatos\AcuseCancelacion.mrt", ModExtensiones.DirectorioBaseEmpresas)
Dim RFCEmisor = UsuarioActual.Empresa.RFC Dim RFCEmisor = UsuarioActual.Empresa.RFC
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Empresas\Grales\Formatos\AcuseCancelacion.rdlc", ModExtensiones.DirectorioBaseEmpresas))
Dim Titulo As String = "Acuse de cancelación de CFDI" Dim Titulo As String = "Acuse de cancelación de CFDI"
Dim EstadoCFDI As String = "Cancelado" Dim EstadoCFDI As String = "Cancelado"
@@ -5802,9 +5806,27 @@ Partial Class PopUpVerFactura
End If End If
If CveEstatusFactura = 20 Then If CveEstatusFactura = 20 Then
DirectorioArchivo = String.Format("{0}Empresas\Grales\Formatos\AcuseCancelacionSolicitud.mrt", ModExtensiones.DirectorioBaseEmpresas)
Titulo = "Acuse de solicitud de cancelación de CFDI" Titulo = "Acuse de solicitud de cancelación de CFDI"
EstadoCFDI = "Vigente" EstadoCFDI = "Vigente"
Using ObjV As New ClsVentas
If ObjV.GetVentasPendientesCancelacion(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, CveVenta:=CveVenta) Then
Dim RowCancelacion = ObjV.DtResultados.FiltroPrimero("")
If RowCancelacion IsNot Nothing Then
Dim CveMotivoCancelacion = RowCancelacion("CveMotivoCancelacion").ToString().ToEntero()
FolioSustitucion = RowCancelacion("FolioFiscalSustitucion").ToString()
If CveMotivoCancelacion > 0 Then
MotivoCancelacion = GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveMotivoCancelacion:=CveMotivoCancelacion).FiltroPrimeroValor("CodigoSATDescripcion")
End If
End If
End If
End Using
'SI TIENE DATOS EN EL SELLO DE SOLICITUD Y ESTA EN PROCESO, ENVIAR ESTE SELLO 'SI TIENE DATOS EN EL SELLO DE SOLICITUD Y ESTA EN PROCESO, ENVIAR ESTE SELLO
If Not String.IsNullOrEmpty(SelloSolicitudCancelacion) Then If Not String.IsNullOrEmpty(SelloSolicitudCancelacion) Then
SelloCancelacion = SelloSolicitudCancelacion SelloCancelacion = SelloSolicitudCancelacion
@@ -5829,6 +5851,8 @@ Partial Class PopUpVerFactura
End If End If
End If End If
Dim Archivo As New System.IO.FileInfo(DirectorioArchivo)
Dim params As New List(Of ReportParameter) Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("Titulo", Titulo)) params.Add(New ReportParameter("Titulo", Titulo))
params.Add(New ReportParameter("FolioFiscal", FolioFiscal)) params.Add(New ReportParameter("FolioFiscal", FolioFiscal))
@@ -5840,7 +5864,29 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("MsgError", "")) params.Add(New ReportParameter("MsgError", ""))
params.Add(New ReportParameter("FechaCancelacion", FechaCancelacion.ToString("dd/MM/yyyy HH:mm:ss"))) params.Add(New ReportParameter("FechaCancelacion", FechaCancelacion.ToString("dd/MM/yyyy HH:mm:ss")))
ImprimirPDF(Archivo.FullName, DtDetalle, params, "AcuseCancelacion" & CveVenta) 'ImprimirPDF(Archivo.FullName, DtDetalle, params, "AcuseCancelacion" & CveVenta)
Dim DtAcuse As DataTable = Nothing
If CveEstatusFactura = 20 Then
DtAcuse = New DataTable("DtAcuse")
DtAcuse.Columns.Add(New DataColumn("FolioFiscal", GetType(String)))
DtAcuse.Columns.Add(New DataColumn("Estatus", GetType(String)))
DtAcuse.Columns.Add(New DataColumn("MotivoCancelacion", GetType(String)))
DtAcuse.Columns.Add(New DataColumn("FolioSustitucion", GetType(String)))
Dim RowCFDI = DtAcuse.NewRow()
RowCFDI("FolioFiscal") = FolioFiscal
RowCFDI("Estatus") = "Solicitud de cancelación recibida"
RowCFDI("MotivoCancelacion") = MotivoCancelacion
RowCFDI("FolioSustitucion") = FolioSustitucion
DtAcuse.Rows.Add(RowCFDI)
End If
ImprimirPDFStimulsoft(Archivo.FullName, DtAcuse, params, "AcuseCancelacion" & CveVenta)
End If End If

View File

@@ -2984,7 +2984,7 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P
<Width>19.59037cm</Width> <Width>19.59037cm</Width>
<Page> <Page>
<PageHeader> <PageHeader>
<Height>6.48735cm</Height> <Height>6.74082cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage> <PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage> <PrintOnLastPage>true</PrintOnLastPage>
<ReportItems> <ReportItems>
@@ -3478,9 +3478,9 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>Serie/Folio:</Value> <Value>Serie/Folio</Value>
<Style> <Style>
<FontSize>9pt</FontSize> <FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
<Color>Brown</Color> <Color>Brown</Color>
</Style> </Style>
@@ -3492,7 +3492,7 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P
<rd:DefaultName>Textbox31</rd:DefaultName> <rd:DefaultName>Textbox31</rd:DefaultName>
<Left>0.00031cm</Left> <Left>0.00031cm</Left>
<Height>0.47652cm</Height> <Height>0.47652cm</Height>
<Width>1.90028cm</Width> <Width>1.72389cm</Width>
<ZIndex>7</ZIndex> <ZIndex>7</ZIndex>
<Style> <Style>
<Border> <Border>
@@ -3513,7 +3513,7 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P
<TextRun> <TextRun>
<Value>=First(Fields!Serie.Value, "Comprobante") + " - " + First(Fields!Folio.Value, "Comprobante")</Value> <Value>=First(Fields!Serie.Value, "Comprobante") + " - " + First(Fields!Folio.Value, "Comprobante")</Value>
<Style> <Style>
<FontSize>9pt</FontSize> <FontSize>8pt</FontSize>
</Style> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
@@ -3521,9 +3521,9 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox32</rd:DefaultName> <rd:DefaultName>Textbox32</rd:DefaultName>
<Left>1.90059cm</Left> <Left>1.75948cm</Left>
<Height>0.47652cm</Height> <Height>0.47652cm</Height>
<Width>2.86701cm</Width> <Width>3.00812cm</Width>
<ZIndex>8</ZIndex> <ZIndex>8</ZIndex>
<Style> <Style>
<Border> <Border>
@@ -3788,8 +3788,8 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P
<rd:DefaultName>Textbox43</rd:DefaultName> <rd:DefaultName>Textbox43</rd:DefaultName>
<Top>1.71005cm</Top> <Top>1.71005cm</Top>
<Left>0.00035cm</Left> <Left>0.00035cm</Left>
<Height>0.56193cm</Height> <Height>0.27936in</Height>
<Width>9.99712cm</Width> <Width>3.93587in</Width>
<ZIndex>6</ZIndex> <ZIndex>6</ZIndex>
<Style> <Style>
<Border> <Border>
@@ -3890,8 +3890,8 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P
<rd:DefaultName>Textbox43</rd:DefaultName> <rd:DefaultName>Textbox43</rd:DefaultName>
<Top>1.71005cm</Top> <Top>1.71005cm</Top>
<Left>9.99747cm</Left> <Left>9.99747cm</Left>
<Height>0.56193cm</Height> <Height>0.27936in</Height>
<Width>9.59253cm</Width> <Width>3.77637in</Width>
<ZIndex>9</ZIndex> <ZIndex>9</ZIndex>
<Style> <Style>
<Border> <Border>
@@ -3908,7 +3908,7 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P
<KeepTogether>true</KeepTogether> <KeepTogether>true</KeepTogether>
<Top>4.21537cm</Top> <Top>4.21537cm</Top>
<Left>0.00007cm</Left> <Left>0.00007cm</Left>
<Height>2.27198cm</Height> <Height>2.41961cm</Height>
<Width>19.59023cm</Width> <Width>19.59023cm</Width>
<ZIndex>9</ZIndex> <ZIndex>9</ZIndex>
<Style> <Style>
@@ -4347,7 +4347,6 @@ First(Fields!NoCertificadoSAT.Value, "TimbreFiscalDigital")</Value>
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox25</rd:DefaultName> <rd:DefaultName>Textbox25</rd:DefaultName>
<Top>0cm</Top>
<Left>1.5001in</Left> <Left>1.5001in</Left>
<Height>0.15625in</Height> <Height>0.15625in</Height>
<Width>6.2125in</Width> <Width>6.2125in</Width>

View File

@@ -1929,7 +1929,7 @@ Partial Class Inventarios_EntradasSalidas
Else Else
'Dim Total As Decimal = 0 'Dim Total As Decimal = 0
If CveConceptoContable.Contiene(181, 78, 51) Then If CveConceptoContable.Contiene(181, 78, 51, 69) Then
Dim Dt As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"}).Copy Dim Dt As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"}).Copy
'Dim IdCuentaGasto As Integer = 0 'Dim IdCuentaGasto As Integer = 0
For Each Dr As DataRow In Dt.Rows For Each Dr As DataRow In Dt.Rows

View File

@@ -566,7 +566,7 @@ public partial class Nomina_Finiquito : ClsPaginas
string Msg = ""; string Msg = "";
Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: (UsuarioActual.CveEmpresa == 119 ? VersionTimbradoEnum.PorDefectoEmpresa : VersionTimbradoEnum.Version3_3)); Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: VersionTimbradoEnum.Version4_0);
if (Msg != null && Msg.Length > 0) if (Msg != null && Msg.Length > 0)
{ Alert(Msg, TipoMensaje.MsgAdvertencia); } { Alert(Msg, TipoMensaje.MsgAdvertencia); }
@@ -1433,7 +1433,7 @@ public partial class Nomina_Finiquito : ClsPaginas
int CveConcepto = DdlmcConceptos.SelectedValue.ToEntero(); int CveConcepto = DdlmcConceptos.SelectedValue.ToEntero();
if (CveConcepto > 0 && CvePersonal > 0) if (CveConcepto > 0 && CvePersonal > 0)
{ {
decimal ImporteConcepto = TxtmcImporte.Text.Replace("$", "").Replace(",", "").ToDecimal(); decimal ImporteConcepto = chkImporte ==1?TxtmcImporte.Text.Replace("$", "").Replace(",", "").ToDecimal():0;
decimal ImporteGravadoConcepto = TxtmcImporteGrabado.Text.Replace("$", "").Replace(",", "").ToDecimal(); decimal ImporteGravadoConcepto = TxtmcImporteGrabado.Text.Replace("$", "").Replace(",", "").ToDecimal();
decimal ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto; decimal ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto;
decimal ImporteValor = Txtmcvalor.Text.Replace("$", "").Replace(",", "").ToDecimal(); decimal ImporteValor = Txtmcvalor.Text.Replace("$", "").Replace(",", "").ToDecimal();

View File

@@ -1442,7 +1442,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
LogicNominas lognom = new LogicNominas(); LogicNominas lognom = new LogicNominas();
string Msg = ""; string Msg = "";
Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: (UsuarioActual.CveEmpresa == 119 ? VersionTimbradoEnum.PorDefectoEmpresa : VersionTimbradoEnum.Version3_3)); Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: VersionTimbradoEnum.Version4_0);
if (Msg != null && Msg.Length > 0) if (Msg != null && Msg.Length > 0)
{ {
@@ -1715,7 +1715,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
//CURP = drow["CURP"].ToString(); //CURP = drow["CURP"].ToString();
} }
string Msg = "";// lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, (UsuarioActual.CveUsuario == 100 ? 4 : 4)); string Msg = "";// lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, (UsuarioActual.CveUsuario == 100 ? 4 : 4));
Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: (UsuarioActual.CveEmpresa == 119 ? VersionTimbradoEnum.PorDefectoEmpresa : VersionTimbradoEnum.Version3_3)); Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: VersionTimbradoEnum.Version4_0);
if (Msg != null && Msg.Length > 0)//<pre>{4}</pre><span style='display:none'>{1}</span> if (Msg != null && Msg.Length > 0)//<pre>{4}</pre><span style='display:none'>{1}</span>
{ Alert(string.Format("El empleado no se pudo timbrar, el sat nos devolvio el siguiente mensaje:<br/>{1}", Msg, msgCorregidoSat(Msg, CvePersonal, RFC, CURP)), TipoMensaje.MsgAdvertencia); } { Alert(string.Format("El empleado no se pudo timbrar, el sat nos devolvio el siguiente mensaje:<br/>{1}", Msg, msgCorregidoSat(Msg, CvePersonal, RFC, CURP)), TipoMensaje.MsgAdvertencia); }
@@ -3874,7 +3874,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
CvePersonal = DdlmcPersonal.SelectedValue.ToEntero(); CvePersonal = DdlmcPersonal.SelectedValue.ToEntero();
} }
int CveConcepto = DdlmcConceptos.SelectedValue.ToEntero(); int CveConcepto = DdlmcConceptos.SelectedValue.ToEntero();
decimal ImporteConcepto = TxtmcImporte.Text.Replace("$", "").Replace(",", "").ToDecimal(); decimal ImporteConcepto = chkImporte==1? TxtmcImporte.Text.Replace("$", "").Replace(",", "").ToDecimal():0;
decimal ImporteGravadoConcepto = ChkCalAutomaticoG.Checked ? 0.0m : TxtmcImporteGrabado.Text.Replace("$", "").Replace(",", "").ToDecimal(); decimal ImporteGravadoConcepto = ChkCalAutomaticoG.Checked ? 0.0m : TxtmcImporteGrabado.Text.Replace("$", "").Replace(",", "").ToDecimal();
decimal ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto; decimal ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto;
decimal ImporteValor = Txtmcvalor.Text.Replace("$", "").Replace(",", "").ToDecimal(); decimal ImporteValor = Txtmcvalor.Text.Replace("$", "").Replace(",", "").ToDecimal();
@@ -7234,7 +7234,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
bool continuar = true; bool continuar = true;
int chkImporte = 1; int chkImporte = 1;
int chkImporteGravado = 0; int chkImporteGravado = 1;
int chkImporteValor = 1; int chkImporteValor = 1;
string[] getcolumnas = new string[] { "CvePersonal", "Nombre", "CveMetodoPago", "SumaPercepciones", "Total", "SalarioDiario", "SalarioDiarioIMSS", "SalarioDiarioIntegrado", "DiasLaborados", "DiasFaltados", "DiasVacaciones", "DiasIncapacidad" }; string[] getcolumnas = new string[] { "CvePersonal", "Nombre", "CveMetodoPago", "SumaPercepciones", "Total", "SalarioDiario", "SalarioDiarioIMSS", "SalarioDiarioIntegrado", "DiasLaborados", "DiasFaltados", "DiasVacaciones", "DiasIncapacidad" };
@@ -7317,7 +7317,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
{ {
CveConcepto = rcon["CveConcepto"].ToString().ToEntero(); CveConcepto = rcon["CveConcepto"].ToString().ToEntero();
ImporteConcepto = rcon["Importe"].ToString().ToDecimal(); ImporteConcepto = chkImporte==1? rcon["Importe"].ToString().ToDecimal() :0;
ImporteGravadoConcepto = rcon["ImporteGravado"].ToString().ToDecimal(); ImporteGravadoConcepto = rcon["ImporteGravado"].ToString().ToDecimal();
ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto; ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto;
ImporteValor = rcon["Valor"].ToString().ToDecimal(); ImporteValor = rcon["Valor"].ToString().ToDecimal();

View File

@@ -958,7 +958,7 @@
var Tam = TamañoVentana(); var Tam = TamañoVentana();
var Alto = Tam.height - 400; var Alto = Tam.height - 400;
$(".sidebar-toggler-wrapper").remove(); //$(".sidebar-toggler-wrapper").remove();
$('#<%=GvBancosCuentas.ClientID%>').DataTable({ scrollY: Alto + 'px', scrollCollapse: true, paging: false, searching: false, info: false, order: [[1, "desc"]] }); $('#<%=GvBancosCuentas.ClientID%>').DataTable({ scrollY: Alto + 'px', scrollCollapse: true, paging: false, searching: false, info: false, order: [[1, "desc"]] });

View File

@@ -110,13 +110,27 @@
</asp:UpdatePanel> </asp:UpdatePanel>
<div style=" text-align: right" "> <div style=" text-align: right" ">
<div >
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GV.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GV.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div> </div>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="portlet light xspadding bordered " id="pnlasistencia">
<div class="portlet-title">
<div class="caption ">
<i class="icon-pin font-yellow-gold"></i>
<span class="caption-subject font-yellow-gold bold uppercase">Registros de asistencias del
<asp:Label ID="lblFecha" runat="server" Text=""></asp:Label>
<asp:Button ID="btnconsultarnew" OnClick="btnconsultarnew_Click" Visible="false" runat="server" Text="Consultar otra fecha" class="btn btn-success" />
</span>
</div>
<div class="tools">
<div >
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GV.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GV.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm font-bold yellow-gold"><i class="icon-magnifier"></i></a>
</div>
</div>
</div>
<div class="portlet-body GvAsistenciaDiv" style="padding: 0px;">
<asp:GridView ID="GV" runat="server" AutoGenerateColumns="false" DataKeyNames="CvePersonal,CveCliente" EmptyDataText="No se encontró Personal asignado al Proyecto o al Cliente" ToolTip="Listado de Personal" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None"> <asp:GridView ID="GV" runat="server" AutoGenerateColumns="false" DataKeyNames="CvePersonal,CveCliente" EmptyDataText="No se encontró Personal asignado al Proyecto o al Cliente" ToolTip="Listado de Personal" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
<Columns> <Columns>
<asp:TemplateField HeaderStyle-Width="70px"> <asp:TemplateField HeaderStyle-Width="70px">
@@ -209,7 +223,7 @@
</tr> </tr>
</table> </table>
</div> </div>
</div></div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>

View File

@@ -68,8 +68,23 @@ Partial Class RH_Asistencias
CargaSubProyecto() CargaSubProyecto()
End Sub End Sub
Protected Sub btnconsultarnew_Click(sender As Object, e As EventArgs)
lblFecha.Text = ""
txtFechaAsistencia.Enabled = True
Calendario.Enabled = True
btnconsultarnew.Visible = False
GV.DataSource = Nothing
GV.DataBind()
BtnGuardar.Visible = (GV.Rows.Count > 0)
UpDatos.Update()
UPFiltros.Update()
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
If TxtFechaAsistencia.Text.Trim.ToDate.Year.Contiene(Now.Year - 1, Now.Year, Now.Year + 1) Then lblFecha.Text = txtFechaAsistencia.Text
txtFechaAsistencia.Enabled = False
Calendario.Enabled = False
btnconsultarnew.Visible = True
If txtFechaAsistencia.Text.Trim.ToDate.Year.Contiene(Now.Year - 1, Now.Year, Now.Year + 1) Then
Dim objpersonal As New ClsRH Dim objpersonal As New ClsRH
If objpersonal.GetAsistencias(-1, DdlCliente.SelectedValue.ToEntero, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlTurno.SelectedValue.ToEntero, 1, DdlTipoPeriodo.SelectedValue.ToEntero, txtFechaAsistencia.Text.Trim.ToDate, txtFechaAsistencia.Text.Trim.ToDate, UsuarioActual.CveEmpresa, DdlPuesto.SelectedValue.ToEntero) Then If objpersonal.GetAsistencias(-1, DdlCliente.SelectedValue.ToEntero, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlTurno.SelectedValue.ToEntero, 1, DdlTipoPeriodo.SelectedValue.ToEntero, txtFechaAsistencia.Text.Trim.ToDate, txtFechaAsistencia.Text.Trim.ToDate, UsuarioActual.CveEmpresa, DdlPuesto.SelectedValue.ToEntero) Then
Dim dt As DataTable = objpersonal.DtResultados Dim dt As DataTable = objpersonal.DtResultados
@@ -88,7 +103,7 @@ Partial Class RH_Asistencias
BtnGuardar.Visible = (GV.Rows.Count > 0) BtnGuardar.Visible = (GV.Rows.Count > 0)
UpDatos.Update() UpDatos.Update()
Else Else
Alert("La Fecha está fuera de los parámetros establecidos, por favor revise. Fecha: " & TxtFechaAsistencia.Text, TipoMensaje.MsgAdvertencia) Alert("La Fecha está fuera de los parámetros establecidos, por favor revise. Fecha: " & txtFechaAsistencia.Text, TipoMensaje.MsgAdvertencia)
End If End If
End Sub End Sub
@@ -259,5 +274,6 @@ Partial Class RH_Asistencias
DdlPeriodo.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlPeriodo.Items.Insert(0, New ListItem("Seleccione", "-1"))
End Sub End Sub
End Class End Class

View File

@@ -351,7 +351,7 @@
<!-- add "navbar-no-scroll" class to disable the scrolling of the sidebar menu --> <!-- add "navbar-no-scroll" class to disable the scrolling of the sidebar menu -->
<!-- BEGIN SIDEBAR MENU --> <!-- BEGIN SIDEBAR MENU -->
<ul class="page-sidebar-menu" id='ulmenulateralmaster' data-keep-expanded="false" data-auto-scroll="true" data-slide-speed="200"> <ul class="page-sidebar-menu" id='ulmenulateralmaster' data-keep-expanded="false" data-auto-scroll="true" data-slide-speed="200">
<li class="sidebar-toggler-wrapper"> <li class="sidebar-toggler-wrapper" id="LiSideBar" runat="server">
<!-- BEGIN SIDEBAR TOGGLER BUTTON --> <!-- BEGIN SIDEBAR TOGGLER BUTTON -->
<div class="sidebar-toggler"> <div class="sidebar-toggler">
</div> </div>

View File

@@ -153,6 +153,12 @@ Partial Class Site
End If End If
End If End If
If UsuarioActual.CvePlataforma.Contiene(6, 7) Then
LiSideBar.Visible = False
End If
Else Else
'VALIDACION DE SEGURIDAD, EN LA QUE SE VALIDA QUE LA EMPRESA EN LA QUE SE GENERO LA PAGINA SEA LA MISMA A LA DE LA SESION, 'VALIDACION DE SEGURIDAD, EN LA QUE SE VALIDA QUE LA EMPRESA EN LA QUE SE GENERO LA PAGINA SEA LA MISMA A LA DE LA SESION,
'DE NO SER ASI, SE REDIRECCIONA A INICIO. 'DE NO SER ASI, SE REDIRECCIONA A INICIO.

View File

@@ -808,9 +808,7 @@ Partial Class Clientes
DivRetIVA.Visible = False DivRetIVA.Visible = False
End If End If
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then divRegimen.Visible = True
divRegimen.Visible = True
End If
If UsuarioActual.CveEmpresa.Contiene(1) Or UsuarioActual.Empresa.Funcionalidad(531) = "1" Then If UsuarioActual.CveEmpresa.Contiene(1) Or UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
DivRepresentanteLegal.Visible = True DivRepresentanteLegal.Visible = True
@@ -2073,17 +2071,13 @@ Partial Class Clientes
End Sub End Sub
Private Sub CargaComboCFDI() Private Sub CargaComboCFDI()
Dim RegimenFiscalCliente = DdlRegimenFiscal.SelectedValue.ToString() Dim RegimenFiscalCliente = DdlRegimenFiscal.SelectedValue.ToString()
If Not UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then 'If Not UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then
RegimenFiscalCliente = "-1" ' RegimenFiscalCliente = "-1"
End If 'End If
DdlUsoCFDI.Items.Clear() DdlUsoCFDI.Items.Clear()
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1") DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
Else
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
End If
DdlUsoCFDI.DataBind() DdlUsoCFDI.DataBind()
DdlUsoCFDI.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlUsoCFDI.Items.Insert(0, New ListItem("Seleccione", "-1"))
@@ -2483,22 +2477,17 @@ Partial Class Clientes
End If End If
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then If TxtRFC.Text.ToUpper.Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscal.SelectedValue <> "11" Then
If TxtRFC.Text.ToUpper.Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscal.SelectedValue <> "11" Then Alert("El Regimen fiscal del cliente debe ser <b>'616 - Sin obligaciones fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
Exit Sub
Alert("El Regimen fiscal del cliente debe ser <b>'616 - Sin obligaciones fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia) End If
Exit Sub
End If If TxtRFC.Text.ToUpper.Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDI.SelectedValue <> "23" Then
If TxtRFC.Text.ToUpper.Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDI.SelectedValue <> "23" Then
Alert("El uso del cfdi debe ser <b>'S01 - Sin efectos fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Alert("El uso del cfdi debe ser <b>'S01 - Sin efectos fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If End If
@@ -10308,7 +10297,7 @@ Partial Class Clientes
DVRegimenSociedad.Visible = False DVRegimenSociedad.Visible = False
DivRazonSocial2.Attributes.Add("class", "col-md-12") DivRazonSocial2.Attributes.Add("class", "col-md-12")
If RdTipoPersona.SelectedValue.ToEntero = 1 And UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then If RdTipoPersona.SelectedValue.ToEntero = 1 Then
DivRazonSocial2.Attributes.Add("class", "col-md-8") DivRazonSocial2.Attributes.Add("class", "col-md-8")
DVRegimenSociedad.Visible = True DVRegimenSociedad.Visible = True
Else Else

View File

@@ -1510,11 +1510,7 @@ Partial Class Ventas_ClientesAbonar
ObjFacturaDevolucion.TipoDocto = "Egs" ObjFacturaDevolucion.TipoDocto = "Egs"
ObjFacturaDevolucion.Fecha = Now ObjFacturaDevolucion.Fecha = Now
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then ObjFacturaDevolucion.Version = "4.0"
ObjFacturaDevolucion.Version = "4.0"
Else
ObjFacturaDevolucion.Version = "3.3"
End If
ObjFacturaDevolucion.CveMetodoPago33 = 1 ObjFacturaDevolucion.CveMetodoPago33 = 1
ObjFacturaDevolucion.MetodoPago33 = "PUE - Pago en una sola exhibición" ObjFacturaDevolucion.MetodoPago33 = "PUE - Pago en una sola exhibición"
@@ -1684,11 +1680,7 @@ Partial Class Ventas_ClientesAbonar
Timbre.Receptor.DomicilioFiscalReceptor = Obj.ClienteSucursal.CP Timbre.Receptor.DomicilioFiscalReceptor = Obj.ClienteSucursal.CP
Else Else
Timbre.Receptor.RFC = Obj.Cliente.RFC Timbre.Receptor.RFC = Obj.Cliente.RFC
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then Timbre.Receptor.Nombre = Obj.Cliente.Nombre
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
Else
Timbre.Receptor.Nombre = Obj.Cliente.Nombre + " " + Obj.Cliente.RegimenSociedad
End If
Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP
End If End If

View File

@@ -2466,9 +2466,6 @@ Partial Class PV
'End If 'End If
End Sub End Sub
Private Sub CargaUsoCFDI() Private Sub CargaUsoCFDI()
If UsuarioActual.Empresa.Funcionalidad(350) <> "1" Then
ClienteCodigoRegimenFiscal = "-1"
End If
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=ClienteCodigoRegimenFiscal) DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=ClienteCodigoRegimenFiscal)
DdlUsoCFDI.DataBind() DdlUsoCFDI.DataBind()
End Sub End Sub
@@ -2730,7 +2727,7 @@ Partial Class PV
'DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString) 'DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString)
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString) DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES 'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then If LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
'S01 Sin efectos fiscales. 'S01 Sin efectos fiscales.
DdlUsoCFDI.SelectedValueExist("23") DdlUsoCFDI.SelectedValueExist("23")
DdlUsoCFDI.Enabled = False DdlUsoCFDI.Enabled = False
@@ -2915,7 +2912,7 @@ Partial Class PV
DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString) DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString)
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString) DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES 'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then If LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
'S01 Sin efectos fiscales. 'S01 Sin efectos fiscales.
DdlUsoCFDI.SelectedValueExist("23") DdlUsoCFDI.SelectedValueExist("23")
DdlUsoCFDI.Enabled = False DdlUsoCFDI.Enabled = False
@@ -2951,7 +2948,7 @@ Partial Class PV
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33) DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33)
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI) DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI)
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES 'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then If LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
'S01 Sin efectos fiscales. 'S01 Sin efectos fiscales.
DdlUsoCFDI.SelectedValueExist("23") DdlUsoCFDI.SelectedValueExist("23")
DdlUsoCFDI.Enabled = False DdlUsoCFDI.Enabled = False
@@ -6499,7 +6496,7 @@ Partial Class PV
RFVCiudadC.Visible = False RFVCiudadC.Visible = False
RFVLocalidadC.Visible = False RFVLocalidadC.Visible = False
RFVSATPais.Visible = False RFVSATPais.Visible = False
divRegimenCliente.Visible = UsuarioActual.Empresa.Funcionalidad(350) = "1" divRegimenCliente.Visible = True
RdTipoPersona.SelectedValue = "0" RdTipoPersona.SelectedValue = "0"
@@ -6542,7 +6539,7 @@ Partial Class PV
DivCorreoCuentaCliente.Visible = True DivCorreoCuentaCliente.Visible = True
DivBotonesAgregarCliente.Visible = True DivBotonesAgregarCliente.Visible = True
DivFormaCliente.Visible = True DivFormaCliente.Visible = True
divRegimenCliente.Visible = UsuarioActual.Empresa.Funcionalidad(350) = "1" divRegimenCliente.Visible = True
End If End If
End If End If
ObjCliente.Dispose() ObjCliente.Dispose()
@@ -6580,17 +6577,13 @@ Partial Class PV
Else Else
Dim RegimenFiscalCliente As String = "-1" Dim RegimenFiscalCliente As String = "-1"
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso DdlRegimenFiscalCliente.SelectedValue.ToEntero() > 0 Then If DdlRegimenFiscalCliente.SelectedValue.ToEntero() > 0 Then
RegimenFiscalCliente = GlobalDTRegimenesFiscales().FiltroPrimeroValor("CodigoRegimenFiscal", $"CveRegimenFiscal = {DdlRegimenFiscalCliente.SelectedValue.ToEntero()}") RegimenFiscalCliente = GlobalDTRegimenesFiscales().FiltroPrimeroValor("CodigoRegimenFiscal", $"CveRegimenFiscal = {DdlRegimenFiscalCliente.SelectedValue.ToEntero()}")
End If End If
DdlUsoCFDICliente.Items.Clear() DdlUsoCFDICliente.Items.Clear()
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1") DdlUsoCFDICliente.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
DdlUsoCFDICliente.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
Else
DdlUsoCFDICliente.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
End If
DdlUsoCFDICliente.DataBind() DdlUsoCFDICliente.DataBind()
DdlUsoCFDICliente.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlUsoCFDICliente.Items.Insert(0, New ListItem("Seleccione", "-1"))
@@ -6612,46 +6605,44 @@ Partial Class PV
Dim CveRegimenFiscal As Integer = -1 Dim CveRegimenFiscal As Integer = -1
Dim CveUsoCFDI As Integer = 3 Dim CveUsoCFDI As Integer = 3
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then CveRegimenFiscal = DdlRegimenFiscalCliente.SelectedValue.ToEntero()
CveRegimenFiscal = DdlRegimenFiscalCliente.SelectedValue.ToEntero() CveUsoCFDI = DdlUsoCFDICliente.SelectedValue.ToEntero()
CveUsoCFDI = DdlUsoCFDICliente.SelectedValue.ToEntero()
Dim RegimenFiscalCliente As String = "-1" Dim RegimenFiscalCliente As String = "-1"
If DdlRegimenFiscalCliente.SelectedValue.ToEntero() > 0 Then
RegimenFiscalCliente = GlobalDTRegimenesFiscales().FiltroPrimeroValor("CodigoRegimenFiscal", $"CveRegimenFiscal = {CveRegimenFiscal}")
End If
If TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscalCliente.SelectedValue <> "11" Then
Alert("El Regimen fiscal del cliente debe ser <b>'616 - Sin obligaciones fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDICliente.SelectedValue <> "23" Then
Alert("El uso cfdi del cliente debe ser <b>'S01 - Sin efectos fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If Not TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscalCliente.SelectedValue = "11" Then
Alert("El Regimen fiscal del cliente no puede ser <b>'616 - Sin obligaciones fiscales'</b> si no se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If Not TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDICliente.SelectedValue = "23" Then
Alert("El uso cfdi del cliente no puede ser <b>'S01 - Sin efectos fiscales'</b> si no se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
Dim DtUsosCFDI = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente).FiltraParametros($"CveUsoCFDI = {CveUsoCFDI}")
If DtUsosCFDI.Rows.Count = 0 Then
Alert("El Uso CFDI no corresponde con el tipo de persona (fisca, moral) y el régimen fiscal.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If DdlRegimenFiscalCliente.SelectedValue.ToEntero() > 0 Then
RegimenFiscalCliente = GlobalDTRegimenesFiscales().FiltroPrimeroValor("CodigoRegimenFiscal", $"CveRegimenFiscal = {CveRegimenFiscal}")
End If End If
If TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscalCliente.SelectedValue <> "11" Then
Alert("El Regimen fiscal del cliente debe ser <b>'616 - Sin obligaciones fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDICliente.SelectedValue <> "23" Then
Alert("El uso cfdi del cliente debe ser <b>'S01 - Sin efectos fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If Not TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscalCliente.SelectedValue = "11" Then
Alert("El Regimen fiscal del cliente no puede ser <b>'616 - Sin obligaciones fiscales'</b> si no se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If Not TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDICliente.SelectedValue = "23" Then
Alert("El uso cfdi del cliente no puede ser <b>'S01 - Sin efectos fiscales'</b> si no se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
Dim DtUsosCFDI = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente).FiltraParametros($"CveUsoCFDI = {CveUsoCFDI}")
If DtUsosCFDI.Rows.Count = 0 Then
Alert("El Uso CFDI no corresponde con el tipo de persona (fisca, moral) y el régimen fiscal.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If DdlSubProyectoDatos.SelectedValue.ToEntero() > 0 Then If DdlSubProyectoDatos.SelectedValue.ToEntero() > 0 Then
Dim Dr As DataRow = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa).Rows(0) Dim Dr As DataRow = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa).Rows(0)
If Dr IsNot Nothing Then If Dr IsNot Nothing Then

View File

@@ -3377,9 +3377,9 @@ Partial Class Ventas
InicializaAplicarNC() InicializaAplicarNC()
If CveCliente > 0 Then 'If CveCliente > 0 Then
CargaRestriccionesCreditoCliente(CveVenta:=Me.CveVenta) ' CargaRestriccionesCreditoCliente(CveVenta:=Me.CveVenta)
End If 'End If
If Not CveVenta > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(403).ToString() = "1" Then If Not CveVenta > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(403).ToString() = "1" Then
If (DdlTipoComprobante.Items.FindByValue("Ing") IsNot Nothing) Then If (DdlTipoComprobante.Items.FindByValue("Ing") IsNot Nothing) Then
@@ -6644,10 +6644,6 @@ Partial Class Ventas
ChkEmitirComercioExterior.Checked = True ChkEmitirComercioExterior.Checked = True
ChkEmitirComercioExterior_CheckedChanged(ChkEmitirComercioExterior, EventArgs.Empty) ChkEmitirComercioExterior_CheckedChanged(ChkEmitirComercioExterior, EventArgs.Empty)
End If
If ObjCliente.AplicaComercioExterior Then
'DdlSATMotivoTraslado.DataSource = GlobalDTSATMotivoTraslado 'DdlSATMotivoTraslado.DataSource = GlobalDTSATMotivoTraslado
'DdlSATMotivoTraslado.DataBind() 'DdlSATMotivoTraslado.DataBind()
'DdlSATMotivoTraslado.SelectedValueExist(ObjCliente.CveMotivoTraslado) 'DdlSATMotivoTraslado.SelectedValueExist(ObjCliente.CveMotivoTraslado)
@@ -6865,10 +6861,6 @@ Partial Class Ventas
TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString
If Not (ModalidadEdicion AndAlso DdlTipoComprobante.SelectedValue = "Rem") Then
CargaRestriccionesCreditoCliente(True, Me.CveVenta)
End If
' si es empresa acumuladores ' si es empresa acumuladores
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
CargaPorcentajeMarcas() CargaPorcentajeMarcas()
@@ -6897,7 +6889,7 @@ Partial Class Ventas
If CveCliente > 0 Then CargaAnticipos(CveCliente) : UpAnticipos.Update() If CveCliente > 0 Then CargaAnticipos(CveCliente) : UpAnticipos.Update()
If CveCliente > 0 AndAlso UsuarioActual.CveEmpresa = 140 AndAlso CveVenta <= 0 Then If CveCliente > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveVenta <= 0 Then
DivVentasUsados.Visible = True DivVentasUsados.Visible = True
Dim ObjClientes As New ClsClientes Dim ObjClientes As New ClsClientes
@@ -6939,12 +6931,18 @@ Partial Class Ventas
UpModalButtonUploadDocumentoCliente.Update() UpModalButtonUploadDocumentoCliente.Update()
UPObservaciones.Update() UPObservaciones.Update()
' RegistraScript("$('#DivDocsClienteUpload').modal({ backdrop: 'static', keyboard: false});", "modalOC")
End If End If
BloqueaCondiconesPago() BloqueaCondiconesPago()
DeshabilitarAplicarNotaDeCredito(LblRFC.Text) DeshabilitarAplicarNotaDeCredito(LblRFC.Text)
Dim CveVentaRef As Integer = -1
If Me.CveVenta > 0 AndAlso Not EsCreaApartirDe Then
CveVentaRef = Me.CveVenta
End If
CargaRestriccionesCreditoCliente(True, CveVentaRef)
If CveVenta <= 0 Then If CveVenta <= 0 Then
CalculaLineasAdicionales() CalculaLineasAdicionales()
HabilitaRemisionPublicoGeneral = 0 HabilitaRemisionPublicoGeneral = 0
@@ -7562,8 +7560,6 @@ Partial Class Ventas
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Pd2")) DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Pd2"))
End If End If
End If End If
HabilitarRemisionesPublicoGeneral()
End If End If
'CUANDO SEA COTIZACION Y SEA COMPUPROVEEDORES (EMPRESA 72) NO DEBE ENVIAR CORREO AL CLIENTE 'CUANDO SEA COTIZACION Y SEA COMPUPROVEEDORES (EMPRESA 72) NO DEBE ENVIAR CORREO AL CLIENTE
@@ -7608,9 +7604,7 @@ Partial Class Ventas
LblEstado.Text = ObjCliente.DtResultados.Rows(0)("Estado").ToString() LblEstado.Text = ObjCliente.DtResultados.Rows(0)("Estado").ToString()
'TxtNumCtaPago.Text = ObjCliente.DtResultados.Rows(0)("NumCtaPago").ToString() 'TxtNumCtaPago.Text = ObjCliente.DtResultados.Rows(0)("NumCtaPago").ToString()
LblTelefono.Text = ObjCliente.DtResultados.Rows(0)("Telefono").ToString() LblTelefono.Text = ObjCliente.DtResultados.Rows(0)("Telefono").ToString()
'If Not UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
' LblCP.Text = ObjCliente.DtResultados.Rows(0)("CP").ToString()
'End If
ViewState("CliLocalidad") = ObjCliente.DtResultados.Rows(0)("Localidad").ToString() ViewState("CliLocalidad") = ObjCliente.DtResultados.Rows(0)("Localidad").ToString()
ViewState("CliPais") = ObjCliente.DtResultados.Rows(0)("Pais").ToString() ViewState("CliPais") = ObjCliente.DtResultados.Rows(0)("Pais").ToString()
ViewState("CliNoExt") = ObjCliente.DtResultados.Rows(0)("NoExt").ToString() ViewState("CliNoExt") = ObjCliente.DtResultados.Rows(0)("NoExt").ToString()
@@ -9574,39 +9568,6 @@ Partial Class Ventas
Exit Sub Exit Sub
End If End If
'Verifica versión 3.3.()
'If (Not UsuarioActual.Empresa.Funcionalidad(350) = "1") AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("Ped", "PeC") Then
' Dim dttsat As DataTable = TmpDT.FiltraParametros("ISNULL(SATClaveProdServ,'') = '' OR ISNULL(SATClaveUM,'') = '' ")
' If dttsat IsNot Nothing AndAlso dttsat.Rows.Count > 0 Then
' Dim str As New StringBuilder
' str.Append("Los siguientes productos no tiene asignado la clave Producto SAT o Unidad Medida SAT<br/><br/>")
' For Each drt As DataRow In dttsat.Rows
' str.AppendFormat("{0} <br/>", drt("CodigoPS"))
' Next
' Alert(str.ToString(), TipoMensaje.MsgAdvertencia)
' dttsat.Dispose()
' str.Clear()
' Exit Sub
' End If
' dttsat.Dispose()
' If UsuarioActual.CveEmpresa = 72 Then
' Dim DtNoEncontrados As DataTable = TmpDT.FiltraParametros("ISNULL(SATClaveProdServ,'') = '01010101' ")
' If DtNoEncontrados IsNot Nothing AndAlso DtNoEncontrados.Rows.Count > 0 Then
' Dim StrNoEncontrados As New StringBuilder
' StrNoEncontrados.Append("Los siguientes productos no existen en el catálogo del SAT<br/><br/>")
' For Each drt As DataRow In DtNoEncontrados.Rows
' StrNoEncontrados.AppendFormat("{0} <br/>", drt("CodigoPS"))
' Next
' Alert(StrNoEncontrados.ToString(), TipoMensaje.MsgAdvertencia)
' DtNoEncontrados.Dispose()
' StrNoEncontrados.Clear()
' Exit Sub
' End If
' DtNoEncontrados.Dispose()
' End If
'End If
'CREA UNA COPIA DE SEGURIDAD PARA LOS DATOS DEL TMPDT 'CREA UNA COPIA DE SEGURIDAD PARA LOS DATOS DEL TMPDT
If TmpDTError Is Nothing OrElse TmpDTError.Rows.Count = 0 Then If TmpDTError Is Nothing OrElse TmpDTError.Rows.Count = 0 Then
TmpDTError = TmpDT.Copy() TmpDTError = TmpDT.Copy()
@@ -18039,7 +18000,12 @@ Partial Class Ventas
End Sub End Sub
Protected Sub DdlSucursalCliente_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSucursalCliente.SelectedIndexChanged Protected Sub DdlSucursalCliente_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSucursalCliente.SelectedIndexChanged
CargaClienteSucursal(DdlSucursalCliente.SelectedValue.ToEntero()) CargaClienteSucursal(DdlSucursalCliente.SelectedValue.ToEntero())
CargaRestriccionesCreditoCliente(Alertas:=True, CveVenta:=Me.CveVenta)
'RECARGA LAS RESTRICCIONES DE CREDITO SI SE CAMBIO LA SUCURSAL DEL CLIENTE
If DdlSucursalCliente.SelectedValue.ToEntero() > 0 Then
CargaRestriccionesCreditoCliente(Alertas:=True, CveVenta:=Me.CveVenta)
End If
End Sub End Sub
Protected Sub DdlCCEdit_SelectedIndexChanged(sender As Object, e As System.EventArgs) Protected Sub DdlCCEdit_SelectedIndexChanged(sender As Object, e As System.EventArgs)
Dim gvr As GridViewRow = DirectCast(DirectCast(sender, DropDownList).BindingContainer, GridViewRow) Dim gvr As GridViewRow = DirectCast(DirectCast(sender, DropDownList).BindingContainer, GridViewRow)
@@ -33129,7 +33095,7 @@ Partial Class Ventas
CambiaTipoDocto() CambiaTipoDocto()
CambiaSucursalGeneral(RecargarPartidas:=False) CambiaSucursalGeneral(RecargarPartidas:=False)
CargaAnticipos(CveCliente) CargaAnticipos(CveCliente)
CargaRestriccionesCreditoCliente(CveVenta:=-1) CargaRestriccionesCreditoCliente(True, CveVenta:=-1)
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
TabAlmacen.Visible = True TabAlmacen.Visible = True