timbrado v.4.0

This commit is contained in:
2022-01-27 23:34:55 -07:00
parent 9410d1687b
commit f6ab8ae428
7 changed files with 62 additions and 17 deletions

View File

@@ -279,8 +279,8 @@ End Class
Public Class CFDIReceptor Public Class CFDIReceptor
Public Property RFC As String Public Property RFC As String
Public Property Nombre As String Public Property Nombre As String
Public Property RegimenFiscalReceptor As String = "601" Public Property RegimenFiscalReceptor As String = ""
Public Property DomicilioFiscalReceptor As String = "601" Public Property DomicilioFiscalReceptor As String = ""
Public Property ResidenciaFiscal As String = "" Public Property ResidenciaFiscal As String = ""
Public Property NumeroRegistroTributario As String = "" Public Property NumeroRegistroTributario As String = ""
Public Property UsoCFDI As String Public Property UsoCFDI As String

View File

@@ -125,6 +125,7 @@ Public Class ClsClientes
Public Property Celular As String Public Property Celular As String
Public Property ExtOtros As String Public Property ExtOtros As String
Public Property CveUsoCFDI As Integer Public Property CveUsoCFDI As Integer
Public Property CveRegimenFiscal As Integer
Public Property CveFormaPago33 As Integer Public Property CveFormaPago33 As Integer
Public Property CveMetodoPago33 As Integer Public Property CveMetodoPago33 As Integer
Public Property CveClienteCorporativo As String Public Property CveClienteCorporativo As String
@@ -384,6 +385,8 @@ Public Class ClsClientes
_CveFormaPago33 = Data(0)("CveFormaPago33").ToString.ToEntero _CveFormaPago33 = Data(0)("CveFormaPago33").ToString.ToEntero
_CveMetodoPago33 = Data(0)("CveMetodoPago33").ToString.ToEntero _CveMetodoPago33 = Data(0)("CveMetodoPago33").ToString.ToEntero
_CveRegimenFiscal = Data(0)("CveRegimenFiscal").ToString.ToEntero
_CveClienteCorporativo = Data(0)("CveClienteCorporativo").ToString _CveClienteCorporativo = Data(0)("CveClienteCorporativo").ToString
_DesglosaIEPS = CType(Data(0)("DesglosaIEPS"), Boolean) _DesglosaIEPS = CType(Data(0)("DesglosaIEPS"), Boolean)
_NoDesglosaIVA = CType(Data(0)("NoDesglosaIVA"), Boolean) _NoDesglosaIVA = CType(Data(0)("NoDesglosaIVA"), Boolean)
@@ -573,7 +576,7 @@ Public Class ClsClientes
Optional AplicaComercioExterior As Boolean = False, Optional CveTipoOperacion As Integer = -1, Optional CvePedimento As Integer = -1, Optional CveIncoterm As Integer = -1, Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1, Optional AplicaComercioExterior As Boolean = False, Optional CveTipoOperacion As Integer = -1, Optional CvePedimento As Integer = -1, Optional CveIncoterm As Integer = -1, Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1,
Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1", Optional RequiereOC As Boolean = False, Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1", Optional RequiereOC As Boolean = False,
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0,
Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1) As Boolean Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional CveRegimenFiscal As Integer = 0) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -714,7 +717,7 @@ Public Class ClsClientes
.Add("@CveSATEstado", SqlDbType.Int).Value = CveSATEstado .Add("@CveSATEstado", SqlDbType.Int).Value = CveSATEstado
.Add("@CveAdminTrayecto", SqlDbType.TinyInt).Value = CveAdminTrayecto .Add("@CveAdminTrayecto", SqlDbType.TinyInt).Value = CveAdminTrayecto
.Add("@CveRegimenFiscal", SqlDbType.TinyInt).Value = CveRegimenFiscal
End With End With
Try Try
@@ -763,7 +766,7 @@ Public Class ClsClientes
Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "-1", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1", Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "-1", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1",
Optional ApellidoPaternoPF As String = "-1", Optional ApellidoMaternoPF As String = "-1", Optional NombresPF As String = "-1", Optional RequiereOC As Boolean = False, Optional ApellidoPaternoPF As String = "-1", Optional ApellidoMaternoPF As String = "-1", Optional NombresPF As String = "-1", Optional RequiereOC As Boolean = False,
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1",
Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional NoDesglosaIVA As Boolean = False) As Boolean Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional NoDesglosaIVA As Boolean = False, Optional CveRegimenFiscal As Integer = 0) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -920,6 +923,7 @@ Public Class ClsClientes
.Add("@CveSATEstado", SqlDbType.Int).Value = CveSATEstado .Add("@CveSATEstado", SqlDbType.Int).Value = CveSATEstado
.Add("@CveAdminTrayecto", SqlDbType.TinyInt).Value = CveAdminTrayecto .Add("@CveAdminTrayecto", SqlDbType.TinyInt).Value = CveAdminTrayecto
.Add("@CveRegimenFiscal", SqlDbType.TinyInt).Value = CveRegimenFiscal
End With End With
Try Try

