-
This commit is contained in:
@@ -1125,27 +1125,16 @@ Public Class ClsBancos
|
||||
Dim Timbrado As New Timbrado
|
||||
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
|
||||
dttpagosimpuestos = DtResultados
|
||||
End If
|
||||
|
||||
Timbre = Timbrado.PreparaTimbrePago40(RFCEmpresa, UsuarioActual.Empresa.Empresa, UsuarioActual.Empresa.CodigoRegimenFiscal,
|
||||
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,
|
||||
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,
|
||||
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
|
||||
'If CFDIRelacionado <> "-1" And CFDIRelacionado <> "" Then
|
||||
|
||||
@@ -5423,11 +5423,9 @@ Public Class ClsPaginas
|
||||
params.Add(New ReportParameter("CETipoCambio", CETipoCambio))
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
params.Add(New ReportParameter("CFDIVersion", Vta.Version))
|
||||
If Vta.Cliente.CodigoRegimenFiscal.ToString.Length > 0 Then
|
||||
params.Add(New ReportParameter("RegimenFiscalCodigo", $"{Vta.Cliente.CodigoRegimenFiscal}-{Vta.Cliente.RegimenFiscal}"))
|
||||
End If
|
||||
params.Add(New ReportParameter("CFDIVersion", Vta.Version))
|
||||
If Vta.Cliente.CodigoRegimenFiscal.ToString.Length > 0 Then
|
||||
params.Add(New ReportParameter("RegimenFiscalCodigo", $"{Vta.Cliente.CodigoRegimenFiscal}-{Vta.Cliente.RegimenFiscal}"))
|
||||
End If
|
||||
|
||||
'CLIENTE
|
||||
@@ -6963,7 +6961,7 @@ Public Class ClsPaginas
|
||||
Dim FechaRecibo = ""
|
||||
Dim ProveedorIntermediario 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 = ""
|
||||
|
||||
'DT PAGO
|
||||
@@ -7060,10 +7058,8 @@ Public Class ClsPaginas
|
||||
params.Add(New ReportParameter("ClienteCP", ObjClientes.CP))
|
||||
params.Add(New ReportParameter("ClienteRFC", ObjClientes.RFC))
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
If ObjClientes.CodigoRegimenFiscal.ToString.Length > 0 Then
|
||||
RegimenFiscalCodigo = $"{ObjClientes.CodigoRegimenFiscal}-{ObjClientes.RegimenFiscal}"
|
||||
End If
|
||||
If ObjClientes.CodigoRegimenFiscal.ToString.Length > 0 Then
|
||||
RegimenFiscalCodigo = $"{ObjClientes.CodigoRegimenFiscal}-{ObjClientes.RegimenFiscal}"
|
||||
End If
|
||||
End If
|
||||
ObjClientes.Dispose()
|
||||
@@ -7102,11 +7098,9 @@ Public Class ClsPaginas
|
||||
cfdVer = "http://www.sat.gob.mx/cfd/4"
|
||||
End If
|
||||
If Version = "4.0" Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
params.Add(New ReportParameter("CFDIVersion", Version))
|
||||
If ObjClientes.CodigoRegimenFiscal.ToString.Length > 0 Then
|
||||
params.Add(New ReportParameter("RegimenFiscalCodigo", RegimenFiscalCodigo))
|
||||
End If
|
||||
params.Add(New ReportParameter("CFDIVersion", Version))
|
||||
If ObjClientes.CodigoRegimenFiscal.ToString.Length > 0 Then
|
||||
params.Add(New ReportParameter("RegimenFiscalCodigo", RegimenFiscalCodigo))
|
||||
End If
|
||||
End If
|
||||
namespaces.AddNamespace(Prefijo, cfdVer)
|
||||
@@ -7162,7 +7156,7 @@ Public Class ClsPaginas
|
||||
If Version = "3.3" Then DrRelacionado("MetodoDePagoDR") = Relacionado.Attributes("MetodoDePagoDR").Value
|
||||
If Version = "4.0" Then DrRelacionado("ObjetoImpDR") = Relacionado.Attributes("ObjetoImpDR").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)
|
||||
For Each NodoTraslados As XmlNode In NodosTraslados
|
||||
Dim BaseDR As String = ValorXML(NodoTraslados, "BaseDR")
|
||||
|
||||
@@ -86,7 +86,7 @@ Public Class LogicNominas
|
||||
|
||||
Dim versionTimbre As VersionTimbradoEnum = versionTimbrex
|
||||
If versionTimbre = VersionTimbradoEnum.PorDefectoEmpresa Then
|
||||
versionTimbre = If(UsuarioActual.Empresa.Funcionalidad(350) = "1", VersionTimbradoEnum.Version4_0, VersionTimbradoEnum.Version3_3)
|
||||
versionTimbre = VersionTimbradoEnum.Version4_0
|
||||
End If
|
||||
|
||||
Dim continuar As Boolean = True
|
||||
|
||||
@@ -42,8 +42,7 @@ Public Class Timbres
|
||||
|
||||
Private Sub CreaObjetosTraslados(TipoDocto As String, CveTimbre As Integer)
|
||||
ObjFactura = New Modelos.Factura
|
||||
ObjFactura.Version = "3.3"
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then ObjFactura.Version = "4.0"
|
||||
ObjFactura.Version = "4.0"
|
||||
|
||||
ObjFactura.CveUsuario = UsuarioActual.CveUsuario
|
||||
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
|
||||
|
||||
@@ -1495,13 +1495,9 @@ Partial Class Ventas_ClientesAbonar
|
||||
ObjFacturaDevolucion.FormaPago = 0
|
||||
|
||||
ObjFacturaDevolucion.TipoDocto = "Egs"
|
||||
ObjFacturaDevolucion.Fecha = Now
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
ObjFacturaDevolucion.Version = "4.0"
|
||||
Else
|
||||
ObjFacturaDevolucion.Version = "3.3"
|
||||
End If
|
||||
ObjFacturaDevolucion.Fecha = Now
|
||||
|
||||
ObjFacturaDevolucion.Version = "4.0"
|
||||
|
||||
ObjFacturaDevolucion.CveMetodoPago33 = 1
|
||||
ObjFacturaDevolucion.MetodoPago33 = "PUE - Pago en una sola exhibición"
|
||||
@@ -1671,11 +1667,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
Timbre.Receptor.DomicilioFiscalReceptor = Obj.ClienteSucursal.CP
|
||||
Else
|
||||
Timbre.Receptor.RFC = Obj.Cliente.RFC
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
|
||||
Else
|
||||
Timbre.Receptor.Nombre = Obj.Cliente.Nombre + " " + Obj.Cliente.RegimenSociedad
|
||||
End If
|
||||
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
|
||||
Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP
|
||||
End If
|
||||
|
||||
|
||||
@@ -5782,8 +5782,12 @@ Partial Class PopUpVerFactura
|
||||
Dim EstadoCancelacion = drv("EstadoCancelacion").ToString()
|
||||
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 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 EstadoCFDI As String = "Cancelado"
|
||||
@@ -5802,9 +5806,27 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
|
||||
If CveEstatusFactura = 20 Then
|
||||
|
||||
DirectorioArchivo = String.Format("{0}Empresas\Grales\Formatos\AcuseCancelacionSolicitud.mrt", ModExtensiones.DirectorioBaseEmpresas)
|
||||
|
||||
Titulo = "Acuse de solicitud de cancelación de CFDI"
|
||||
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
|
||||
If Not String.IsNullOrEmpty(SelloSolicitudCancelacion) Then
|
||||
SelloCancelacion = SelloSolicitudCancelacion
|
||||
@@ -5829,6 +5851,8 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim Archivo As New System.IO.FileInfo(DirectorioArchivo)
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("Titulo", Titulo))
|
||||
params.Add(New ReportParameter("FolioFiscal", FolioFiscal))
|
||||
@@ -5840,7 +5864,29 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("MsgError", ""))
|
||||
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
|
||||
|
||||
|
||||
@@ -2984,7 +2984,7 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P
|
||||
<Width>19.59037cm</Width>
|
||||
<Page>
|
||||
<PageHeader>
|
||||
<Height>6.48735cm</Height>
|
||||
<Height>6.74082cm</Height>
|
||||
<PrintOnFirstPage>true</PrintOnFirstPage>
|
||||
<PrintOnLastPage>true</PrintOnLastPage>
|
||||
<ReportItems>
|
||||
@@ -3478,9 +3478,9 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Serie/Folio:</Value>
|
||||
<Value>Serie/Folio</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<Color>Brown</Color>
|
||||
</Style>
|
||||
@@ -3492,7 +3492,7 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P
|
||||
<rd:DefaultName>Textbox31</rd:DefaultName>
|
||||
<Left>0.00031cm</Left>
|
||||
<Height>0.47652cm</Height>
|
||||
<Width>1.90028cm</Width>
|
||||
<Width>1.72389cm</Width>
|
||||
<ZIndex>7</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -3513,7 +3513,7 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P
|
||||
<TextRun>
|
||||
<Value>=First(Fields!Serie.Value, "Comprobante") + " - " + First(Fields!Folio.Value, "Comprobante")</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -3521,9 +3521,9 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox32</rd:DefaultName>
|
||||
<Left>1.90059cm</Left>
|
||||
<Left>1.75948cm</Left>
|
||||
<Height>0.47652cm</Height>
|
||||
<Width>2.86701cm</Width>
|
||||
<Width>3.00812cm</Width>
|
||||
<ZIndex>8</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -3788,8 +3788,8 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P
|
||||
<rd:DefaultName>Textbox43</rd:DefaultName>
|
||||
<Top>1.71005cm</Top>
|
||||
<Left>0.00035cm</Left>
|
||||
<Height>0.56193cm</Height>
|
||||
<Width>9.99712cm</Width>
|
||||
<Height>0.27936in</Height>
|
||||
<Width>3.93587in</Width>
|
||||
<ZIndex>6</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -3890,8 +3890,8 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P
|
||||
<rd:DefaultName>Textbox43</rd:DefaultName>
|
||||
<Top>1.71005cm</Top>
|
||||
<Left>9.99747cm</Left>
|
||||
<Height>0.56193cm</Height>
|
||||
<Width>9.59253cm</Width>
|
||||
<Height>0.27936in</Height>
|
||||
<Width>3.77637in</Width>
|
||||
<ZIndex>9</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -3908,7 +3908,7 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Top>4.21537cm</Top>
|
||||
<Left>0.00007cm</Left>
|
||||
<Height>2.27198cm</Height>
|
||||
<Height>2.41961cm</Height>
|
||||
<Width>19.59023cm</Width>
|
||||
<ZIndex>9</ZIndex>
|
||||
<Style>
|
||||
@@ -4347,7 +4347,6 @@ First(Fields!NoCertificadoSAT.Value, "TimbreFiscalDigital")</Value>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox25</rd:DefaultName>
|
||||
<Top>0cm</Top>
|
||||
<Left>1.5001in</Left>
|
||||
<Height>0.15625in</Height>
|
||||
<Width>6.2125in</Width>
|
||||
@@ -4444,7 +4443,7 @@ First(Fields!NoCertificadoSAT.Value, "TimbreFiscalDigital")</Value>
|
||||
<Style />
|
||||
</Page>
|
||||
</ReportSection>
|
||||
</ReportSections>
|
||||
</ReportSections>
|
||||
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
||||
<rd:ReportID>01f5892c-0046-409e-9fb9-7645ea4fa54f</rd:ReportID>
|
||||
</Report>
|
||||
@@ -1929,7 +1929,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Else
|
||||
|
||||
'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 IdCuentaGasto As Integer = 0
|
||||
For Each Dr As DataRow In Dt.Rows
|
||||
|
||||
@@ -566,7 +566,7 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
|
||||
|
||||
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)
|
||||
{ Alert(Msg, TipoMensaje.MsgAdvertencia); }
|
||||
@@ -1433,7 +1433,7 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
int CveConcepto = DdlmcConceptos.SelectedValue.ToEntero();
|
||||
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 ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto;
|
||||
decimal ImporteValor = Txtmcvalor.Text.Replace("$", "").Replace(",", "").ToDecimal();
|
||||
|
||||
@@ -1442,7 +1442,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
LogicNominas lognom = new LogicNominas();
|
||||
|
||||
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)
|
||||
{
|
||||
@@ -1715,7 +1715,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
//CURP = drow["CURP"].ToString();
|
||||
}
|
||||
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>
|
||||
{ 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();
|
||||
}
|
||||
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 ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto;
|
||||
decimal ImporteValor = Txtmcvalor.Text.Replace("$", "").Replace(",", "").ToDecimal();
|
||||
@@ -7234,7 +7234,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
bool continuar = true;
|
||||
|
||||
int chkImporte = 1;
|
||||
int chkImporteGravado = 0;
|
||||
int chkImporteGravado = 1;
|
||||
int chkImporteValor = 1;
|
||||
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();
|
||||
ImporteConcepto = rcon["Importe"].ToString().ToDecimal();
|
||||
ImporteConcepto = chkImporte==1? rcon["Importe"].ToString().ToDecimal() :0;
|
||||
ImporteGravadoConcepto = rcon["ImporteGravado"].ToString().ToDecimal();
|
||||
ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto;
|
||||
ImporteValor = rcon["Valor"].ToString().ToDecimal();
|
||||
|
||||
@@ -958,7 +958,7 @@
|
||||
var Tam = TamañoVentana();
|
||||
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"]] });
|
||||
|
||||
|
||||
@@ -110,13 +110,27 @@
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<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>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<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">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderStyle-Width="70px">
|
||||
@@ -209,7 +223,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div></div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
@@ -68,8 +68,23 @@ Partial Class RH_Asistencias
|
||||
CargaSubProyecto()
|
||||
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
|
||||
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
|
||||
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
|
||||
@@ -88,7 +103,7 @@ Partial Class RH_Asistencias
|
||||
BtnGuardar.Visible = (GV.Rows.Count > 0)
|
||||
UpDatos.Update()
|
||||
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 Sub
|
||||
|
||||
@@ -259,5 +274,6 @@ Partial Class RH_Asistencias
|
||||
DdlPeriodo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -351,7 +351,7 @@
|
||||
<!-- add "navbar-no-scroll" class to disable the scrolling of the sidebar menu -->
|
||||
<!-- BEGIN SIDEBAR MENU -->
|
||||
<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 -->
|
||||
<div class="sidebar-toggler">
|
||||
</div>
|
||||
|
||||
@@ -153,6 +153,12 @@ Partial Class Site
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.CvePlataforma.Contiene(6, 7) Then
|
||||
LiSideBar.Visible = False
|
||||
End If
|
||||
|
||||
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,
|
||||
'DE NO SER ASI, SE REDIRECCIONA A INICIO.
|
||||
|
||||
@@ -806,11 +806,9 @@ Partial Class Clientes
|
||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||
DivTipoRetenciones.Visible = True
|
||||
DivRetIVA.Visible = False
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then
|
||||
divRegimen.Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
divRegimen.Visible = True
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(1) Or UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
DivRepresentanteLegal.Visible = True
|
||||
@@ -2073,17 +2071,13 @@ Partial Class Clientes
|
||||
End Sub
|
||||
Private Sub CargaComboCFDI()
|
||||
Dim RegimenFiscalCliente = DdlRegimenFiscal.SelectedValue.ToString()
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then
|
||||
RegimenFiscalCliente = "-1"
|
||||
End If
|
||||
'If Not UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then
|
||||
' RegimenFiscalCliente = "-1"
|
||||
'End If
|
||||
|
||||
DdlUsoCFDI.Items.Clear()
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
|
||||
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||
Else
|
||||
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||
End If
|
||||
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
|
||||
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||
|
||||
DdlUsoCFDI.DataBind()
|
||||
DdlUsoCFDI.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
@@ -2483,23 +2477,18 @@ Partial Class Clientes
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") 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
|
||||
|
||||
End If
|
||||
|
||||
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
|
||||
|
||||
|
||||
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
|
||||
|
||||
End If
|
||||
|
||||
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
|
||||
|
||||
'CargaSucursal()
|
||||
@@ -10308,7 +10297,7 @@ Partial Class Clientes
|
||||
DVRegimenSociedad.Visible = False
|
||||
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")
|
||||
DVRegimenSociedad.Visible = True
|
||||
Else
|
||||
|
||||
@@ -1510,11 +1510,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
ObjFacturaDevolucion.TipoDocto = "Egs"
|
||||
ObjFacturaDevolucion.Fecha = Now
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
ObjFacturaDevolucion.Version = "4.0"
|
||||
Else
|
||||
ObjFacturaDevolucion.Version = "3.3"
|
||||
End If
|
||||
ObjFacturaDevolucion.Version = "4.0"
|
||||
|
||||
ObjFacturaDevolucion.CveMetodoPago33 = 1
|
||||
ObjFacturaDevolucion.MetodoPago33 = "PUE - Pago en una sola exhibición"
|
||||
@@ -1684,11 +1680,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
Timbre.Receptor.DomicilioFiscalReceptor = Obj.ClienteSucursal.CP
|
||||
Else
|
||||
Timbre.Receptor.RFC = Obj.Cliente.RFC
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
|
||||
Else
|
||||
Timbre.Receptor.Nombre = Obj.Cliente.Nombre + " " + Obj.Cliente.RegimenSociedad
|
||||
End If
|
||||
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
|
||||
Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP
|
||||
End If
|
||||
|
||||
|
||||
@@ -2466,9 +2466,6 @@ Partial Class PV
|
||||
'End If
|
||||
End Sub
|
||||
Private Sub CargaUsoCFDI()
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) <> "1" Then
|
||||
ClienteCodigoRegimenFiscal = "-1"
|
||||
End If
|
||||
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=ClienteCodigoRegimenFiscal)
|
||||
DdlUsoCFDI.DataBind()
|
||||
End Sub
|
||||
@@ -2730,7 +2727,7 @@ Partial Class PV
|
||||
'DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString)
|
||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
|
||||
'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.
|
||||
DdlUsoCFDI.SelectedValueExist("23")
|
||||
DdlUsoCFDI.Enabled = False
|
||||
@@ -2915,7 +2912,7 @@ Partial Class PV
|
||||
DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString)
|
||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
|
||||
'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.
|
||||
DdlUsoCFDI.SelectedValueExist("23")
|
||||
DdlUsoCFDI.Enabled = False
|
||||
@@ -2951,7 +2948,7 @@ Partial Class PV
|
||||
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33)
|
||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI)
|
||||
'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.
|
||||
DdlUsoCFDI.SelectedValueExist("23")
|
||||
DdlUsoCFDI.Enabled = False
|
||||
@@ -6499,7 +6496,7 @@ Partial Class PV
|
||||
RFVCiudadC.Visible = False
|
||||
RFVLocalidadC.Visible = False
|
||||
RFVSATPais.Visible = False
|
||||
divRegimenCliente.Visible = UsuarioActual.Empresa.Funcionalidad(350) = "1"
|
||||
divRegimenCliente.Visible = True
|
||||
|
||||
RdTipoPersona.SelectedValue = "0"
|
||||
|
||||
@@ -6542,7 +6539,7 @@ Partial Class PV
|
||||
DivCorreoCuentaCliente.Visible = True
|
||||
DivBotonesAgregarCliente.Visible = True
|
||||
DivFormaCliente.Visible = True
|
||||
divRegimenCliente.Visible = UsuarioActual.Empresa.Funcionalidad(350) = "1"
|
||||
divRegimenCliente.Visible = True
|
||||
End If
|
||||
End If
|
||||
ObjCliente.Dispose()
|
||||
@@ -6580,17 +6577,13 @@ Partial Class PV
|
||||
Else
|
||||
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()}")
|
||||
End If
|
||||
|
||||
DdlUsoCFDICliente.Items.Clear()
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
|
||||
DdlUsoCFDICliente.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||
Else
|
||||
DdlUsoCFDICliente.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||
End If
|
||||
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
|
||||
DdlUsoCFDICliente.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||
|
||||
DdlUsoCFDICliente.DataBind()
|
||||
DdlUsoCFDICliente.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
@@ -6612,46 +6605,44 @@ Partial Class PV
|
||||
Dim CveRegimenFiscal As Integer = -1
|
||||
Dim CveUsoCFDI As Integer = 3
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
CveRegimenFiscal = DdlRegimenFiscalCliente.SelectedValue.ToEntero()
|
||||
CveUsoCFDI = DdlUsoCFDICliente.SelectedValue.ToEntero()
|
||||
CveRegimenFiscal = DdlRegimenFiscalCliente.SelectedValue.ToEntero()
|
||||
CveUsoCFDI = DdlUsoCFDICliente.SelectedValue.ToEntero()
|
||||
|
||||
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
|
||||
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 DdlSubProyectoDatos.SelectedValue.ToEntero() > 0 Then
|
||||
Dim Dr As DataRow = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa).Rows(0)
|
||||
If Dr IsNot Nothing Then
|
||||
|
||||
@@ -3377,9 +3377,9 @@ Partial Class Ventas
|
||||
|
||||
InicializaAplicarNC()
|
||||
|
||||
If CveCliente > 0 Then
|
||||
CargaRestriccionesCreditoCliente(CveVenta:=Me.CveVenta)
|
||||
End If
|
||||
'If CveCliente > 0 Then
|
||||
' CargaRestriccionesCreditoCliente(CveVenta:=Me.CveVenta)
|
||||
'End If
|
||||
|
||||
If Not CveVenta > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(403).ToString() = "1" Then
|
||||
If (DdlTipoComprobante.Items.FindByValue("Ing") IsNot Nothing) Then
|
||||
@@ -6644,10 +6644,6 @@ Partial Class Ventas
|
||||
ChkEmitirComercioExterior.Checked = True
|
||||
ChkEmitirComercioExterior_CheckedChanged(ChkEmitirComercioExterior, EventArgs.Empty)
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If ObjCliente.AplicaComercioExterior Then
|
||||
'DdlSATMotivoTraslado.DataSource = GlobalDTSATMotivoTraslado
|
||||
'DdlSATMotivoTraslado.DataBind()
|
||||
'DdlSATMotivoTraslado.SelectedValueExist(ObjCliente.CveMotivoTraslado)
|
||||
@@ -6865,10 +6861,6 @@ Partial Class Ventas
|
||||
|
||||
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
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
CargaPorcentajeMarcas()
|
||||
@@ -6897,7 +6889,7 @@ Partial Class Ventas
|
||||
|
||||
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
|
||||
|
||||
Dim ObjClientes As New ClsClientes
|
||||
@@ -6939,12 +6931,18 @@ Partial Class Ventas
|
||||
UpModalButtonUploadDocumentoCliente.Update()
|
||||
UPObservaciones.Update()
|
||||
|
||||
|
||||
' RegistraScript("$('#DivDocsClienteUpload').modal({ backdrop: 'static', keyboard: false});", "modalOC")
|
||||
End If
|
||||
BloqueaCondiconesPago()
|
||||
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
|
||||
CalculaLineasAdicionales()
|
||||
HabilitaRemisionPublicoGeneral = 0
|
||||
@@ -7562,8 +7560,6 @@ Partial Class Ventas
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Pd2"))
|
||||
End If
|
||||
End If
|
||||
|
||||
HabilitarRemisionesPublicoGeneral()
|
||||
End If
|
||||
|
||||
'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()
|
||||
'TxtNumCtaPago.Text = ObjCliente.DtResultados.Rows(0)("NumCtaPago").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("CliPais") = ObjCliente.DtResultados.Rows(0)("Pais").ToString()
|
||||
ViewState("CliNoExt") = ObjCliente.DtResultados.Rows(0)("NoExt").ToString()
|
||||
@@ -9574,39 +9568,6 @@ Partial Class Ventas
|
||||
Exit Sub
|
||||
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
|
||||
If TmpDTError Is Nothing OrElse TmpDTError.Rows.Count = 0 Then
|
||||
TmpDTError = TmpDT.Copy()
|
||||
@@ -18039,7 +18000,12 @@ Partial Class Ventas
|
||||
End Sub
|
||||
Protected Sub DdlSucursalCliente_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSucursalCliente.SelectedIndexChanged
|
||||
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
|
||||
Protected Sub DdlCCEdit_SelectedIndexChanged(sender As Object, e As System.EventArgs)
|
||||
Dim gvr As GridViewRow = DirectCast(DirectCast(sender, DropDownList).BindingContainer, GridViewRow)
|
||||
@@ -33129,7 +33095,7 @@ Partial Class Ventas
|
||||
CambiaTipoDocto()
|
||||
CambiaSucursalGeneral(RecargarPartidas:=False)
|
||||
CargaAnticipos(CveCliente)
|
||||
CargaRestriccionesCreditoCliente(CveVenta:=-1)
|
||||
CargaRestriccionesCreditoCliente(True, CveVenta:=-1)
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
TabAlmacen.Visible = True
|
||||
|
||||
Reference in New Issue
Block a user