traspaso carta porte
This commit is contained in:
@@ -207,8 +207,17 @@
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtResidenciaFiscalOperador" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtResidenciaFiscalOperador.ClientID.ToString()%>">Residencia Fiscal Operador:</label>
|
||||
<%--<asp:TextBox ID="TxtResidenciaFiscalOperador" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>--%>
|
||||
|
||||
<asp:DropDownList runat="server" ID="DdlResidenciaFiscalOperador" CssClass="form-control select2me" Width="100%" >
|
||||
<asp:ListItem Value="-1">Seleccione una</asp:ListItem>
|
||||
<asp:ListItem Value="MEX">MEX</asp:ListItem>
|
||||
<asp:ListItem Value="USA">USA</asp:ListItem>
|
||||
<asp:ListItem Value="CAN">CAN</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlResidenciaFiscalOperador" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlResidenciaFiscalOperador" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Residencia Fiscal Operador''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlResidenciaFiscalOperador.ClientID.ToString()%>">Residencia Fiscal Operador:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -70,6 +70,13 @@ Partial Class Acarreos_CatChoferes
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If TxtRFC.Text.Length > 0 And TxtNumRegidTribOperador.Text.Trim.Length > 0 Then
|
||||
Alert("Se debe de proporcionar RFC O Numero RegidTribOperador elimine uno", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
If DdlTransportista.SelectedValue = "-1" Then
|
||||
Alert("Tiene que seleccionar un transportista.", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
@@ -79,12 +86,12 @@ Partial Class Acarreos_CatChoferes
|
||||
If ChkEstatus.Checked Then Estatus = 1
|
||||
|
||||
If HdnModalidad.Value = "A" Then
|
||||
If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=TxtResidenciaFiscalOperador.Text.Trim, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=CveColonia) Then
|
||||
If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=DdlResidenciaFiscalOperador.SelectedValue, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=CveColonia) Then
|
||||
CargaDatos()
|
||||
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
ElseIf HdnModalidad.Value = "U" Then
|
||||
If ObjAcar.UpdateChofer(HdnID.Value.ToEntero(), TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=TxtResidenciaFiscalOperador.Text.Trim, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=CveColonia) Then
|
||||
If ObjAcar.UpdateChofer(HdnID.Value.ToEntero(), TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=DdlResidenciaFiscalOperador.SelectedValue, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=CveColonia) Then
|
||||
CargaDatos()
|
||||
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
@@ -120,7 +127,9 @@ Partial Class Acarreos_CatChoferes
|
||||
TxtLicencia.Text = GvRow.DataKey("Licencia")
|
||||
|
||||
TxtNumRegidTribOperador.Text = GvRow.DataKey("NumRegidTribOperador")
|
||||
TxtResidenciaFiscalOperador.Text = GvRow.DataKey("ResidenciaFiscalOperador")
|
||||
|
||||
DdlResidenciaFiscalOperador.SelectedValueExist("-1")
|
||||
DdlResidenciaFiscalOperador.SelectedValueExist(GvRow.DataKey("ResidenciaFiscalOperador"))
|
||||
|
||||
DdlTransportista.SelectedValueExist(GvRow.DataKey("CveTransportista"))
|
||||
|
||||
@@ -193,7 +202,7 @@ Partial Class Acarreos_CatChoferes
|
||||
'TxtColonia.Text = ""
|
||||
|
||||
TxtNumRegidTribOperador.Text = ""
|
||||
TxtResidenciaFiscalOperador.Text = ""
|
||||
DdlResidenciaFiscalOperador.SelectedValueExist("-1")
|
||||
|
||||
DdlColonias.txtText.Value = "Selecione Una"
|
||||
DdlColonias.txtValue.Value = "-1"
|
||||
|
||||
@@ -20,6 +20,7 @@ Public Class ClsGenerales
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
Private EsTransaccionCompartida As Boolean = False
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -49,6 +50,10 @@ Public Class ClsGenerales
|
||||
DtResultados = Data
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property FolioInsertado As Integer
|
||||
|
||||
Public Property SerieInsertada As String
|
||||
#End Region
|
||||
|
||||
Public Function IniciaTransacSQL() As SqlTransaction
|
||||
@@ -3606,8 +3611,8 @@ Public Class ClsGenerales
|
||||
#Region "GRAL TIMBRES"
|
||||
|
||||
|
||||
Public Function GralTimbreAdd(TipoDocto As Integer, Serie As String, Folio As Integer, FolioFiscal As String, Fecha As Date, CveVenta As Integer, CveMovimientoAlmacen As Integer, CveUsuario As Integer, CveEmpresa As Integer,
|
||||
Estatus As Integer, CvePAC As Integer, AplicaCP As Boolean, CveSubProyectoOrigen As Integer, CveDireccionOrigen As Integer, CveDireccionDestino As Integer) As Integer
|
||||
Public Function AddGralTimbre(TipoDocto As String, Serie As String, Folio As Integer, FolioFiscal As String, Fecha As Date, CvePaqueteriaGuia As Integer, CveMovimientoAlmacen As Integer, CveUsuario As Integer, CveEmpresa As Integer,
|
||||
Estatus As Integer, CvePAC As Integer, AplicaCP As Boolean, CveSubProyectoOrigen As Integer, CveDireccionOrigen As Integer, CveDireccionDestino As Integer, CveChofer As Integer, CveCamion As Integer, FechaEntrega As Date) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
DataAdapter("PA_Gral_TimbreAdd")
|
||||
|
||||
@@ -3618,7 +3623,7 @@ Public Class ClsGenerales
|
||||
.Add("@Folio", SqlDbType.Int).Value = Folio
|
||||
.Add("@FolioFiscal", SqlDbType.VarChar).Value = FolioFiscal
|
||||
.Add("@Fecha", SqlDbType.Date).Value = Fecha
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@CvePaqueteriaGuia", SqlDbType.Int).Value = CvePaqueteriaGuia
|
||||
.Add("@CveMovimientoAlmacen", SqlDbType.Int).Value = CveMovimientoAlmacen
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
@@ -3628,19 +3633,31 @@ Public Class ClsGenerales
|
||||
.Add("@CveSubProyectoOrigen", SqlDbType.Int).Value = CveSubProyectoOrigen
|
||||
.Add("@CveDireccionOrigen", SqlDbType.Int).Value = CveDireccionOrigen
|
||||
.Add("@CveDireccionDestino", SqlDbType.Int).Value = CveDireccionDestino
|
||||
.Add("@CveTimbre", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
|
||||
.Add("@CveCamion", SqlDbType.Int).Value = CveCamion
|
||||
.Add("@FechaEntrega", SqlDbType.DateTime).Value = FechaEntrega
|
||||
|
||||
.Add("@CveTimbre", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@FolioInsertado", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@SerieInsertada", SqlDbType.VarChar, 5).Direction = ParameterDirection.Output
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = SqlAdapter.SelectCommand.Parameters("@CveTimbre").Value.ToString.ToEntero
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
FolioInsertado = SqlAdapter.SelectCommand.Parameters("@FolioInsertado").Value.ToString.ToEntero
|
||||
SerieInsertada = SqlAdapter.SelectCommand.Parameters("@SerieInsertada").Value.ToString
|
||||
|
||||
Retorno = SqlAdapter.SelectCommand.Parameters("@CveTimbre").Value.ToString.ToEntero
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar el timbre", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GralTimbreGet(CveTimbre As Integer, TipoDocto As String, Serie As String, Folio As Integer, FechaI As Date, FechaF As Date, Estatus As Integer, CveEmpresa As Integer, CveVenta As Integer) As Boolean
|
||||
Public Function GetGralTimbre(CveTimbre As Integer, TipoDocto As String, Serie As String, Folio As Integer, FechaI As Date, FechaF As Date, Estatus As Integer, CveEmpresa As Integer, CveMovimiento As Integer, CvePaqueteriaGuia As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Gral_TimbreGet")
|
||||
|
||||
@@ -3651,11 +3668,10 @@ Public Class ClsGenerales
|
||||
.Add("@Folio", SqlDbType.Int).Value = Folio
|
||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveMovimiento", SqlDbType.Int).Value = CveMovimiento
|
||||
.Add("@CvePaqueteriaGuia", SqlDbType.Int).Value = CvePaqueteriaGuia
|
||||
|
||||
|
||||
|
||||
@@ -3671,8 +3687,9 @@ Public Class ClsGenerales
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GralTimbreUpdate(CveTimbre As Integer, TipoDocto As Integer, Serie As String, Folio As Integer, FolioFiscal As String, Fecha As Date, CveVenta As Integer, CveMovimientoAlmacen As Integer, CveUsuario As Integer, CveEmpresa As Integer,
|
||||
Estatus As Integer, CvePAC As Integer, CvePACCancelacion As Integer, FechaCancelacion As Date, AplicaCP As Boolean, CveSubProyectoOrigen As Integer, CveDireccionOrigen As Integer, CveDireccionDestino As Integer) As Boolean
|
||||
Public Function UpdateGralTimbre(CveTimbre As Integer, TipoDocto As String, Serie As String, Folio As Integer, FolioFiscal As String, Fecha As Date, CvePaqueteriaGuia As Integer, CveMovimientoAlmacen As Integer, CveUsuario As Integer, CveEmpresa As Integer,
|
||||
Estatus As Integer, CvePAC As Integer, CvePACCancelacion As Integer, FechaCancelacion As Date, AplicaCP As Boolean, CveSubProyectoOrigen As Integer, CveDireccionOrigen As Integer, CveDireccionDestino As Integer,
|
||||
CveChofer As Integer, CveCamion As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Gral_TimbreUpdate")
|
||||
|
||||
@@ -3684,7 +3701,7 @@ Public Class ClsGenerales
|
||||
.Add("@Folio", SqlDbType.Int).Value = Folio
|
||||
.Add("@FolioFiscal", SqlDbType.VarChar).Value = FolioFiscal
|
||||
.Add("@Fecha", SqlDbType.Date).Value = Fecha
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@CvePaqueteriaGuia", SqlDbType.Int).Value = CvePaqueteriaGuia
|
||||
.Add("@CveMovimientoAlmacen", SqlDbType.Int).Value = CveMovimientoAlmacen
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
.Add("@CvePAC", SqlDbType.Int).Value = CvePAC
|
||||
@@ -3695,7 +3712,9 @@ Public Class ClsGenerales
|
||||
.Add("@CveDireccionOrigen", SqlDbType.Int).Value = CveDireccionOrigen
|
||||
.Add("@CveDireccionDestino", SqlDbType.Int).Value = CveDireccionDestino
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
|
||||
.Add("@CveCamion", SqlDbType.Int).Value = CveCamion
|
||||
|
||||
End With
|
||||
|
||||
@@ -3710,7 +3729,7 @@ Public Class ClsGenerales
|
||||
|
||||
|
||||
|
||||
Public Function GralTimbreRemove(CveTimbre As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function RemoveGralTimbre(CveTimbre As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Gral_TimbreRemove")
|
||||
|
||||
@@ -3728,6 +3747,28 @@ Public Class ClsGenerales
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetGralMovimientosDetalleTimbre(CveTimbre As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Gral_MovimientosDetalleTimbreGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveTimbre", SqlDbType.Int).Value = CveTimbre
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los movimientos del timbre", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -6844,7 +6844,8 @@ Public Class ClsPaginas
|
||||
Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
|
||||
CBB.GenerarCBB(UsuarioActual.Empresa.RFC, RFCReceptor, Vta.Total.ToString.ToDecimal, Vta.FolioFiscal, RutaCBB)
|
||||
End If
|
||||
ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
|
||||
'ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme.Replace("https", "http"), Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
|
||||
|
||||
|
||||
'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)
|
||||
@@ -6852,6 +6853,11 @@ Public Class ClsPaginas
|
||||
Dim RutaFormato As String = ""
|
||||
Dim RutaFormatoDefault As String = ""
|
||||
|
||||
|
||||
ImgCBB = $"file://{ImagenCBB.FullName}"
|
||||
|
||||
|
||||
|
||||
'AQUI EMPIEZA LOS PARAMETROS
|
||||
Try
|
||||
Dim params As New List(Of ReportParameter)
|
||||
@@ -6903,6 +6909,8 @@ Public Class ClsPaginas
|
||||
params.Add(New ReportParameter("CadenaSAT", CadenaOriginals))
|
||||
params.Add(New ReportParameter("SelloSAT", Vta.SelloSAT))
|
||||
|
||||
'Net.ServicePointManager.SecurityProtocol = Net.ServicePointManager.SecurityProtocol Or Net.SecurityProtocolType.Tls Or Net.SecurityProtocolType.Tls11 Or Net.SecurityProtocolType.Tls12
|
||||
|
||||
params.Add(New ReportParameter("QR", ImgCBB))
|
||||
params.Add(New ReportParameter("Moneda", Vta.Moneda))
|
||||
params.Add(New ReportParameter("TipoCambio", Vta.TipoCambio.ToString))
|
||||
|
||||
BIN
Bin/GoCfdi.dll
BIN
Bin/GoCfdi.dll
Binary file not shown.
@@ -379,8 +379,8 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
|
||||
If UrlParametros("OP").ToString = "CARPOTIMBRE" Then
|
||||
If UrlParametros("CVEMOV") IsNot Nothing AndAlso UrlParametros("CVEMOV").ToString.ToEntero > 0 Then
|
||||
ImprimeFormatoCartaPorteTimbrado(UrlParametros("CVEMOV").ToString.ToEntero)
|
||||
If UrlParametros("CVETIMBRE") IsNot Nothing AndAlso UrlParametros("CVETIMBRE").ToString.ToEntero > 0 Then
|
||||
ImprimeFormatoCartaPorteTimbrado(UrlParametros("CVETIMBRE").ToString.ToEntero)
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -897,8 +897,8 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Sub ImprimeFormatoCartaPorteTimbrado(CveMovimiento As Integer)
|
||||
If CveMovimiento > 0 Then
|
||||
Private Sub ImprimeFormatoCartaPorteTimbrado(CveTimbre As Integer)
|
||||
If CveTimbre > 0 Then
|
||||
|
||||
'01 Autotransporte Federal
|
||||
'02 Transporte Marítimo
|
||||
@@ -944,13 +944,14 @@ Partial Class PopUpVerFactura
|
||||
Dim SelloCFDi As String = ""
|
||||
Dim SelloSAT As String = ""
|
||||
|
||||
Dim ObjInv As New ClsInventarios
|
||||
If ObjInv.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
Dim ObjInv As New ClsGenerales
|
||||
|
||||
If ObjInv.GetGralTimbre(CveTimbre, "-1", "-1", -1, MinFecha, MaxFecha, -1, UsuarioActual.CveEmpresa, -1, -1) Then
|
||||
If ObjInv.DtResultados.Rows.Count > 0 Then
|
||||
Dim Dr As DataRow = ObjInv.DtResultados.Rows(0)
|
||||
If Dr IsNot Nothing Then
|
||||
SerieFolio = Dr("Folio").ToString
|
||||
Telefono = Dr("Telefono1").ToString
|
||||
SerieFolio = Dr("SerieFolio").ToString
|
||||
Telefono = Dr("ChrTelefono").ToString
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -982,7 +983,7 @@ Partial Class PopUpVerFactura
|
||||
DtOperadores.Columns.Add(New DataColumn("NombreOperador", GetType(String)))
|
||||
|
||||
Dim XMLDoc As New XmlDocument
|
||||
Dim Path As String = String.Format("{0}\{1}\{2}\{3}.{4}", UsuarioActual.Empresa.Ruta, "XML", "Tra", String.Format("Tra-{0}", SerieFolio), "xml")
|
||||
Dim Path As String = String.Format("{0}\{1}\{2}\{3}.{4}", UsuarioActual.Empresa.Ruta, "XML", "Tra", String.Format("{0}", SerieFolio), "xml")
|
||||
Dim Archivo As New System.IO.FileInfo(Path)
|
||||
|
||||
If Archivo.Exists Then
|
||||
@@ -1001,7 +1002,7 @@ Partial Class PopUpVerFactura
|
||||
|
||||
If XMLDoc IsNot Nothing AndAlso Archivo.Exists Then
|
||||
|
||||
Dim RutaCBB As String = String.Format("{0}\CBB\Tra-{1}.jpg", UsuarioActual.Empresa.Ruta, SerieFolio)
|
||||
Dim RutaCBB As String = String.Format("{0}\CBB\{1}.jpg", UsuarioActual.Empresa.Ruta, SerieFolio)
|
||||
Dim ImagenCBB As New System.IO.FileInfo(RutaCBB)
|
||||
|
||||
Dim nodo As XmlNode = XMLDoc.DocumentElement
|
||||
@@ -1150,7 +1151,7 @@ Partial Class PopUpVerFactura
|
||||
CBB.GenerarCBB(UsuarioActual.Empresa.RFC, ClienteRFC, Total, FolioFiscal, RutaCBB)
|
||||
End If
|
||||
|
||||
ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/Tra-{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, SerieFolio)
|
||||
ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, SerieFolio)
|
||||
End If
|
||||
|
||||
If DtConceptos.Rows.Count > 0 Then
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1173,7 +1173,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox20</rd:DefaultName>
|
||||
<Top>7.25225cm</Top>
|
||||
<Top>8.173cm</Top>
|
||||
<Left>16.1331cm</Left>
|
||||
<Height>0.45183cm</Height>
|
||||
<Width>2.06968cm</Width>
|
||||
@@ -1339,7 +1339,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox20</rd:DefaultName>
|
||||
<Top>7.25225cm</Top>
|
||||
<Top>8.173cm</Top>
|
||||
<Left>18.20276cm</Left>
|
||||
<Height>0.45183cm</Height>
|
||||
<Width>2.26019cm</Width>
|
||||
@@ -1449,7 +1449,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox46</rd:DefaultName>
|
||||
<Top>7.25225cm</Top>
|
||||
<Top>8.173cm</Top>
|
||||
<Left>0.20457cm</Left>
|
||||
<Height>0.45183cm</Height>
|
||||
<Width>15.92855cm</Width>
|
||||
@@ -2432,7 +2432,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox12</rd:DefaultName>
|
||||
<Top>9.76815cm</Top>
|
||||
<Top>10.72065cm</Top>
|
||||
<Left>3.07712cm</Left>
|
||||
<Height>0.44478cm</Height>
|
||||
<Width>5.83844cm</Width>
|
||||
@@ -2468,7 +2468,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox12</rd:DefaultName>
|
||||
<Top>10.21293cm</Top>
|
||||
<Top>11.16543cm</Top>
|
||||
<Left>3.07712cm</Left>
|
||||
<Height>0.4095cm</Height>
|
||||
<Width>5.83844cm</Width>
|
||||
@@ -2508,7 +2508,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox12</rd:DefaultName>
|
||||
<Top>10.65771cm</Top>
|
||||
<Top>11.61021cm</Top>
|
||||
<Left>3.07712cm</Left>
|
||||
<Height>0.44478cm</Height>
|
||||
<Width>5.83844cm</Width>
|
||||
@@ -2544,7 +2544,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox12</rd:DefaultName>
|
||||
<Top>9.76815cm</Top>
|
||||
<Top>10.72065cm</Top>
|
||||
<Left>11.4732cm</Left>
|
||||
<Height>0.44478cm</Height>
|
||||
<Width>5.83844cm</Width>
|
||||
@@ -2580,7 +2580,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox12</rd:DefaultName>
|
||||
<Top>10.21293cm</Top>
|
||||
<Top>11.16543cm</Top>
|
||||
<Left>11.4732cm</Left>
|
||||
<Height>0.4095cm</Height>
|
||||
<Width>5.83844cm</Width>
|
||||
@@ -2620,7 +2620,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox12</rd:DefaultName>
|
||||
<Top>10.65771cm</Top>
|
||||
<Top>11.61021cm</Top>
|
||||
<Left>11.4732cm</Left>
|
||||
<Height>0.44478cm</Height>
|
||||
<Width>5.83844cm</Width>
|
||||
@@ -2637,10 +2637,11 @@
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Image Name="ImgFirmaAutorizo">
|
||||
<Source>External</Source>
|
||||
<Value>=Parameters!FirmaAutorizo.Value</Value>
|
||||
<Source>Database</Source>
|
||||
<Value>=System.Convert.FromBase64String(Parameters!FirmaAutorizo.Value)</Value>
|
||||
<MIMEType>image/png</MIMEType>
|
||||
<Sizing>Fit</Sizing>
|
||||
<Top>8.19797cm</Top>
|
||||
<Top>9.15047cm</Top>
|
||||
<Left>12.49243cm</Left>
|
||||
<Height>3.5cm</Height>
|
||||
<Width>3.5cm</Width>
|
||||
@@ -2655,10 +2656,11 @@
|
||||
</Style>
|
||||
</Image>
|
||||
<Image Name="ImgFirmaAutorizo2">
|
||||
<Source>External</Source>
|
||||
<Value>=Parameters!FirmaSolicito.Value</Value>
|
||||
<Source>Database</Source>
|
||||
<Value>=System.Convert.FromBase64String(Parameters!FirmaSolicito.Value)</Value>
|
||||
<MIMEType>image/png</MIMEType>
|
||||
<Sizing>Fit</Sizing>
|
||||
<Top>8.19797cm</Top>
|
||||
<Top>9.15047cm</Top>
|
||||
<Left>4.23541cm</Left>
|
||||
<Height>3.5cm</Height>
|
||||
<Width>3.5cm</Width>
|
||||
@@ -2805,7 +2807,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>11.98901cm</Top>
|
||||
<Top>13.25901cm</Top>
|
||||
<Left>4.69611cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>15.75563cm</Width>
|
||||
@@ -3075,7 +3077,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox8</rd:DefaultName>
|
||||
<Top>11.98901cm</Top>
|
||||
<Top>13.25901cm</Top>
|
||||
<Height>1.20854cm</Height>
|
||||
<Width>4.59028cm</Width>
|
||||
<ZIndex>42</ZIndex>
|
||||
@@ -3129,8 +3131,228 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox48">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Ret IVA</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox20</rd:DefaultName>
|
||||
<Top>7.26417cm</Top>
|
||||
<Left>16.13046cm</Left>
|
||||
<Height>0.45183cm</Height>
|
||||
<Width>2.0717cm</Width>
|
||||
<ZIndex>44</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=Microsoft.VisualBasic.Interaction.iif(Parameters!RetIVA.Value > 0, False, True)</Hidden>
|
||||
</Visibility>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<TopBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</TopBorder>
|
||||
<BottomBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</BottomBorder>
|
||||
<LeftBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</LeftBorder>
|
||||
<RightBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</RightBorder>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox49">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!RetIVA.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<Format>#,0.00</Format>
|
||||
<Language>es-MX</Language>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox20</rd:DefaultName>
|
||||
<Top>7.26417cm</Top>
|
||||
<Left>18.19155cm</Left>
|
||||
<Height>0.45183cm</Height>
|
||||
<Width>2.25666cm</Width>
|
||||
<ZIndex>45</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=Microsoft.VisualBasic.Interaction.iif(Parameters!RetIVA.Value > 0, False, True)</Hidden>
|
||||
</Visibility>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<TopBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</TopBorder>
|
||||
<BottomBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</BottomBorder>
|
||||
<LeftBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</LeftBorder>
|
||||
<RightBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</RightBorder>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox50">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Ret ISR</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox20</rd:DefaultName>
|
||||
<Top>7.71953cm</Top>
|
||||
<Left>16.12189cm</Left>
|
||||
<Height>0.45183cm</Height>
|
||||
<Width>2.08027cm</Width>
|
||||
<ZIndex>46</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=Microsoft.VisualBasic.Interaction.iif(Parameters!RetISR.Value > 0, False, True)</Hidden>
|
||||
</Visibility>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<TopBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</TopBorder>
|
||||
<BottomBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</BottomBorder>
|
||||
<LeftBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</LeftBorder>
|
||||
<RightBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</RightBorder>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox51">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!RetISR.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<Format>#,0.00</Format>
|
||||
<Language>es-MX</Language>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox20</rd:DefaultName>
|
||||
<Top>7.71953cm</Top>
|
||||
<Left>18.19155cm</Left>
|
||||
<Height>0.45183cm</Height>
|
||||
<Width>2.26019cm</Width>
|
||||
<ZIndex>47</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=Microsoft.VisualBasic.Interaction.iif(Parameters!RetISR.Value > 0, False, True)</Hidden>
|
||||
</Visibility>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<TopBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</TopBorder>
|
||||
<BottomBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</BottomBorder>
|
||||
<LeftBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</LeftBorder>
|
||||
<RightBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</RightBorder>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Height>5.19589in</Height>
|
||||
<Height>5.94589in</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>8.05749in</Width>
|
||||
|
||||
@@ -6,28 +6,68 @@
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>0.55143in</Width>
|
||||
<Width>0.86167in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>0.69922in</Width>
|
||||
<Width>0.52018in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.73895in</Width>
|
||||
<Width>0.67839in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.30851in</Width>
|
||||
<Width>2.43151in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>0.82226in</Width>
|
||||
<Width>1.15226in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>0.98893in</Width>
|
||||
<Width>0.75976in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>0.81858in</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
<TablixRow>
|
||||
<Height>0.25in</Height>
|
||||
<Height>0.3125in</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox11">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>NÚMERO DE PARTE</Value>
|
||||
<Style>
|
||||
<FontFamily>Roboto Condensed Light</FontFamily>
|
||||
<FontSize>7.5pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<Color>White</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox11</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>#ff1037</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox2">
|
||||
@@ -255,6 +295,41 @@
|
||||
<TablixRow>
|
||||
<Height>0.25in</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Codigo">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Codigo.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Roboto Condensed Light</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<Language>es-MX</Language>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Codigo</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Cantidad">
|
||||
@@ -466,6 +541,7 @@
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
</TablixMembers>
|
||||
</TablixColumnHierarchy>
|
||||
<TablixRowHierarchy>
|
||||
@@ -481,8 +557,8 @@
|
||||
<DataSetName>DsOC</DataSetName>
|
||||
<Top>3.49009in</Top>
|
||||
<Left>0.13746in</Left>
|
||||
<Height>0.5in</Height>
|
||||
<Width>7.1093in</Width>
|
||||
<Height>0.5625in</Height>
|
||||
<Width>7.22235in</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -1245,12 +1321,12 @@
|
||||
<Width>2pt</Width>
|
||||
</Border>
|
||||
</Style>
|
||||
</Line>
|
||||
</Line>
|
||||
</ReportItems>
|
||||
<Height>6.36333in</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>7.53738in</Width>
|
||||
<Width>7.50059in</Width>
|
||||
<Page>
|
||||
<PageFooter>
|
||||
<Height>2.76938in</Height>
|
||||
|
||||
@@ -2294,8 +2294,9 @@
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Image Name="ImgFirmaAutorizo3">
|
||||
<Source>External</Source>
|
||||
<Value>=Parameters!FirmaAutorizo.Value</Value>
|
||||
<Source>Database</Source>
|
||||
<Value>=System.Convert.FromBase64String(Parameters!FirmaAutorizo.Value)</Value>
|
||||
<MIMEType>image/png</MIMEType>
|
||||
<Sizing>Fit</Sizing>
|
||||
<Top>8.83297cm</Top>
|
||||
<Left>12.49243cm</Left>
|
||||
@@ -2312,8 +2313,9 @@
|
||||
</Style>
|
||||
</Image>
|
||||
<Image Name="ImgFirmaAutorizo4">
|
||||
<Source>External</Source>
|
||||
<Value>=Parameters!FirmaSolicito.Value</Value>
|
||||
<Source>Database</Source>
|
||||
<Value>=System.Convert.FromBase64String(Parameters!FirmaSolicito.Value)</Value>
|
||||
<MIMEType>image/png</MIMEType>
|
||||
<Sizing>Fit</Sizing>
|
||||
<Top>8.83297cm</Top>
|
||||
<Left>4.23541cm</Left>
|
||||
@@ -2564,7 +2566,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox20</rd:DefaultName>
|
||||
<Top>7.05666cm</Top>
|
||||
<Top>7.97741cm</Top>
|
||||
<Left>16.12454cm</Left>
|
||||
<Height>0.45183cm</Height>
|
||||
<Width>2.06968cm</Width>
|
||||
@@ -2676,7 +2678,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox20</rd:DefaultName>
|
||||
<Top>7.05666cm</Top>
|
||||
<Top>7.97741cm</Top>
|
||||
<Left>18.1942cm</Left>
|
||||
<Height>0.45183cm</Height>
|
||||
<Width>2.26019cm</Width>
|
||||
@@ -2730,7 +2732,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox46</rd:DefaultName>
|
||||
<Top>7.05666cm</Top>
|
||||
<Top>7.97741cm</Top>
|
||||
<Left>0.19601cm</Left>
|
||||
<Height>0.45183cm</Height>
|
||||
<Width>15.92855cm</Width>
|
||||
@@ -3026,6 +3028,226 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox33">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Ret IVA</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox20</rd:DefaultName>
|
||||
<Top>7.05964cm</Top>
|
||||
<Left>16.13311cm</Left>
|
||||
<Height>0.45183cm</Height>
|
||||
<Width>2.0717cm</Width>
|
||||
<ZIndex>43</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=Microsoft.VisualBasic.Interaction.iif(Parameters!RetIVA.Value > 0, False, True)</Hidden>
|
||||
</Visibility>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<TopBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</TopBorder>
|
||||
<BottomBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</BottomBorder>
|
||||
<LeftBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</LeftBorder>
|
||||
<RightBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</RightBorder>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox35">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!RetIVA.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<Format>#,0.00</Format>
|
||||
<Language>es-MX</Language>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox20</rd:DefaultName>
|
||||
<Top>7.05964cm</Top>
|
||||
<Left>18.1942cm</Left>
|
||||
<Height>0.45183cm</Height>
|
||||
<Width>2.25666cm</Width>
|
||||
<ZIndex>44</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=Microsoft.VisualBasic.Interaction.iif(Parameters!RetIVA.Value > 0, False, True)</Hidden>
|
||||
</Visibility>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<TopBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</TopBorder>
|
||||
<BottomBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</BottomBorder>
|
||||
<LeftBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</LeftBorder>
|
||||
<RightBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</RightBorder>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox37">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Ret ISR</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox20</rd:DefaultName>
|
||||
<Top>7.515cm</Top>
|
||||
<Left>16.12454cm</Left>
|
||||
<Height>0.45183cm</Height>
|
||||
<Width>2.08027cm</Width>
|
||||
<ZIndex>45</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=Microsoft.VisualBasic.Interaction.iif(Parameters!RetISR.Value > 0, False, True)</Hidden>
|
||||
</Visibility>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<TopBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</TopBorder>
|
||||
<BottomBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</BottomBorder>
|
||||
<LeftBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</LeftBorder>
|
||||
<RightBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</RightBorder>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox38">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!RetISR.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<Format>#,0.00</Format>
|
||||
<Language>es-MX</Language>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox20</rd:DefaultName>
|
||||
<Top>7.515cm</Top>
|
||||
<Left>18.1942cm</Left>
|
||||
<Height>0.45183cm</Height>
|
||||
<Width>2.26019cm</Width>
|
||||
<ZIndex>46</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=Microsoft.VisualBasic.Interaction.iif(Parameters!RetISR.Value > 0, False, True)</Hidden>
|
||||
</Visibility>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<TopBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</TopBorder>
|
||||
<BottomBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</BottomBorder>
|
||||
<LeftBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</LeftBorder>
|
||||
<RightBorder>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</RightBorder>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Height>5.1933in</Height>
|
||||
<Style />
|
||||
@@ -3067,7 +3289,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox8</rd:DefaultName>
|
||||
<Top>0.08113cm</Top>
|
||||
<Top>0.08112cm</Top>
|
||||
<Left>0.20457cm</Left>
|
||||
<Height>0.46771cm</Height>
|
||||
<Width>6.86562cm</Width>
|
||||
|
||||
@@ -1622,11 +1622,18 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value> TRASLADO</Value>
|
||||
<Value>CARTA PORTE - TRASLADO</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<FontSize>9pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>O</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>9pt</FontSize>
|
||||
<Color>White</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
|
||||
@@ -157,8 +157,18 @@
|
||||
<asp:DropDownList ID="DdlAlmacenTransitorio" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label AssociatedControlID="ChkEmitirTimbrado" runat="server" Text="Emitir Timbrado:" ID="LblEmitirTimbrado" CssClass="col-md-2 " Visible="false"></asp:Label>
|
||||
<asp:Panel ID="DivEmitirTimbrado" runat="server" Visible="false" class="col-md-2">
|
||||
<asp:CheckBox ID="ChkEmitirTimbrado" runat="server" CssClass="chksino" Text=" " />
|
||||
<asp:Panel ID="DivEmitirTimbrado" runat="server" Visible="false" class="col-md-1" >
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><asp:CheckBox ID="ChkEmitirTimbrado" runat="server" CssClass="chksino" Text=" " OnCheckedChanged="ChkEmitirTimbrado_CheckedChanged" AutoPostBack="true" /> </td>
|
||||
<td><asp:CheckBox ID="ChkEmitirCartaPorte" runat="server" Text="Carta Porte" Visible="false" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Panel>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -215,8 +215,14 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 119, 140, 2) Then
|
||||
DivEmitirTimbrado.Visible = True
|
||||
LblEmitirTimbrado.Visible = True
|
||||
ChkEmitirTimbrado.Checked = True
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(161) = "1" Then
|
||||
LblEmitirTimbrado.Visible = True
|
||||
ChkEmitirTimbrado.Checked = True
|
||||
End If
|
||||
|
||||
|
||||
ChkEmitirCartaPorte.Visible = True
|
||||
|
||||
Dim HabilitarValidators As Boolean = UsuarioActual.CveEmpresa.Contiene(119)
|
||||
RfvDdlChofer.Enabled = HabilitarValidators
|
||||
@@ -702,6 +708,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
registro.Item("Noidentificacion") = DrPS("Codigo")
|
||||
registro.Item("CuentaPredial") = ""
|
||||
registro.Item("Obs") = ""
|
||||
|
||||
registro.Item("ImporteIVA") = 0
|
||||
registro.Item("PorcentajeIVA") = 0
|
||||
registro("ClaveMaterialPeligroso") = DrPS("ClaveMaterialPeligroso")
|
||||
@@ -747,6 +754,24 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
#Region " GUARDAR "
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
|
||||
|
||||
If ChkEmitirTimbrado.Checked Then
|
||||
|
||||
If DdlChofer.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("Debe de seleccionar un chofer")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
If DdlUnidadCamion.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("Debe de seleccionar una unidad")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
'VALIDA ALMACEN ORIGEN Y DESTINO
|
||||
If DdlAlmacenOrigen.SelectedValue = DdlAlmacenDestino.SelectedValue Then
|
||||
Alert("No se puede realizar un traspaso entre el mismo almacén.", TipoMensaje.MsgAdvertencia)
|
||||
@@ -1147,8 +1172,34 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
' End If
|
||||
'End If
|
||||
|
||||
Dim SerieInsertadaTimbre As String = ""
|
||||
Dim FolioInsertadoTimbre As Integer = -1
|
||||
Dim CveTimbre As Integer = -1
|
||||
If Not ErrorMovInv Then
|
||||
|
||||
If ChkEmitirTimbrado.Checked Then
|
||||
Dim ObjGral As New ClsGenerales(ObjInventario.IniciaTransacSQL)
|
||||
Dim CveSubProyectoTimbre As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {DdlAlmacenOrigen.SelectedValue}").Rows(0)("CveSubProyecto").ToString.ToEntero
|
||||
|
||||
CveTimbre = ObjGral.AddGralTimbre("Tra", "-1", -1, "", MinFecha, -1, CveMovimientoSalida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, -1, ChkEmitirCartaPorte.Checked, CveSubProyectoTimbre, -1, -1, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, TxtFechaEntrega.Text.ToDateTime)
|
||||
|
||||
If CveTimbre > 0 Then
|
||||
SerieInsertadaTimbre = ObjGral.SerieInsertada
|
||||
FolioInsertadoTimbre = ObjGral.FolioInsertado
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
DtTraslado = DtMovimientos.Copy
|
||||
|
||||
ObjInventario.Commit()
|
||||
MensajeAlert = New StringBuilder
|
||||
|
||||
@@ -1165,7 +1216,10 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
End If
|
||||
|
||||
If ChkEmitirTimbrado.Checked AndAlso ChkTransitorio.Checked Then CveMovimientoTimbrado = CveMovimientoSalida : Timbrar()
|
||||
If ChkEmitirTimbrado.Checked Then
|
||||
CveMovimientoTimbrado = CveMovimientoSalida
|
||||
Timbrar(CveTimbre, CveMovimientoTimbrado)
|
||||
End If
|
||||
|
||||
Alert(MensajeAlert.ToString, TipoMensaje.MsgInformacion, "")
|
||||
|
||||
@@ -2667,12 +2721,19 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
ObjFactura.Inv_CveMovimiento = CveMovimientoTimbrado
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(161) = "1" Then
|
||||
'If UsuarioActual.Empresa.Funcionalidad(161) = "1" Then
|
||||
' ObjFactura.Timbre = PreParaTimbreCartaPorte(ObjFactura)
|
||||
'Else
|
||||
' ObjFactura.Timbre = PreParaTimbre(ObjFactura)
|
||||
'End If
|
||||
|
||||
If ChkEmitirCartaPorte.Checked Then
|
||||
ObjFactura.Timbre = PreParaTimbreCartaPorte(ObjFactura)
|
||||
Else
|
||||
ObjFactura.Timbre = PreParaTimbre(ObjFactura)
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
Private Function PreParaTimbreCartaPorte(Obj As Modelos.Factura) As CFDITimbre
|
||||
Dim Timbre As New CFDITimbre
|
||||
@@ -3009,45 +3070,92 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
TmpDTComplementosTimbrado.Rows.Add(Row2)
|
||||
End Sub
|
||||
|
||||
Private Sub Timbrar()
|
||||
CreaObjetosVenta()
|
||||
Dim ObjTimbrado As New Timbrado
|
||||
Dim FM As New Modelos.FemsaFactura
|
||||
Dim TmpDT7Eleven As New DataTable
|
||||
Dim TmpDTComplementosTimbrado As New DataTable
|
||||
PrepararTimbrado(FM, TmpDT7Eleven, TmpDTComplementosTimbrado)
|
||||
|
||||
Private Sub Timbrar(CveTimbre As Integer, CveMovimientoTimbrado As Integer)
|
||||
|
||||
|
||||
|
||||
Dim ObjTimbres As New Timbres()
|
||||
|
||||
If Not ObjTimbres.CargarDatosRequeridos(CveTimbre, UsuarioActual) Then
|
||||
Alert($"{ObjTimbres.MsgError.ToString}", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
MensajeAlert.Append("<br/><br/>")
|
||||
|
||||
If ObjTimbres.Timbrar() Then
|
||||
|
||||
Try
|
||||
PdfFactura(ObjTimbres.ObjFactura)
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
|
||||
'If TimbrarFacturaGoCFDIv33(ObjFactura, UsuarioActual, 4) <> "" Then
|
||||
' MensajeAlert.AppendFormat("<ul><li>-- no timbró-{0}</li></ul>", MensajeErrorCFDI)
|
||||
'End If
|
||||
If ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura) Then
|
||||
MensajeAlert.Append("Emitido con exito.")
|
||||
'XML
|
||||
Dim ArchivoXML = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio)
|
||||
Dim ArchivoXML = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, ObjTimbres.ObjFactura.TipoDocto, ObjTimbres.ObjFactura.SerieFolio)
|
||||
If File.Exists(ArchivoXML) Then
|
||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimientoTimbrado, "XML", ObjFactura.SerieFolio, ObjFactura.TipoDocto)))
|
||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimientoTimbrado, "XML", ObjTimbres.ObjFactura.SerieFolio, ObjTimbres.ObjFactura.TipoDocto)))
|
||||
End If
|
||||
'PDF
|
||||
GeneraPDFFactura()
|
||||
Dim ArchivoPDF = String.Format("{0}/PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio)
|
||||
Dim ArchivoPDF = String.Format("{0}/PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta, ObjTimbres.ObjFactura.TipoDocto, ObjTimbres.ObjFactura.SerieFolio)
|
||||
If File.Exists(ArchivoPDF) Then
|
||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul>", Encripta(String.Format("OP=DesPdfTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimientoTimbrado, "PDF", ObjFactura.SerieFolio, ObjFactura.TipoDocto)))
|
||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul>", Encripta(String.Format("OP=DesPdfTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimientoTimbrado, "PDF", ObjTimbres.ObjFactura.SerieFolio, ObjTimbres.ObjFactura.TipoDocto)))
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(161) = "1" Then
|
||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar Carta Porte</a></li></ul>", Encripta(String.Format("OP=CARPOTIMBRE&CVEMOV={0}", CveMovimientoTimbrado)))
|
||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar Carta Porte</a></li></ul>", Encripta(String.Format("OP=CARPOTIMBRE&CVETIMBRE={0}", CveTimbre)))
|
||||
Else
|
||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar Carta Porte</a></li></ul>", Encripta(String.Format("OP=CARPO&CVEMOV={0}", CveMovimientoTimbrado)))
|
||||
End If
|
||||
|
||||
Else
|
||||
MensajeAlert.AppendFormat("<ul><li>{0}</li></ul>", ObjTimbrado.MensajeErrorCFDI)
|
||||
MensajeAlert.AppendFormat("<ul><li>{0}</li></ul>", ObjTimbres.MsgError.ToString)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
'Private Sub Timbrar()
|
||||
|
||||
' CreaObjetosVenta()
|
||||
' Dim ObjTimbrado As New Timbrado
|
||||
' Dim FM As New Modelos.FemsaFactura
|
||||
' Dim TmpDT7Eleven As New DataTable
|
||||
' Dim TmpDTComplementosTimbrado As New DataTable
|
||||
' PrepararTimbrado(FM, TmpDT7Eleven, TmpDTComplementosTimbrado)
|
||||
' MensajeAlert.Append("<br/><br/>")
|
||||
|
||||
|
||||
' If ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura) Then
|
||||
' MensajeAlert.Append("Emitido con exito.")
|
||||
' 'XML
|
||||
' Dim ArchivoXML = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio)
|
||||
' If File.Exists(ArchivoXML) Then
|
||||
' MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimientoTimbrado, "XML", ObjFactura.SerieFolio, ObjFactura.TipoDocto)))
|
||||
' End If
|
||||
' 'PDF
|
||||
' 'GeneraPDFFactura()
|
||||
' Dim ArchivoPDF = String.Format("{0}/PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio)
|
||||
' If File.Exists(ArchivoPDF) Then
|
||||
' MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul>", Encripta(String.Format("OP=DesPdfTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimientoTimbrado, "PDF", ObjFactura.SerieFolio, ObjFactura.TipoDocto)))
|
||||
' End If
|
||||
|
||||
' If UsuarioActual.Empresa.Funcionalidad(161) = "1" Then
|
||||
' MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar Carta Porte</a></li></ul>", Encripta(String.Format("OP=CARPOTIMBRE&CVEMOV={0}", CveMovimientoTimbrado)))
|
||||
' Else
|
||||
' MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar Carta Porte</a></li></ul>", Encripta(String.Format("OP=CARPO&CVEMOV={0}", CveMovimientoTimbrado)))
|
||||
' End If
|
||||
|
||||
' Else
|
||||
' MensajeAlert.AppendFormat("<ul><li>{0}</li></ul>", ObjTimbrado.MensajeErrorCFDI)
|
||||
' End If
|
||||
|
||||
'End Sub
|
||||
|
||||
Private Sub GeneraPDFFactura()
|
||||
Try
|
||||
PdfFactura(ObjFactura)
|
||||
@@ -3365,4 +3473,714 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub ChkEmitirTimbrado_CheckedChanged(sender As Object, e As EventArgs)
|
||||
|
||||
If ChkEmitirTimbrado.Checked Then
|
||||
ChkEmitirCartaPorte.Checked = False
|
||||
ChkEmitirCartaPorte.Visible = True
|
||||
Else
|
||||
ChkEmitirCartaPorte.Visible = False
|
||||
ChkEmitirCartaPorte.Checked = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
|
||||
Partial Class Timbres
|
||||
|
||||
|
||||
|
||||
Public Property TieneError As Boolean
|
||||
Public Property MsgError As StringBuilder
|
||||
Public Property MensajeAlert As StringBuilder
|
||||
|
||||
Private Property CvePaqueteriaGuia As Integer
|
||||
Private Property CveMovimiento As Integer
|
||||
Private Property UsuarioActual As Usuario
|
||||
Private Property AplicaCP As Boolean
|
||||
Private Property FechaEntrega As Date
|
||||
Private Property CveSubProyectoOrigen As Integer
|
||||
|
||||
Public Property SubProyectoMatriz As Modelos.SubProyectoModel
|
||||
Public Property SubProyecto As Modelos.SubProyectoModel
|
||||
|
||||
Private Property Serie As String
|
||||
Private Property Folio As Integer
|
||||
Private Property CveTimbre As Integer
|
||||
|
||||
Private Property GlobalDTMonedas As DataTable
|
||||
Private Property GlobalDTAlmacen As DataTable
|
||||
Private Property DTCamiones As DataTable
|
||||
'Private Property GlobalDTPS As DataTable
|
||||
Private Property DtMovimientos As DataTable
|
||||
'Private Property GlobalDTUnidadesMedida As DataTable
|
||||
Private Property GlobalDTSubProyectos As DataTable
|
||||
|
||||
Private Property CveAlmacenOrigen As Integer
|
||||
Private Property CveAlmacenDestico As Integer
|
||||
|
||||
|
||||
|
||||
|
||||
Private Property TipoPermisoSCT As String
|
||||
Private Property NumPermisoSCT As String
|
||||
Private Property NombreAseguradora As String
|
||||
Private Property NumPolizaSeguro As String
|
||||
Private Property ConfigCartaPorte As String
|
||||
Private Property Placa As String
|
||||
Private Property Anio As Integer
|
||||
|
||||
|
||||
Private Property CPCliente As Integer
|
||||
|
||||
Private Property DirOriCP As Integer
|
||||
Private Property DirOriCalle As String
|
||||
Private Property DirOriClaveSATPais As String
|
||||
Private Property DirOriClaveSATEstado As String
|
||||
Private Property DirOriClaveSATMunicipio As String
|
||||
Private Property DirOriClaveSATLocalidad As String
|
||||
Private Property DirOriClaveSATColonia As String
|
||||
|
||||
Private Property DirDesCP As Integer
|
||||
Private Property DirDesCalle As String
|
||||
Private Property DirDesClaveSATPais As String
|
||||
Private Property DirDesClaveSATEstado As String
|
||||
Private Property DirDesClaveSATMunicipio As String
|
||||
Private Property DirDesClaveSATLocalidad As String
|
||||
Private Property DirDesClaveSATColonia As String
|
||||
|
||||
|
||||
Private Property ChrDomicilio As String
|
||||
Private Property ChrCP As String
|
||||
Private Property ChrNumeroExterior As String
|
||||
Private Property ChrNumeroInterior As String
|
||||
Private Property ChrClaveSATColonia As String
|
||||
Private Property ChrClaveSATMunicipio As String
|
||||
Private Property ChrClaveSATEstado As String
|
||||
Private Property ChrChofer As String
|
||||
Private Property ChrLicencia As String
|
||||
Private Property ChrNumRegidTribOperador As String
|
||||
Private Property ChrResidenciaFiscalOperador As String
|
||||
Private Property ChrRFC As String
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Public Property ObjFactura As Modelos.Factura
|
||||
|
||||
|
||||
'Public Sub New(CveMovimiento As Integer, CvePaqueteriaGuia As Integer, CveTimbre As Integer, UsuarioActual As Usuario,
|
||||
' GlobalDTMonedas As DataTable, GlobalDTAlmacen As DataTable, GlobalDTPS As DataTable, GlobalDTUnidadesMedida As DataTable, GlobalDTSubProyectos As DataTable)
|
||||
Public Sub New()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub CreaObjetosVenta()
|
||||
ObjFactura = New Modelos.Factura
|
||||
ObjFactura.Version = "3.3"
|
||||
ObjFactura.CveUsuario = UsuarioActual.CveUsuario
|
||||
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
|
||||
'ObjFactura.TipoCambio = 1
|
||||
ObjFactura.ConvertirPesos = False
|
||||
ObjFactura.CveMoneda = 1
|
||||
ObjFactura.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {ObjFactura.CveMoneda} ")
|
||||
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", "CveMoneda = 1") '"XXX"
|
||||
ObjFactura.MonedaAbreviatura = GlobalDTMonedas.FiltroPrimeroValor("Abreviatura", $"CveMoneda = {ObjFactura.CveMoneda} ")
|
||||
ObjFactura.TipoDocto = "Tra"
|
||||
ObjFactura.RefDocto = ""
|
||||
|
||||
ObjFactura.Folio = Folio
|
||||
ObjFactura.Serie = Serie
|
||||
|
||||
ObjFactura.CveMesa = -1
|
||||
ObjFactura.Fecha = Now
|
||||
ObjFactura.CvePrePoliza = -1
|
||||
ObjFactura.FechaPago = Now
|
||||
ObjFactura.MotivoDescuento = ""
|
||||
ObjFactura.Observaciones = ""
|
||||
ObjFactura.FechaEjecucion = Now
|
||||
ObjFactura.UsuarioCreo = UsuarioActual.Usuario
|
||||
ObjFactura.CveCondicionEntrega = -1
|
||||
ObjFactura.CondicionEntrega = ""
|
||||
ObjFactura.NumeroCuenta = ""
|
||||
ObjFactura.CondicionesPago = 0
|
||||
ObjFactura.FormaPago = 0
|
||||
ObjFactura.PedidoContrato = ""
|
||||
ObjFactura.OrdenCompra = ""
|
||||
ObjFactura.NumeroContrato = ""
|
||||
ObjFactura.NumeroDescripcionContrato = ""
|
||||
ObjFactura.DescripcionContrato = ""
|
||||
ObjFactura.CveCorte = -1
|
||||
ObjFactura.TipoDocumento = "Traspaso"
|
||||
ObjFactura.Alfa1 = ""
|
||||
ObjFactura.Alfa2 = ""
|
||||
ObjFactura.Alfa3 = ""
|
||||
ObjFactura.Descuento = 0
|
||||
ObjFactura.Amortizacion = 0
|
||||
ObjFactura.CveContrato = 0
|
||||
ObjFactura.CveVendedor = 0
|
||||
ObjFactura.FechaVencimiento = Now
|
||||
ObjFactura.TipoEstatus = 0
|
||||
ObjFactura.Det_OrdenCompra = ""
|
||||
ObjFactura.Inv_CveEstatusEntrega = 0
|
||||
ObjFactura.FormaPago33 = ""
|
||||
ObjFactura.MetodoPago33 = ""
|
||||
ObjFactura.UsoCFDI = ""
|
||||
ObjFactura.CveClienteSucursal = 0
|
||||
|
||||
|
||||
|
||||
|
||||
ObjFactura.CveSubProyecto = CveSubProyectoOrigen
|
||||
ObjFactura.CveSubProyectoCobranza = CveSubProyectoOrigen
|
||||
ObjFactura.CveSubProyectoEjecucion = CveSubProyectoOrigen
|
||||
|
||||
ObjFactura.SubTotal = 0
|
||||
ObjFactura.Descuento = 0
|
||||
ObjFactura.Amortizacion = 0
|
||||
ObjFactura.IVA = 0
|
||||
ObjFactura.RetIVA = 0
|
||||
ObjFactura.RetISR = 0
|
||||
ObjFactura.IEPS = 0
|
||||
ObjFactura.Total = 0
|
||||
|
||||
ObjFactura.RFCReceptor = "XAXX010101000" ' RFC empresa traslado , si es entrega RFC Cliente
|
||||
|
||||
'DETALLES
|
||||
ObjFactura.DtDetalle = DtMovimientos
|
||||
|
||||
|
||||
ObjFactura.SubProyectoMatriz = SubProyectoMatriz
|
||||
ObjFactura.SubProyecto = SubProyecto
|
||||
|
||||
ObjFactura.Inv_CveMovimiento = CveMovimiento
|
||||
|
||||
If AplicaCP Then
|
||||
ObjFactura.Timbre = PreParaTimbreCartaPorte(ObjFactura)
|
||||
Else
|
||||
ObjFactura.Timbre = PreParaTimbre(ObjFactura)
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function PreParaTimbreCartaPorte(Obj As Modelos.Factura) As CFDITimbre
|
||||
Dim Timbre As New CFDITimbre
|
||||
Timbre.Comprobante.TipoComprobante = "T"
|
||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||
Timbre.Comprobante.Serie = Obj.Serie
|
||||
Timbre.Comprobante.Fecha = Obj.Fecha
|
||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
Timbre.Comprobante.CondicionesdePago = ""
|
||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
Timbre.Comprobante.Subtotal = Obj.SubTotal
|
||||
Timbre.Comprobante.Descuentos = Obj.Descuento
|
||||
Timbre.Comprobante.Moneda = "XXX"
|
||||
Timbre.Comprobante.TipoCambio = "" ' CONDICIÓN SI LA MONEDA ES 'XXX'
|
||||
|
||||
'Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP
|
||||
Timbre.Comprobante.Confirmacion = ""
|
||||
|
||||
Timbre.Receptor.RFC = UsuarioActual.Empresa.RFC
|
||||
Timbre.Receptor.Nombre = UsuarioActual.Empresa.Empresa
|
||||
Timbre.Receptor.UsoCFDI = "P01"
|
||||
|
||||
|
||||
Dim totSubTotal As Decimal = Obj.SubTotal
|
||||
Dim totIVA As Decimal = Obj.IVA
|
||||
Dim totRetIVA As Decimal = Obj.RetIVA
|
||||
Dim totRetISR As Decimal = Obj.RetISR
|
||||
Dim i As Integer = 1
|
||||
|
||||
|
||||
If CveMovimiento > 0 Then
|
||||
Timbre.Comprobante.LugarExpedicion = UsuarioActual.Empresa.CP.ToString
|
||||
Else
|
||||
Timbre.Comprobante.LugarExpedicion = CPCliente.ToString
|
||||
End If
|
||||
|
||||
|
||||
'DETALLES
|
||||
Dim tPS As String = ""
|
||||
|
||||
Dim CartaPorte As New CFDICartaPorte
|
||||
CartaPorte.TranspInternac = "No"
|
||||
CartaPorte.EntradaSalidaMercancia = ""
|
||||
CartaPorte.ViaEntradaSalida = ""
|
||||
|
||||
CartaPorte.Mercancias.PesoBrutoTotal = 0
|
||||
CartaPorte.Mercancias.UnidadPeso = ""
|
||||
CartaPorte.Mercancias.CargoporTasacion = 0
|
||||
|
||||
CartaPorte.FiguraTransporte.AutoTransporteFederal.PermSCT = TipoPermisoSCT '"TPAF01"
|
||||
CartaPorte.FiguraTransporte.AutoTransporteFederal.NumPermisoSCT = NumPermisoSCT
|
||||
CartaPorte.FiguraTransporte.AutoTransporteFederal.NombreAseg = NombreAseguradora
|
||||
CartaPorte.FiguraTransporte.AutoTransporteFederal.NumPolizaSeguro = NumPolizaSeguro
|
||||
CartaPorte.FiguraTransporte.AutoTransporteFederal.Vehiculo.ConfigVehicular = ConfigCartaPorte '"C2"
|
||||
CartaPorte.FiguraTransporte.AutoTransporteFederal.Vehiculo.PlacaVM = Placa
|
||||
CartaPorte.FiguraTransporte.AutoTransporteFederal.Vehiculo.AnioModeloVM = Anio
|
||||
|
||||
Dim DomOrigen As CFDICartaPorteDomicilio = Nothing
|
||||
DomOrigen = New CFDICartaPorteDomicilio With {.Calle = DirOriCalle,
|
||||
.Colonia = DirOriClaveSATColonia,
|
||||
.CP = DirOriCP.ToString,
|
||||
.Estado = DirOriClaveSATEstado,
|
||||
.Pais = DirOriClaveSATPais,
|
||||
.Municipio = DirOriClaveSATMunicipio,
|
||||
.Localidad = DirOriClaveSATLocalidad}
|
||||
|
||||
Dim DomDestino As CFDICartaPorteDomicilio = Nothing
|
||||
|
||||
|
||||
DomDestino = New CFDICartaPorteDomicilio With {.Calle = DirDesCalle,
|
||||
.Colonia = DirDesClaveSATColonia,
|
||||
.CP = DirDesCP.ToString,
|
||||
.Estado = DirDesClaveSATEstado,
|
||||
.Pais = DirDesClaveSATPais,
|
||||
.Municipio = DirDesClaveSATMunicipio,
|
||||
.Localidad = DirDesClaveSATLocalidad}
|
||||
|
||||
|
||||
Dim Ubica As New CFDICartaPorteUbicaciones
|
||||
Ubica.TipoEstacion = ""
|
||||
Ubica.DistanciaRecorridaDestino = 1
|
||||
Ubica.Origen = New CFDICartaPorteUbicacionOrigen With {.RFCRemitente = "",'UsuarioActual.Empresa.RFC,
|
||||
.FechaHoraSalida = Now.ToString("yyyy-MM-ddTHH:mm:ss"),' "2021-08-23T11:13:01",
|
||||
.NombreRemitente = UsuarioActual.Empresa.Empresa,
|
||||
.Domicilio = DomOrigen}
|
||||
Ubica.Destino = New CFDICartaPorteUbicacionDestino With {.RFCDestinatario = "",'UsuarioActual.Empresa.RFC,'"CAMJ841219I33",
|
||||
.FechaHoraProgLlegada = FechaEntrega.ToString("yyyy-MM-ddT23:59:59"),
|
||||
.NombreDestinatario = UsuarioActual.Empresa.Empresa,
|
||||
.Domicilio = DomDestino}
|
||||
|
||||
CartaPorte.Ubicaciones.Add(Ubica)
|
||||
|
||||
CartaPorte.FiguraTransporte.ClaveTransporte = "01"
|
||||
|
||||
Dim ObjAcar As New ClsAcarreos()
|
||||
|
||||
' If ObjAcar.GetChofer(DdlChofer.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 1, -1) Then
|
||||
'Dim dro As DataRow = ObjAcar.DtResultados.Rows(0)
|
||||
'If dro IsNot Nothing Then
|
||||
Dim DomicilioOperador As New CFDICartaPorteDomicilio With {.Calle = ChrDomicilio,
|
||||
.NumeroExterior = ChrNumeroExterior,
|
||||
.NumeroInterior = ChrNumeroInterior,
|
||||
.Colonia = ChrClaveSATColonia,
|
||||
.Municipio = ChrClaveSATMunicipio,
|
||||
.Estado = ChrClaveSATEstado,
|
||||
.CP = ChrCP}
|
||||
|
||||
CartaPorte.FiguraTransporte.Operadores.Add(New CFDICartaPorteOperador With {
|
||||
.RFCOperador = ChrRFC,
|
||||
.NombreOperador = ChrChofer,
|
||||
.NumLicencia = ChrLicencia,
|
||||
.NumRegidTribOperador = ChrNumRegidTribOperador,
|
||||
.ResidenciaFiscalOperador = ChrResidenciaFiscalOperador,
|
||||
.Domicilio = DomicilioOperador})
|
||||
|
||||
'End If
|
||||
' End If
|
||||
ObjAcar.Dispose()
|
||||
|
||||
|
||||
'concepto único
|
||||
|
||||
Dim concepto As New CFDIConceptos With {.Cantidad = 1,
|
||||
.Descripcion = "Flete",
|
||||
.ValorUnitario = 0,
|
||||
.Importe = 0,
|
||||
.Descuento = 0,
|
||||
.Unidad = "Servicio",
|
||||
.ClaveUnidad = "E48",
|
||||
.ClaveProdServ = "78101802",
|
||||
.Noidentificacion = "",
|
||||
.CuentaPredial = ""}
|
||||
|
||||
Timbre.Conceptos.Add(concepto)
|
||||
|
||||
For Each drr As DataRow In Obj.DtDetalle.Rows
|
||||
|
||||
If drr("PS").ToString.Length = 1 Then
|
||||
tPS = drr("Obs").ToString
|
||||
Else
|
||||
If drr("PS").ToString.Length = 0 Then
|
||||
tPS = ""
|
||||
Else
|
||||
tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
|
||||
End If
|
||||
End If
|
||||
Dim conceptoCarta As New CFDICartaPorteMercancia With {
|
||||
.BienesTransp = drr("SATClaveProdServ").ToString,
|
||||
.ClaveSTCC = "", 'para metodo ferroviario
|
||||
.Cantidad = drr("Cantidad").ToString.ToDecimal,
|
||||
.Descripción = tPS,
|
||||
.ClaveUnidad = drr("SATClaveUM").ToString,
|
||||
.Unidad = drr("UM").ToString,
|
||||
.Dimensiones = "",
|
||||
.MaterialPeligroso = If(drr("ClaveMaterialPeligroso").ToString <> "", "Sí", "No"),
|
||||
.ClaveMaterialPeligroso = drr("ClaveMaterialPeligroso").ToString,
|
||||
.Embalaje = drr("ClaveEmbalaje").ToString,
|
||||
.DescripEmbalaje = drr("Embalaje").ToString,
|
||||
.PesoenKg = drr("PesoKg").ToString.ToDecimal,
|
||||
.ValorMercancia = drr("PU").ToString.ToDecimal,
|
||||
.Moneda = "MXN", 'temporal
|
||||
.FraccionArrancelaria = "",
|
||||
.UUIDComercioExt = ""
|
||||
}
|
||||
|
||||
|
||||
totSubTotal = totSubTotal - concepto.Importe
|
||||
CartaPorte.Mercancias.Mercancias.Add(conceptoCarta)
|
||||
|
||||
i += 1
|
||||
Next
|
||||
Timbre.Complementos.CartaPorte = CartaPorte
|
||||
|
||||
Return Timbre
|
||||
End Function
|
||||
|
||||
Private Function PreParaTimbre(Obj As Modelos.Factura) As CFDITimbre
|
||||
Dim Timbre As New CFDITimbre
|
||||
Timbre.Comprobante.TipoComprobante = "T"
|
||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||
Timbre.Comprobante.Serie = Obj.Serie
|
||||
Timbre.Comprobante.Fecha = Obj.Fecha
|
||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
Timbre.Comprobante.CondicionesdePago = ""
|
||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
Timbre.Comprobante.Subtotal = Obj.SubTotal
|
||||
Timbre.Comprobante.Descuentos = Obj.Descuento
|
||||
Timbre.Comprobante.Moneda = Obj.MonedaSAT
|
||||
Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString)
|
||||
Timbre.Comprobante.Total = Obj.Total
|
||||
|
||||
If CveMovimiento > 0 Then
|
||||
Timbre.Comprobante.LugarExpedicion = UsuarioActual.Empresa.CP.ToString
|
||||
Else
|
||||
Timbre.Comprobante.LugarExpedicion = CPCliente.ToString
|
||||
End If
|
||||
|
||||
Timbre.Comprobante.Confirmacion = ""
|
||||
|
||||
Timbre.Receptor.RFC = "XAXX010101000"
|
||||
Timbre.Receptor.Nombre = UsuarioActual.Empresa.Empresa
|
||||
Timbre.Receptor.UsoCFDI = "P01"
|
||||
|
||||
Dim totSubTotal As Decimal = Obj.SubTotal
|
||||
Dim totIVA As Decimal = Obj.IVA
|
||||
Dim totRetIVA As Decimal = Obj.RetIVA
|
||||
Dim totRetISR As Decimal = Obj.RetISR
|
||||
Dim i As Integer = 1
|
||||
|
||||
'DETALLES
|
||||
Dim tPS As String = ""
|
||||
|
||||
For Each drr As DataRow In Obj.DtDetalle.Rows
|
||||
'If drr("PS").ToString.Length = 1 Then
|
||||
' tPS = drr("Obs").ToString
|
||||
'Else
|
||||
' If drr("PS").ToString.Length = 0 Then
|
||||
' tPS = ""
|
||||
' Else
|
||||
' tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
|
||||
' End If
|
||||
'End If
|
||||
|
||||
If drr("PS").ToString.Length = 1 Then
|
||||
tPS = drr("Obs").ToString
|
||||
Else
|
||||
If drr("PS").ToString.Length = 0 Then
|
||||
tPS = ""
|
||||
Else
|
||||
tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'Observaciones
|
||||
|
||||
'CONDICIONANTE, ESPECIAL
|
||||
If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" 'LES COMENTAN QUE NO DEBE IR LA ETIQUETA DE LA UNIDAD EN EL PRODUCTO
|
||||
|
||||
Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal,
|
||||
.Descripcion = tPS,
|
||||
.ValorUnitario = drr("PU").ToString.ToDecimal,
|
||||
.Importe = drr("TotalImporte").ToString.ToDecimal,
|
||||
.Descuento = drr("Descuento").ToString.ToDecimal,
|
||||
.Unidad = drr("UM").ToString,
|
||||
.ClaveUnidad = drr("SATClaveUM").ToString,
|
||||
.ClaveProdServ = drr("SATClaveProdServ").ToString,
|
||||
.Noidentificacion = drr("Noidentificacion").ToString,
|
||||
.CuentaPredial = drr("CuentaPredial").ToString}
|
||||
'VERIFICA SUMA SUBTOTALES
|
||||
If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'PROCESO DE AJUSTA DE DECIMALES
|
||||
concepto.Importe = totSubTotal
|
||||
End If
|
||||
totSubTotal = totSubTotal - concepto.Importe
|
||||
|
||||
'SIEMPRE ESTAMOS AGREGANDO EL IVA
|
||||
'concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal})
|
||||
|
||||
Timbre.Conceptos.Add(concepto)
|
||||
i += 1
|
||||
Next
|
||||
Return Timbre
|
||||
End Function
|
||||
Private Sub PrepararTimbrado(ByRef FM As Modelos.FemsaFactura, ByRef TmpDT7Eleven As DataTable, ByRef TmpDTComplementosTimbrado As DataTable)
|
||||
FM.AplicaFEMSA = False
|
||||
FM.FEMSA_NumSociedad = ""
|
||||
FM.FEMSA_NumProveedor = ""
|
||||
FM.FEMSA_Mail = ""
|
||||
FM.FEMSA_Version = 0
|
||||
FM.FEMSA_NumPedido = 0
|
||||
FM.FEMSA_NumEntrada = ""
|
||||
FM.FEMSA_NumRemision = ""
|
||||
FM.FEMSA_NumSocio = ""
|
||||
FM.FEMSA_CentroCosto = ""
|
||||
FM.FEMSA_IPeriodoLiquidacion = ""
|
||||
FM.FEMSA_FPeriodoLiquidacion = ""
|
||||
FM.FEMSA_CodRetencion1 = ""
|
||||
FM.FEMSA_CodRetencion2 = ""
|
||||
|
||||
TmpDT7Eleven.Columns.Add("sevenElevenNumProveedor")
|
||||
TmpDT7Eleven.Columns.Add("sevenElevenFolio")
|
||||
TmpDT7Eleven.Columns.Add("sevenElevenTienda")
|
||||
TmpDT7Eleven.Columns.Add("sevenElevenFecha")
|
||||
|
||||
Dim Row As DataRow = TmpDT7Eleven.NewRow
|
||||
Row("sevenElevenNumProveedor") = ""
|
||||
Row("sevenElevenFolio") = ""
|
||||
Row("sevenElevenTienda") = ""
|
||||
Row("sevenElevenFecha") = ""
|
||||
|
||||
TmpDT7Eleven.Rows.Add(Row)
|
||||
|
||||
TmpDTComplementosTimbrado.Columns.Add("CveComplemento")
|
||||
TmpDTComplementosTimbrado.Columns.Add("IdContabilidad")
|
||||
TmpDTComplementosTimbrado.Columns.Add("TipoProceso")
|
||||
TmpDTComplementosTimbrado.Columns.Add("TipoAmbito")
|
||||
TmpDTComplementosTimbrado.Columns.Add("Entidad")
|
||||
|
||||
Dim Row2 As DataRow = TmpDTComplementosTimbrado.NewRow
|
||||
|
||||
Row2("CveComplemento") = ""
|
||||
Row2("IdContabilidad") = ""
|
||||
Row2("TipoProceso") = ""
|
||||
Row2("TipoAmbito") = ""
|
||||
Row2("Entidad") = ""
|
||||
|
||||
TmpDTComplementosTimbrado.Rows.Add(Row2)
|
||||
End Sub
|
||||
|
||||
Public Function Timbrar() As Boolean
|
||||
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
CreaObjetosVenta()
|
||||
Dim ObjTimbrado As New Timbrado
|
||||
Dim FM As New Modelos.FemsaFactura
|
||||
Dim TmpDT7Eleven As New DataTable
|
||||
Dim TmpDTComplementosTimbrado As New DataTable
|
||||
PrepararTimbrado(FM, TmpDT7Eleven, TmpDTComplementosTimbrado)
|
||||
'MensajeAlert.Append("<br/><br/>")
|
||||
|
||||
|
||||
If ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura) Then
|
||||
Respuesta = True
|
||||
|
||||
Dim objGrales As New ClsGenerales
|
||||
If Not objGrales.UpdateGralTimbre(CveTimbre, "-1", "-1", -1, ObjTimbrado.UUID, Now, CvePaqueteriaGuia, CveMovimiento, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, UsuarioActual.Empresa.CvePAC, -1, New Date(1900, 1, 1), AplicaCP, -1, -1, -1, -1, -1) Then
|
||||
GuardaLogAD($"Error no se actualizo registro de timbre {CveTimbre} ")
|
||||
End If
|
||||
objGrales.Dispose()
|
||||
|
||||
Else
|
||||
Respuesta = False
|
||||
' MensajeAlert.AppendFormat("<ul><li>{0}</li></ul>", ObjTimbrado.MensajeErrorCFDI)
|
||||
MsgError.AppendLine(ObjTimbrado.MensajeErrorCFDI)
|
||||
End If
|
||||
|
||||
Return Respuesta
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Public Function CargarDatosRequeridos(CveTimbre As Integer, UsuarioActual As Usuario) As Boolean
|
||||
|
||||
|
||||
|
||||
Me.CveTimbre = CveTimbre
|
||||
Me.UsuarioActual = UsuarioActual
|
||||
|
||||
|
||||
TieneError = False
|
||||
MsgError = New StringBuilder
|
||||
MensajeAlert = New StringBuilder
|
||||
|
||||
|
||||
Using ObjMonedas As New ClsMonedas()
|
||||
If ObjMonedas.GetMonedas() Then
|
||||
Me.GlobalDTMonedas = ObjMonedas.DtResultados
|
||||
Else
|
||||
Me.GlobalDTMonedas = Nothing
|
||||
TieneError = True
|
||||
MsgError.AppendLine("Se presento error al cargar las monedas")
|
||||
End If
|
||||
End Using
|
||||
|
||||
Using ObjAlmacenes As New ClsInventarios()
|
||||
If ObjAlmacenes.GetAlmacenes(-1, -1, UsuarioActual.CveEmpresa, -1) Then
|
||||
Me.GlobalDTAlmacen = ObjAlmacenes.DtResultados
|
||||
Else
|
||||
Me.GlobalDTAlmacen = Nothing
|
||||
TieneError = True
|
||||
MsgError.AppendLine("Se presento error al cargar los almacenes")
|
||||
End If
|
||||
End Using
|
||||
|
||||
|
||||
Using ObjSubPro As New ClsSubProyectos()
|
||||
If ObjSubPro.GetSubProyectos(CveEmpresa:=UsuarioActual.CveEmpresa) Then
|
||||
GlobalDTSubProyectos = ObjSubPro.DtResultados
|
||||
Else
|
||||
GlobalDTSubProyectos = Nothing
|
||||
TieneError = True
|
||||
MsgError.AppendLine("Se presento error al cargar los subproyectos")
|
||||
End If
|
||||
End Using
|
||||
|
||||
|
||||
|
||||
Dim FI As Date = New Date(1900, 1, 1)
|
||||
Dim FF As Date = New Date(9999, 1, 1)
|
||||
|
||||
Dim ObjGrales As New ClsGenerales
|
||||
|
||||
If CveTimbre > 0 Then
|
||||
|
||||
If ObjGrales.GetGralTimbre(CveTimbre, "-1", "-1", -1, FI, FF, 0, UsuarioActual.CveEmpresa, -1, -1) Then
|
||||
|
||||
|
||||
If ObjGrales.DtResultados.Rows.Count = 1 Then
|
||||
|
||||
|
||||
CveMovimiento = ObjGrales.DtResultados.Rows(0)("CveMovimientoAlmacen").ToString.ToEntero
|
||||
CvePaqueteriaGuia = ObjGrales.DtResultados.Rows(0)("Folio").ToString.ToEntero
|
||||
|
||||
FechaEntrega = ObjGrales.DtResultados.Rows(0)("FechaEntrega").ToString.ToDate
|
||||
|
||||
Serie = ObjGrales.DtResultados.Rows(0)("Serie").ToString
|
||||
Folio = ObjGrales.DtResultados.Rows(0)("Folio").ToString.ToEntero
|
||||
|
||||
AplicaCP = Boolean.Parse(ObjGrales.DtResultados.Rows(0)("AplicaCP").ToString)
|
||||
CveSubProyectoOrigen = ObjGrales.DtResultados.Rows(0)("CveSubProyectoOrigen").ToString.ToEntero
|
||||
|
||||
TipoPermisoSCT = ObjGrales.DtResultados.Rows(0)("TipoPermisoSCT").ToString
|
||||
NumPermisoSCT = ObjGrales.DtResultados.Rows(0)("NumPermisoSCT").ToString
|
||||
NombreAseguradora = ObjGrales.DtResultados.Rows(0)("NombreAseguradora").ToString
|
||||
NumPolizaSeguro = ObjGrales.DtResultados.Rows(0)("NumPolizaSeguro").ToString
|
||||
ConfigCartaPorte = ObjGrales.DtResultados.Rows(0)("ConfigCartaPorte").ToString
|
||||
Placa = ObjGrales.DtResultados.Rows(0)("Placa").ToString
|
||||
Anio = ObjGrales.DtResultados.Rows(0)("Anio").ToString.ToEntero
|
||||
|
||||
CPCliente = ObjGrales.DtResultados.Rows(0)("CPCliente").ToString.ToEntero
|
||||
|
||||
DirOriCP = ObjGrales.DtResultados.Rows(0)("DirOriCP").ToString.ToEntero
|
||||
DirOriCalle = ObjGrales.DtResultados.Rows(0)("DirOriCalle").ToString
|
||||
DirOriClaveSATPais = ObjGrales.DtResultados.Rows(0)("DirOriClaveSATPais").ToString
|
||||
DirOriClaveSATEstado = ObjGrales.DtResultados.Rows(0)("DirOriClaveSATEstado").ToString
|
||||
DirOriClaveSATMunicipio = ObjGrales.DtResultados.Rows(0)("DIrOriClaveSATMunicipio").ToString
|
||||
DirOriClaveSATLocalidad = ObjGrales.DtResultados.Rows(0)("DirOriClaveSATLocalidad").ToString
|
||||
DirOriClaveSATColonia = ObjGrales.DtResultados.Rows(0)("DirOriClaveSATColonia").ToString
|
||||
|
||||
DirDesCP = ObjGrales.DtResultados.Rows(0)("DirDesCP").ToString.ToEntero
|
||||
DirDesCalle = ObjGrales.DtResultados.Rows(0)("DirDesCalle").ToString
|
||||
DirDesClaveSATPais = ObjGrales.DtResultados.Rows(0)("DirDesClaveSATPais").ToString
|
||||
DirDesClaveSATEstado = ObjGrales.DtResultados.Rows(0)("DirDesClaveSATEstado").ToString
|
||||
DirDesClaveSATMunicipio = ObjGrales.DtResultados.Rows(0)("DirDesClaveSATMunicipio").ToString
|
||||
DirDesClaveSATLocalidad = ObjGrales.DtResultados.Rows(0)("DirDesClaveSATLocalidad").ToString
|
||||
DirDesClaveSATColonia = ObjGrales.DtResultados.Rows(0)("DirDesClaveSATColonia").ToString
|
||||
|
||||
|
||||
|
||||
ChrDomicilio = ObjGrales.DtResultados.Rows(0)("ChrDomicilio").ToString
|
||||
ChrCP = ObjGrales.DtResultados.Rows(0)("ChrCP").ToString
|
||||
ChrNumeroExterior = ObjGrales.DtResultados.Rows(0)("ChrNumeroExterior").ToString
|
||||
ChrNumeroInterior = ObjGrales.DtResultados.Rows(0)("ChrNumeroInterior").ToString
|
||||
ChrClaveSATColonia = ObjGrales.DtResultados.Rows(0)("ChrClaveSATColonia").ToString
|
||||
ChrClaveSATMunicipio = ObjGrales.DtResultados.Rows(0)("ChrClaveSATMunicipio").ToString
|
||||
ChrClaveSATEstado = ObjGrales.DtResultados.Rows(0)("ChrClaveSATEstado").ToString
|
||||
|
||||
ChrChofer = ObjGrales.DtResultados.Rows(0)("ChrChofer").ToString
|
||||
ChrLicencia = ObjGrales.DtResultados.Rows(0)("ChrLicencia").ToString
|
||||
ChrNumRegidTribOperador = ObjGrales.DtResultados.Rows(0)("ChrNumRegidTribOperador").ToString
|
||||
ChrResidenciaFiscalOperador = ObjGrales.DtResultados.Rows(0)("ChrResidenciaFiscalOperador").ToString
|
||||
ChrRFC = ObjGrales.DtResultados.Rows(0)("ChrRFC").ToString
|
||||
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
MsgError.AppendLine("Consultar datos de timbrado")
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
MsgError.AppendLine("CveTimbre no valida")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If ObjGrales.GetGralMovimientosDetalleTimbre(CveTimbre, UsuarioActual.CveEmpresa) Then
|
||||
DtMovimientos = ObjGrales.DtResultados
|
||||
Else
|
||||
DtMovimientos = Nothing
|
||||
TieneError = True
|
||||
MsgError.AppendLine("Error al obtener Movimientos")
|
||||
End If
|
||||
ObjGrales.Dispose()
|
||||
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
DTCamiones = ObjInventarios.DtResultados
|
||||
End If
|
||||
|
||||
If ObjInventarios.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
CveAlmacenOrigen = ObjInventarios.CveAlmacen
|
||||
CveAlmacenDestico = ObjInventarios.CveAlmacenDestino
|
||||
'CveSubProyecto = ObjInventarios.CveSubProyecto
|
||||
End If
|
||||
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
|
||||
Dim Row As Data.DataRow = Extensiones.FiltroPrimero(GlobalDTSubProyectos, "TipoSucursal=1")
|
||||
SubProyectoMatriz = New Modelos.SubProyectoModel(Row)
|
||||
SubProyecto = New Modelos.SubProyectoModel(Extensiones.FiltroPrimero(GlobalDTSubProyectos, $"CveSubProyecto = {CveSubProyectoOrigen}"))
|
||||
|
||||
If TieneError Then
|
||||
Return False
|
||||
Else
|
||||
Return True
|
||||
End If
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -344,6 +344,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user