View File

@@ -716,6 +716,23 @@ Public Class ClsPaginas
Application("GlobalDTNomSatRegimenContratacion") = value Application("GlobalDTNomSatRegimenContratacion") = value
End Set End Set
End Property End Property
Property GlobalDTRegimenesFiscales() As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTRegimenesFiscales")
'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
Dim ObjGral As New ClsSisEmpresas
If ObjGral.GetRegimenFiscal(-1) Then Application(AppNombre) = ObjGral.DtResultados
ObjGral.Dispose()
End If
GlobalDTRegimenesFiscales = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTRegimenesFiscales")
Application(AppNombre) = value
End Set
End Property
Property GlobalDTNomSatRiesgoPuesto() As DataTable Property GlobalDTNomSatRiesgoPuesto() As DataTable
Get Get
GlobalDTNomSatRiesgoPuesto = DirectCast(Application("GlobalDTNomSatRiesgoPuesto"), DataTable) GlobalDTNomSatRiesgoPuesto = DirectCast(Application("GlobalDTNomSatRiesgoPuesto"), DataTable)
@@ -6933,7 +6950,7 @@ Public Class ClsPaginas
Dim TC As Decimal = ValorNodoXML(XmlDoc.DocumentElement, "TC").ToDecimal Dim TC As Decimal = ValorNodoXML(XmlDoc.DocumentElement, "TC").ToDecimal
If TC <= 0 Then TC = 1 If TC <= 0 Then TC = 1
If ValorNodoXML(XmlDoc.DocumentElement, "version") = "3.3" Then If ValorNodoXML(XmlDoc.DocumentElement, "version").Contiene("3.3", "4.0") Then
Vta.FechaEmision = ValorNodoXML(XmlDoc.DocumentElement, "fecha").ToDate Vta.FechaEmision = ValorNodoXML(XmlDoc.DocumentElement, "fecha").ToDate
Vta.NoSerieCertificadoContribuyente = ValorNodoXML(XmlDoc.DocumentElement, "NoCertificado") Vta.NoSerieCertificadoContribuyente = ValorNodoXML(XmlDoc.DocumentElement, "NoCertificado")
@@ -7039,7 +7056,7 @@ Public Class ClsPaginas
'Dim CadenaOriginals As String = "||1.0|" + Vta.FolioFiscal + "|" + Vta.FechaCertificacion.ToString("yyyy-MM-dd") + "T" + Vta.FechaCertificacion.ToString("HH:mm:ss") + "|" + Vta.SelloCFDi + "|" + Vta.NoSerieCertificado + "||" 'Dim CadenaOriginals As String = "||1.0|" + Vta.FolioFiscal + "|" + Vta.FechaCertificacion.ToString("yyyy-MM-dd") + "T" + Vta.FechaCertificacion.ToString("HH:mm:ss") + "|" + Vta.SelloCFDi + "|" + Vta.NoSerieCertificado + "||"
Dim CadenaOriginals As String = String.Format("||{0}|{1}|{2}T{3}|{4}|{5}||", If(Vta.Version = "3.3", "1.1", "1.0"), Vta.FolioFiscal, Vta.FechaCertificacion.ToString("yyyy-MM-dd"), Vta.FechaCertificacion.ToString("HH:mm:ss"), Vta.SelloCFDi, Vta.NoSerieCertificado) Dim CadenaOriginals As String = String.Format("||{0}|{1}|{2}T{3}|{4}|{5}||", If(Vta.Version.Contiene("3.3", "4.0"), "1.1", "1.0"), Vta.FolioFiscal, Vta.FechaCertificacion.ToString("yyyy-MM-dd"), Vta.FechaCertificacion.ToString("HH:mm:ss"), Vta.SelloCFDi, Vta.NoSerieCertificado)
If Not ImagenCBB.Exists Then ImgCBB = "" If Not ImagenCBB.Exists Then ImgCBB = ""
Dim RutaFormato As String = "" Dim RutaFormato As String = ""
Dim RutaFormatoDefault As String = "" Dim RutaFormatoDefault As String = ""
@@ -7162,7 +7179,7 @@ Public Class ClsPaginas
params.Add(New ReportParameter("MetodoPago", Vta.ClaveMetodoPagoSAT.ToString)) params.Add(New ReportParameter("MetodoPago", Vta.ClaveMetodoPagoSAT.ToString))
End If End If
If Vta.Version = "3.3" Then If Vta.Version.Contiene("3.3", "4.0") Then
params.Add(New ReportParameter("FormaPago", Vta.FormaPago33.ToString)) params.Add(New ReportParameter("FormaPago", Vta.FormaPago33.ToString))
params.Add(New ReportParameter("MetodoPago", Vta.MetodoPago33.ToString)) params.Add(New ReportParameter("MetodoPago", Vta.MetodoPago33.ToString))
params.Add(New ReportParameter("UsoCFDI", Vta.UsoCFDI)) params.Add(New ReportParameter("UsoCFDI", Vta.UsoCFDI))
@@ -8342,7 +8359,7 @@ Public Class ClsPaginas
'XmlDoc.Load(Ruta & "XML\\Nomina\NOM A-3845.xml") 'XmlDoc.Load(Ruta & "XML\\Nomina\NOM A-3845.xml")
XmlDoc.Load(PathXML) XmlDoc.Load(PathXML)
If ValorNodoXML(XmlDoc.DocumentElement, "version") = "3.3" Then If ValorNodoXML(XmlDoc.DocumentElement, "version").Contiene("3.3", "4.0") Then
FechaEmision = XmlDoc.DocumentElement.Attributes("Fecha").InnerText.ToDate FechaEmision = XmlDoc.DocumentElement.Attributes("Fecha").InnerText.ToDate
NoSerieCertificadoContribuyente = XmlDoc.DocumentElement.Attributes("NoCertificado").InnerText NoSerieCertificadoContribuyente = XmlDoc.DocumentElement.Attributes("NoCertificado").InnerText

View File

@@ -1016,7 +1016,7 @@ Public Class Timbrado
Retorno = TimbrarFacturaProFact(UsuarioActual, Ventas) Retorno = TimbrarFacturaProFact(UsuarioActual, Ventas)
'Retorno = TimbrarFacturaProFact(UsuarioActual, Ventas, TmpDTConceptos, TmpDTImpuestos, TmpDTComplementos, Ruta, LstFordASN, FordGSDBM, ObjV) 'Retorno = TimbrarFacturaProFact(UsuarioActual, Ventas, TmpDTConceptos, TmpDTImpuestos, TmpDTComplementos, Ruta, LstFordASN, FordGSDBM, ObjV)
Case 4 Case 4
If Ventas.Version = "4.0" Then If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
Dim Ret As String = TimbrarFacturaGoCFDIv40(Ventas, UsuarioActual, CvePACEspecial) Dim Ret As String = TimbrarFacturaGoCFDIv40(Ventas, UsuarioActual, CvePACEspecial)
If Ret <> "" Then MensajeErrorCFDI = Ret If Ret <> "" Then MensajeErrorCFDI = Ret
Retorno = If(Ret = "", True, False) Retorno = If(Ret = "", True, False)

View File

@@ -501,6 +501,19 @@
</div> </div>
</div> </div>
<div class="row" id="divRegimen" runat="server" visible="false" >
<div class="col-md-12">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlRegimenFiscal" DataTextField="CodigoRegimenFiscalTexto" Width="100%" DataValueField="CveRegimenFiscal" runat="server" CssClass="form-control input-sm select2me">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVRegimenFiscal" runat="server" InitialValue="-1" ControlToValidate="DdlRegimenFiscal" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Regimen Fiscal''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<label for="<%= DdlRegimenFiscal.ClientID.ToString()%>">Régimen Fiscal:</label>
<i></i>
</div>
</div>
</div>
</div> </div>

View File

@@ -753,6 +753,10 @@ Partial Class Clientes
DivRetIVA.Visible = False DivRetIVA.Visible = False
End If End If
If UsuarioActual.CveUsuario = 100 Then
divRegimen.Visible = True
End If
If Request("CveCliente") IsNot Nothing AndAlso IsNumeric(Request("CveCliente")) AndAlso Request("CveCliente").ToEntero() > 0 Then If Request("CveCliente") IsNot Nothing AndAlso IsNumeric(Request("CveCliente")) AndAlso Request("CveCliente").ToEntero() > 0 Then
'If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 77 AndAlso Not Request("CveCliente").Contiene("10450", "10460", "10458") Then 'If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 77 AndAlso Not Request("CveCliente").Contiene("10450", "10460", "10458") Then
' BtnGuardar.Enabled = False : BtnEliminar.Enabled = False : LbAgregarSucursal.Enabled = False : LbEnviarActivacionPortal.Enabled = False ' BtnGuardar.Enabled = False : BtnEliminar.Enabled = False : LbAgregarSucursal.Enabled = False : LbEnviarActivacionPortal.Enabled = False
@@ -1246,10 +1250,9 @@ Partial Class Clientes
CargaClasificaciones() CargaClasificaciones()
If UsuarioActual.Empresa.UsaContabilidad Then
'CargaCuentasContables()
End If
DdlRegimenFiscal.DataSource = GlobalDTRegimenesFiscales
DdlRegimenFiscal.DataBind()
CargaCombosComercioExterior() CargaCombosComercioExterior()
@@ -1574,6 +1577,7 @@ Partial Class Clientes
DdlUsoCFDI.SelectedValueExist(ObjClientes.CveUsoCFDI.ToString()) DdlUsoCFDI.SelectedValueExist(ObjClientes.CveUsoCFDI.ToString())
DdlMetodoPago33.SelectedValueExist(ObjClientes.CveMetodoPago33.ToString()) DdlMetodoPago33.SelectedValueExist(ObjClientes.CveMetodoPago33.ToString())
DdlFormaPago33.SelectedValueExist(ObjClientes.CveFormaPago33.ToString()) DdlFormaPago33.SelectedValueExist(ObjClientes.CveFormaPago33.ToString())
DdlRegimenFiscal.SelectedValueExist(ObjClientes.CveRegimenFiscal)
ChkDesglosarIEPS.Checked = ObjClientes.DesglosaIEPS ChkDesglosarIEPS.Checked = ObjClientes.DesglosaIEPS
ChkNoDesglosaIVA.Checked = ObjClientes.NoDesglosaIVA ChkNoDesglosaIVA.Checked = ObjClientes.NoDesglosaIVA
@@ -2613,7 +2617,8 @@ Partial Class Clientes
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(), DesglosaIEPS:=ChkDesglosarIEPS.Checked, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero(), CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero(), CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero(), CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(), DesglosaIEPS:=ChkDesglosarIEPS.Checked, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero(), CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero(), CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero(),
CvePais:=DdlPais.SelectedValue.ToEntero(), CveEstado:=DdlEstado.SelectedValue.ToEntero(), CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero(), CveColonia:=DdlColonia.SelectedValue.ToEntero(), CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(), CvePais:=DdlPais.SelectedValue.ToEntero(), CveEstado:=DdlEstado.SelectedValue.ToEntero(), CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero(), CveColonia:=DdlColonia.SelectedValue.ToEntero(), CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(),
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked,
TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero())) Then TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()),
CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero) Then
ViewState("CveCliente") = ObjClientes.CveCliente ViewState("CveCliente") = ObjClientes.CveCliente
@@ -2710,7 +2715,7 @@ Partial Class Clientes
ApellidoPaternoPF:=IIf(TxtApellidoPaterno.Text = "", "-1", TxtApellidoPaterno.Text).ToString(), ApellidoMaternoPF:=IIf(TxtApellidoMaterno.Text = "", "-1", TxtApellidoMaterno.Text).ToString(), NombresPF:=IIf(TxtNombres.Text = "", "-1", TxtNombres.Text).ToString(), ApellidoPaternoPF:=IIf(TxtApellidoPaterno.Text = "", "-1", TxtApellidoPaterno.Text).ToString(), ApellidoMaternoPF:=IIf(TxtApellidoMaterno.Text = "", "-1", TxtApellidoMaterno.Text).ToString(), NombresPF:=IIf(TxtNombres.Text = "", "-1", TxtNombres.Text).ToString(),
RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(),
CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()),
NoDesglosaIVA:=ChkNoDesglosaIVA.Checked) Then NoDesglosaIVA:=ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero) Then
ObjClientes.LimpiaImpuestosLocales(CveCliente) ObjClientes.LimpiaImpuestosLocales(CveCliente)

View File

@@ -10973,13 +10973,15 @@ Partial Class Ventas
If Obj.FacturarSucursal Then If Obj.FacturarSucursal Then
Timbre.Receptor.RFC = Obj.ClienteSucursal.RFC Timbre.Receptor.RFC = Obj.ClienteSucursal.RFC
Timbre.Receptor.Nombre = Obj.ClienteSucursal.Nombre Timbre.Receptor.Nombre = Obj.ClienteSucursal.Nombre
Timbre.Receptor.DomicilioFiscalReceptor = Obj.ClienteSucursal.CP
Else Else
Timbre.Receptor.RFC = Obj.Cliente.RFC Timbre.Receptor.RFC = Obj.Cliente.RFC
Timbre.Receptor.Nombre = Obj.Cliente.Nombre Timbre.Receptor.Nombre = Obj.Cliente.Nombre
Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP
End If End If
Timbre.Receptor.RegimenFiscalReceptor = Obj.Cliente.CodigoRegimenFiscal Timbre.Receptor.RegimenFiscalReceptor = Obj.Cliente.CodigoRegimenFiscal
Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP
Timbre.Receptor.ResidenciaFiscal = "" Timbre.Receptor.ResidenciaFiscal = ""
Timbre.Receptor.NumeroRegistroTributario = "" Timbre.Receptor.NumeroRegistroTributario = ""
Timbre.Receptor.UsoCFDI = Obj.ClaveUsoCFDI Timbre.Receptor.UsoCFDI = Obj.ClaveUsoCFDI
@@ -11119,7 +11121,8 @@ Partial Class Ventas
.ClaveProdServ = drr("SATClaveProdServ").ToString(), .ClaveProdServ = drr("SATClaveProdServ").ToString(),
.Noidentificacion = drr("Noidentificacion").ToString(), .Noidentificacion = drr("Noidentificacion").ToString(),
.CuentaPredial = drr("CuentaPredial").ToString(), .CuentaPredial = drr("CuentaPredial").ToString(),
.ImporteGravaIVAAdicional = drr("ImporteIEPS").ToString().ToDecimal} .ImporteGravaIVAAdicional = drr("ImporteIEPS").ToString().ToDecimal,
.ObjetoImpuesto = drr("CodigoObjetoImpuesto").ToString()}
'verifica suma subtotales 'verifica suma subtotales
If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal.RoundSQL(2) <> concepto.Importe.RoundSQL(2) AndAlso Math.Abs(totSubTotal.RoundSQL(2) - concepto.Importe.RoundSQL(2)) <= 0.01 Then 'proceso de ajusta de decimales If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal.RoundSQL(2) <> concepto.Importe.RoundSQL(2) AndAlso Math.Abs(totSubTotal.RoundSQL(2) - concepto.Importe.RoundSQL(2)) <= 0.01 Then 'proceso de ajusta de decimales
concepto.Importe = totSubTotal concepto.Importe = totSubTotal
@@ -17732,6 +17735,7 @@ Partial Class Ventas
Row("CveTipoPS") = DrPS("CveTipoPS") Row("CveTipoPS") = DrPS("CveTipoPS")
Row("CveTipoInvPS") = DrPS("Inv_CveMetodoInventario") Row("CveTipoInvPS") = DrPS("Inv_CveMetodoInventario")
Row("CveTamaño") = DrPS("CveTamaño") Row("CveTamaño") = DrPS("CveTamaño")
Row("ObjetoImpuesto") = DrPS("CodigoObjetoImpuesto")
If CveClasificacion <= 0 Then Row("CveClasificacion") = DrPS("CveClasificacion") If CveClasificacion <= 0 Then Row("CveClasificacion") = DrPS("CveClasificacion")
If Clasificacion = "" Then Row("Clasificacion") = DrPS("Clasificacion") If Clasificacion = "" Then Row("Clasificacion") = DrPS("Clasificacion")
@@ -18281,6 +18285,7 @@ Partial Class Ventas
TmpDT.Columns.Add("TieneProntoPago", GetType(String)) TmpDT.Columns.Add("TieneProntoPago", GetType(String))
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal)) TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
TmpDT.Columns.Add("ObjetoImpuesto", GetType(String))
TmpDT.Columns("EsOutSourcing").DefaultValue = False TmpDT.Columns("EsOutSourcing").DefaultValue = False
TmpDT.Columns("EsCargo").DefaultValue = False TmpDT.Columns("EsCargo").DefaultValue = False
@@ -18288,6 +18293,7 @@ Partial Class Ventas
TmpDT.Columns("TieneProntoPago").DefaultValue = "No" TmpDT.Columns("TieneProntoPago").DefaultValue = "No"
TmpDT.Columns("ImporteProntoPago").DefaultValue = 0 TmpDT.Columns("ImporteProntoPago").DefaultValue = 0
End Sub End Sub
Private Sub CreaDTmpC() Private Sub CreaDTmpC()
DTmpC = New DataTable DTmpC = New DataTable