CartaPorteTimbrada Ajustes v 3.0

This commit is contained in:
rakcsle
2023-12-27 20:09:57 -07:00
parent 17eed88c31
commit 0e89a5cab6
9 changed files with 9144 additions and 8441 deletions

View File

@@ -2797,10 +2797,50 @@ Public Class ClsGenerales
End Try
Return Retorno
End Function
End Function
Public Function GetSATSectorCOFEPRIS() As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_SAT_SectorCOFEPRISGet")
With SqlAdapter.SelectCommand.Parameters
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los sectores COFEPRIS", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function GetSATFormaFarmaceutica() As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_SAT_FormaFarmaceuticaGet")
With SqlAdapter.SelectCommand.Parameters
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener las Formas Farmaceuticas", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
#End Region
#Region "SAT CFDI COMERCIO EXTERIOR"
Public Function GetSATClavePedimento() As Boolean
Dim Retorno As Boolean = False

View File

@@ -1292,6 +1292,43 @@ Public Class ClsPaginas
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Public Shared Property GlobalDTSATSectorCOFEPRIS() As DataTable
Get
Dim AppNombre As String = "GlobalDTSATSectorCOFEPRIS"
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjGral As New ClsGenerales()
If ObjGral.GetSATSectorCOFEPRIS() Then
HttpContext.Current.Application(AppNombre) = ObjGral.DtResultados
End If
ObjGral.Dispose()
End If
Return CType(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Dim AppNombre As String = "GlobalDTSATSectorCOFEPRIS"
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Public Shared Property GlobalDTSATFormaFarmaceutica() As DataTable
Get
Dim AppNombre As String = "GlobalDTSATFormaFarmaceutica"
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjGral As New ClsGenerales()
If ObjGral.GetSATFormaFarmaceutica() Then
HttpContext.Current.Application(AppNombre) = ObjGral.DtResultados
End If
ObjGral.Dispose()
End If
Return CType(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Dim AppNombre As String = "GlobalDTSATFormaFarmaceutica"
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Public Shared Property GlobalDTMotivosCancelacionEmpresa(CveEmpresa As Integer, Optional CveMotivoCancelacion As Integer = -1, Optional CveSATMotivoCancelacion As Integer = -1) As DataTable
Get
Dim AppNombre As String = $"GlobalDTMotivosCancelacionEmpresa-{CveEmpresa}"

View File

@@ -2331,4 +2331,67 @@ Public Class ClsProductosServicios
Return Retorno
End Function
#Region " P S C O M P L E M E N T O S"
Public Function GetProductosServiciosComplementos(CvePS As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_ProductosServiciosComplementosGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePS", SqlDbType.Int).Value = CvePS
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los complementos del producto CCP.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function AddUpdateProductosServiciosComplementos(CvePS As Integer, PesoKg As Decimal, CveMaterialPeligroso As Integer, CveEmbalaje As Integer, Dimensiones As String, CveSectorCOFEPRIS As Integer, NombreIngredienteActivo As String,
NomQuimico As String, DenominacionGenerica As String, DenominacionDistintiva As String, Fabricante As String, CveFormaFarmaceutica As Integer, CondicionesTransporte As String,
RegistroSanitarioAutorizacion As String, PermisoImportacion As String, FolioImportacionVUCEM As String, NumCAS As String, RazonSocialEmpImportacion As String, NumRegistroPlagCOFEPRIS As String,
DatosFabricante As String, DatosFormulador As String, DatosMaquilador As String, UsoAutorizado As String) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_ProductosServiciosComplementosAddUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@PesoKg", SqlDbType.SmallMoney).Value = PesoKg
.Add("@CveMaterialPeligroso", SqlDbType.Int).Value = CveMaterialPeligroso
.Add("@CveEmbalaje", SqlDbType.Int).Value = CveEmbalaje
.Add("@Dimensiones", SqlDbType.VarChar).Value = Dimensiones
.Add("@CveSectorCOFEPRIS", SqlDbType.Int).Value = CveSectorCOFEPRIS
.Add("@NombreIngredienteActivo", SqlDbType.VarChar).Value = NombreIngredienteActivo
.Add("@NomQuimico", SqlDbType.VarChar).Value = NomQuimico
.Add("@DenominacionGenerica", SqlDbType.VarChar).Value = DenominacionGenerica
.Add("@DenominacionDistintiva", SqlDbType.VarChar).Value = DenominacionDistintiva
.Add("@Fabricante", SqlDbType.VarChar).Value = Fabricante
.Add("@CveFormaFarmaceutica", SqlDbType.Int).Value = CveFormaFarmaceutica
.Add("@CondicionesTransporte", SqlDbType.VarChar).Value = CondicionesTransporte
.Add("@RegistroSanitarioAutorizacion", SqlDbType.VarChar).Value = RegistroSanitarioAutorizacion
.Add("@PermisoImportacion", SqlDbType.VarChar).Value = PermisoImportacion
.Add("@FolioImportacionVUCEM", SqlDbType.VarChar).Value = FolioImportacionVUCEM
.Add("@NumCAS", SqlDbType.VarChar).Value = NumCAS
.Add("@RazonSocialEmpImportacion", SqlDbType.VarChar).Value = RazonSocialEmpImportacion
.Add("@NumRegistroPlagCOFEPRIS", SqlDbType.VarChar).Value = NumRegistroPlagCOFEPRIS
.Add("@DatosFabricante", SqlDbType.VarChar).Value = DatosFabricante
.Add("@DatosFormulador", SqlDbType.VarChar).Value = DatosFormulador
.Add("@DatosMaquilador", SqlDbType.VarChar).Value = DatosMaquilador
.Add("@UsoAutorizado", SqlDbType.VarChar).Value = UsoAutorizado
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al guardar los complementos del producto CCP.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
#End Region
End Class

View File

@@ -2145,6 +2145,7 @@ Partial Class PopUpVerFactura
'EMISOR
Dim LugarExpedicion As String = ""
Dim ImgCBB As String = ""
Dim ImgCCP As String = ""
'COMPROBANTE
Dim SerieFolio As String = ""
Dim Telefono As String = ""
@@ -2175,6 +2176,7 @@ Partial Class PopUpVerFactura
Dim PlacaVM As String = ""
Dim AnioModeloVM As String = ""
Dim PesoBrutoVehicular As String = ""
'TIMBRADO
Dim FolioFiscal As String = ""
Dim NoCertificadoSAT As String = ""
@@ -2270,23 +2272,62 @@ Partial Class PopUpVerFactura
Dim RutaCBB As String = String.Format("{0}\CBB\{1}.jpg", UsuarioActual.Empresa.Ruta, SerieFolio)
Dim ImagenCBB As New System.IO.FileInfo(RutaCBB)
Dim RutaCCP As String = String.Format("{0}\CBB\{1}_CCP.jpg", UsuarioActual.Empresa.Ruta, SerieFolio)
Dim ImagenCCP As New System.IO.FileInfo(RutaCCP)
Dim Prefijo As String = If(XMLDoc.DocumentElement.Prefix = "", "cfd", XMLDoc.DocumentElement.Prefix)
Dim cfdVer As String = "http://www.sat.gob.mx/cfd/3"
Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable)
Dim Version As String = ValorXML(XMLDoc.DocumentElement, "version")
Dim VersionCCP As String = ""
Dim PrefijoCCP As String = ""
'Try
' 'XDocument doc = XDocument.Parse(Xml);
' 'String Version = doc.Descendants("cartaporte30:CartaPorte").First().Attribute("version").Value;
' Dim NodoVersionCCP As XmlNode = XMLDoc.Descendants("cartaporte30:CartaPorte")
' If NodoVersionCCP IsNot Nothing Then
' VersionCCP = ValorXML(NodoVersionCCP, "version")
' Else
' VersionCCP = "2.0"
' End If
'Catch ex As Exception
'End Try
If Version = "3.3" Then
cfdVer = "http://www.sat.gob.mx/cfd/3"
Else ' se considera que es la version 4.0
cfdVer = "http://www.sat.gob.mx/cfd/4"
End If
params.Add(New ReportParameter("CFDIVersion", Version))
namespaces.AddNamespace(Prefijo, cfdVer)
namespaces.AddNamespace("tfd", "http://www.sat.gob.mx/TimbreFiscalDigital")
namespaces.AddNamespace("implocal", "http://www.sat.gob.mx/implocal")
namespaces.AddNamespace("registrofiscal", "http://www.sat.gob.mx/registrofiscal")
namespaces.AddNamespace("cartaporte", "http://www.sat.gob.mx/CartaPorte")
namespaces.AddNamespace("cartaporte20", "http://www.sat.gob.mx/CartaPorte20")
namespaces.AddNamespace("cartaporte30", "http://www.sat.gob.mx/CartaPorte30")
Dim Nodos30 = XMLDoc.SelectSingleNode("//cartaporte30:CartaPorte", namespaces)
Dim Nodos20 = XMLDoc.SelectSingleNode("//cartaporte20:CartaPorte", namespaces)
If Nodos30 IsNot Nothing Then
VersionCCP = "3.0"
PrefijoCCP = "cartaporte30"
End If
If Nodos20 IsNot Nothing Then
VersionCCP = "2.0"
PrefijoCCP = "cartaporte20"
End If
params.Add(New ReportParameter("CartaPorteVersion", VersionCCP))
Dim nodeComprobante As XmlNode = XMLDoc.SelectSingleNode(String.Format("//{0}:Comprobante", Prefijo), namespaces)
If nodeComprobante IsNot Nothing Then
@@ -2320,24 +2361,25 @@ Partial Class PopUpVerFactura
End If
Dim nodeComp As XmlNode = XMLDoc.SelectSingleNode(String.Format("//{0}:Comprobante/{0}:Complemento", Prefijo), namespaces)
Dim nodeCartaPorte As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:CartaPorte", "cartaporte20"), namespaces)
Dim nodeCartaPorte As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:CartaPorte", PrefijoCCP), namespaces)
If nodeCartaPorte IsNot Nothing Then
TransporteInternacional = ValorXML(nodeCartaPorte, "TranspInternac", "")
End If
Dim nodeAutotransporteFederal As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:Autotransporte", "cartaporte20"), namespaces)
Dim nodeAutotransporteFederal As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:Autotransporte", PrefijoCCP), namespaces)
If nodeAutotransporteFederal IsNot Nothing Then
PermisoSTCC = ValorXML(nodeAutotransporteFederal, "PermSCT", "")
NumPermiso = ValorXML(nodeAutotransporteFederal, "NumPermisoSCT", "")
End If
Dim nodeIdentificacionVehicular As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:IdentificacionVehicular", "cartaporte20"), namespaces)
Dim nodeIdentificacionVehicular As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:IdentificacionVehicular", PrefijoCCP), namespaces)
If nodeIdentificacionVehicular IsNot Nothing Then
PlacaVM = ValorXML(nodeIdentificacionVehicular, "PlacaVM", "")
AnioModeloVM = ValorXML(nodeIdentificacionVehicular, "AnioModeloVM", "")
PesoBrutoVehicular = ValorXML(nodeIdentificacionVehicular, "PesoBrutoVehicular", "")
End If
Dim nodeSeguros As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:Seguros", "cartaporte20"), namespaces)
Dim nodeSeguros As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:Seguros", PrefijoCCP), namespaces)
If nodeIdentificacionVehicular IsNot Nothing Then
AseguradoraRespCivil = ValorXML(nodeSeguros, "AseguraRespCivil", "")
NumPolizaSeguroRespCivil = ValorXML(nodeSeguros, "PolizaRespCivil", "")
@@ -2350,7 +2392,7 @@ Partial Class PopUpVerFactura
End If
Dim nodeRemolques As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:Remolques", "cartaporte20"), namespaces)
Dim nodeRemolques As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:Remolques", PrefijoCCP), namespaces)
If nodeRemolques IsNot Nothing Then
If nodeRemolques.ChildNodes.Count = 1 Then
@@ -2370,7 +2412,7 @@ Partial Class PopUpVerFactura
' MedioTransporte = String.Format("{0} - {1}", CveTransporte, HtTransporte(CveTransporte).ToString())
'End If
Dim nodeMercancias As XmlNodeList = nodeComp.SelectNodes(String.Format("//{0}:Mercancia", "cartaporte20"), namespaces)
Dim nodeMercancias As XmlNodeList = nodeComp.SelectNodes(String.Format("//{0}:Mercancia", PrefijoCCP), namespaces)
For Each node As XmlNode In nodeMercancias
Dim Row As DataRow = DtMercancias.NewRow
@@ -2385,7 +2427,7 @@ Partial Class PopUpVerFactura
DtMercancias.Rows.Add(Row)
Next
Dim nodeMercanciaPadre As XmlNodeList = nodeComp.SelectNodes(String.Format("//{0}:Mercancias", "cartaporte20"), namespaces)
Dim nodeMercanciaPadre As XmlNodeList = nodeComp.SelectNodes(String.Format("//{0}:Mercancias", PrefijoCCP), namespaces)
If UsuarioActual.CveEmpresa = 13 AndAlso nodeMercanciaPadre IsNot Nothing Then
Dim PesoNetoTotal As String = ValorXML(nodeMercanciaPadre(0), "PesoNetoTotal", "")
Dim UnidadPeso As String = ValorXML(nodeMercanciaPadre(0), "UnidadPeso", "")
@@ -2396,7 +2438,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("NumTotalMercancias", NumTotalMercancias))
End If
Dim nodeOperadores As XmlNodeList = nodeComp.SelectNodes(String.Format("//{0}:TiposFigura", "cartaporte20"), namespaces)
Dim nodeOperadores As XmlNodeList = nodeComp.SelectNodes(String.Format("//{0}:TiposFigura", PrefijoCCP), namespaces)
For Each node As XmlNode In nodeOperadores
Dim Row As DataRow = DtOperadores.NewRow
@@ -2408,7 +2450,7 @@ Partial Class PopUpVerFactura
Next
Dim DistanciaTotal As Decimal = 0
Dim nodeUbicaciones As XmlNodeList = nodeComp.SelectNodes(String.Format("//{0}:Ubicacion", "cartaporte20"), namespaces)
Dim nodeUbicaciones As XmlNodeList = nodeComp.SelectNodes(String.Format("//{0}:Ubicacion", PrefijoCCP), namespaces)
For Each node As XmlNode In nodeUbicaciones
Dim Row As DataRow = DtUbicaciones.NewRow
@@ -2419,7 +2461,7 @@ Partial Class PopUpVerFactura
Row("RFC") = ValorXML(node, "RFCRemitenteDestinatario", "")
Row("Nombre") = ValorXML(node, "NombreRemitenteDestinatario", "")
Dim nodeDomicilio As XmlNode = node.ChildNodes.Cast(Of XmlNode).FirstOrDefault(Function(x) x.Name = "cartaporte20:Domicilio") 'node.SelectSingleNode(String.Format("//{0}:Domicilio", "cartaporte"), namespaces)
Dim nodeDomicilio As XmlNode = node.ChildNodes.Cast(Of XmlNode).FirstOrDefault(Function(x) x.Name = $"{PrefijoCCP}:Domicilio") 'node.SelectSingleNode(String.Format("//{0}:Domicilio", "cartaporte"), namespaces)
If nodeDomicilio IsNot Nothing Then
Dim Estado As String = ""
@@ -2515,6 +2557,23 @@ Partial Class PopUpVerFactura
ImgCBB = ""
End If
'FIXME OICCHECAR DESPUES DE SINCRONIZAR TIMBRADO
'If Not ImagenCCP.Exists Then
' Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
' CBB.GenerarCBB(UsuarioActual.Empresa.RFC, ClienteRFC, Total, FolioFiscal, RutaCBB)
'End If
ImagenCCP = New System.IO.FileInfo(RutaCCP)
If ImagenCCP.Exists Then
ImgCCP = String.Format("file://{0}", ImagenCCP.FullName)
Else
ImgCCP = ""
End If
End If
If DtConceptos.Rows.Count > 0 Then
@@ -2550,9 +2609,12 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("PlacaVM", PlacaVM))
params.Add(New ReportParameter("AnioVM", AnioModeloVM))
params.Add(New ReportParameter("PesoBrutoVehicular", PesoBrutoVehicular))
'TIMBRADO
params.Add(New ReportParameter("FolioFiscal", FolioFiscal))
params.Add(New ReportParameter("QR", ImgCBB))
params.Add(New ReportParameter("QRCCP", ImgCCP))
params.Add(New ReportParameter("SelloCFDI", SelloCFDi))
params.Add(New ReportParameter("CertificadoContribuyente", NoCertificadoSAT))
params.Add(New ReportParameter("CadenaOriginal", CadenaOriginal))

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1661,8 +1661,19 @@ Partial Class General_SaldosIniciales
If Moneda.ToUpper.Contiene("PESOS", "PESO", "MXN") Then
CveMoneda = 1
TipoCambio = "1"
ElseIf Moneda.ToUpper.Contiene("DÓLARES", "DOLARES", "USD") Then
ElseIf Moneda.ToUpper.Contiene("DÓLAR", "DÓLARES", "DOLARES", "USD") Then
CveMoneda = 2
If TipoCambio.Trim.ToDecimal < 10 Then
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
TipoCambio = GlobalTipoCambio(Fecha.AddDays(-1)).ToString()
Else
TipoCambio = GlobalTipoCambio(Fecha).ToString()
End If
End If
End If
'Si no se especifica TC, se manda como pesos.

View File

@@ -1151,15 +1151,143 @@
<div class="row form-md-line-input">
<label class="col-md-4 truncate">Peso en Kg:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtPesoKg" runat="server" Width="60px" Class="form-control input-sm"></asp:TextBox>
<asp:TextBox ID="TxtPesoKg" runat="server" Width="200px" Class="form-control input-sm"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Dimensiones:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtDimensiones" runat="server" Width="120px" Class="form-control input-sm"></asp:TextBox>
<asp:TextBox ID="TxtDimensiones" runat="server" Width="200px" Class="form-control input-sm" ></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">ClaveSector COFEPRIS:</label>
<div class="col-md-8">
<asp:DropDownList ID="DdlClaveSectorCOFEPRIS" runat="server" CssStyle="width: 100%;" Width="200px" DataTextField="SectorCOFEPRISClave" DataValueField="CveSectorCOFEPRIS" CssClass="form-control input-sm select2me"></asp:DropDownList>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Clave Forma Farmaceutica:</label>
<div class="col-md-8">
<asp:DropDownList ID="DdlClaveFormaFarmaceutica" runat="server" CssStyle="width: 100%;" Width="200px" DataTextField="FormaFarmaceuticaClave" DataValueField="CveFormaFarmaceutica" CssClass="form-control input-sm select2me"></asp:DropDownList>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Nombre Ingrediente Activo:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtNombreIngredienteActivo" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Nom Quimico:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtNomQuimico" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Denominacion Generica:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtDenominacionGenerica" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Denominacion Distintiva:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtDenominacionDistintiva" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Fabricante:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtFabricante" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Condiciones Transporte:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtCondicionesTransporte" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Registro Sanitario Autorizacion:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtRegistroSanitarioAutorizacion" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Permiso Importacion:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtPermisoImportacion" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Folio Importacion VUCEM:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtFolioImportacionVUCEM" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Num CAS:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtNumCAS" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Razon Social Emp Importacion:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtRazonSocialEmpImportacion" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Num Registro Plag COFEPRIS:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtNumRegistroPlagCOFEPRIS" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Datos Fabricante:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtDatosFabricante" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Datos Formulador:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtDatosFormulador" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Datos Maquilador:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtDatosMaquilador" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Uso Autorizado:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtUsoAutorizado" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
</div>
</div>
</ContentTemplate>

View File

@@ -2,6 +2,7 @@
Option Strict On
Imports System.Data
Imports System.Data.SqlClient
Imports System.IO
Imports Extensiones
Imports ZXing
@@ -192,6 +193,7 @@ Partial Class ProductosyServicios
CargarAlias()
CargaExistencias()
End If
CargaDatosCartaPorte()
Else
'Configuración de Modalidad Insert
RegistraScript("$('#C_Tab_TabPaquetes_tab').css('display' , 'none')")
@@ -367,6 +369,7 @@ Partial Class ProductosyServicios
CargaUnidadesMedida()
CargarMetodosInv()
CargarMarcas()
CargaCombosPSComplementos()
'CargaPSAdicional(DdlPSAdicional)
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
@@ -452,6 +455,18 @@ Partial Class ProductosyServicios
End Sub
Private Sub CargaCombosPSComplementos()
DdlClaveSectorCOFEPRIS.DataSource = GlobalDTSATSectorCOFEPRIS
DdlClaveSectorCOFEPRIS.DataBind()
DdlClaveSectorCOFEPRIS.Items.Insert(0, New ListItem("-", "-1"))
DdlClaveFormaFarmaceutica.DataSource = GlobalDTSATFormaFarmaceutica
DdlClaveFormaFarmaceutica.DataBind()
DdlClaveFormaFarmaceutica.Items.Insert(0, New ListItem("-", "-1"))
End Sub
Private Sub CargaPanelLlantas()
Dim ObjGral As New ClsGenerales()
@@ -1648,6 +1663,10 @@ Partial Class ProductosyServicios
OnError("Ocurrió un error al guardar al guardar el producto/servicio.", ex)
End Try
If Not TieneError Then
GuardaDatosCartPorte()
End If
If Not TieneError Then
ObjProductosServicios.Commit()
Alert("El Producto/Servicio se guardo correctamente." + If(GeneraServicioAF = 1, " Recargue la pagina de ventas para poder utilizar el servicio", ""), TipoMensaje.MsgInformacion, AccionJS)
@@ -3293,8 +3312,6 @@ Partial Class ProductosyServicios
End If
End If
ObjGrales.Dispose()
If ValidaMaterialPeligrosoMensaje Then
@@ -3321,11 +3338,29 @@ Partial Class ProductosyServicios
DdlMaterialPeligroso.txtText.Value = ""
DdlMaterialPeligroso.txtValue.Value = ""
DdlEmbalaje.txtText.Value = ""
DdlEmbalaje.txtValue.Value = ""
DdlClaveSectorCOFEPRIS.SelectedValueExist(-1)
DdlClaveFormaFarmaceutica.SelectedValueExist(-1)
TxtNombreIngredienteActivo.Text = ""
TxtNomQuimico.Text = ""
TxtDenominacionGenerica.Text = ""
TxtDenominacionDistintiva.Text = ""
TxtFabricante.Text = ""
TxtCondicionesTransporte.Text = ""
TxtRegistroSanitarioAutorizacion.Text = ""
TxtPermisoImportacion.Text = ""
TxtFolioImportacionVUCEM.Text = ""
TxtNumCAS.Text = ""
TxtRazonSocialEmpImportacion.Text = ""
TxtNumRegistroPlagCOFEPRIS.Text = ""
TxtDatosFabricante.Text = ""
TxtDatosFormulador.Text = ""
TxtDatosMaquilador.Text = ""
TxtUsoAutorizado.Text = ""
UpCartaPorte.Update()
End Sub
@@ -3334,8 +3369,6 @@ Partial Class ProductosyServicios
Protected Sub ChkFechaIndeterminadaRSCO_CheckedChanged(sender As Object, e As EventArgs)
DivRegistroRSCO3.Visible = If(ChkFechaIndeterminadaRSCO.Checked, False, True)
If TxtFechaVigenciaRSCO.Text = "01/01/1900" Then
TxtFechaVigenciaRSCO.Text = ""
End If
@@ -3343,4 +3376,65 @@ Partial Class ProductosyServicios
UpDatos.Update()
End Sub
Private Sub CargaDatosCartaPorte()
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetProductosServiciosComplementos(CvePS) AndAlso ObjPS.DtResultados.Rows.Count > 0 Then
DdlMaterialPeligroso.txtText.Value = ObjPS.DtResultados.Rows(0)("MaterialPeligroso").ToString
DdlMaterialPeligroso.txtValue.Value = ObjPS.DtResultados.Rows(0)("CveMaterialPeligroso").ToString
DdlEmbalaje.txtText.Value = ObjPS.DtResultados.Rows(0)("Embalaje").ToString
DdlEmbalaje.txtValue.Value = ObjPS.DtResultados.Rows(0)("CveEmbalaje").ToString
DdlClaveSectorCOFEPRIS.SelectedValueExist(ObjPS.DtResultados.Rows(0)("CveSectorCOFEPRIS").ToString)
DdlClaveFormaFarmaceutica.SelectedValueExist(ObjPS.DtResultados.Rows(0)("CveFormaFarmaceutica").ToString)
TxtPesoKg.Text = ObjPS.DtResultados.Rows(0)("PesoKg").ToString
TxtDimensiones.Text = ObjPS.DtResultados.Rows(0)("Dimensiones").ToString
TxtNombreIngredienteActivo.Text = ObjPS.DtResultados.Rows(0)("NombreIngredienteActivo").ToString
TxtNomQuimico.Text = ObjPS.DtResultados.Rows(0)("NomQuimico").ToString
TxtDenominacionGenerica.Text = ObjPS.DtResultados.Rows(0)("DenominacionGenerica").ToString
TxtDenominacionDistintiva.Text = ObjPS.DtResultados.Rows(0)("DenominacionDistintiva").ToString
TxtFabricante.Text = ObjPS.DtResultados.Rows(0)("Fabricante").ToString
TxtCondicionesTransporte.Text = ObjPS.DtResultados.Rows(0)("CondicionesTransporte").ToString
TxtRegistroSanitarioAutorizacion.Text = ObjPS.DtResultados.Rows(0)("RegistroSanitarioAutorizacion").ToString
TxtPermisoImportacion.Text = ObjPS.DtResultados.Rows(0)("PermisoImportacion").ToString
TxtFolioImportacionVUCEM.Text = ObjPS.DtResultados.Rows(0)("FolioImportacionVUCEM").ToString
TxtNumCAS.Text = ObjPS.DtResultados.Rows(0)("NumCAS").ToString
TxtRazonSocialEmpImportacion.Text = ObjPS.DtResultados.Rows(0)("RazonSocialEmpImportacion").ToString
TxtNumRegistroPlagCOFEPRIS.Text = ObjPS.DtResultados.Rows(0)("NumRegistroPlagCOFEPRIS").ToString
TxtDatosFabricante.Text = ObjPS.DtResultados.Rows(0)("DatosFabricante").ToString
TxtDatosFormulador.Text = ObjPS.DtResultados.Rows(0)("DatosFormulador").ToString
TxtDatosMaquilador.Text = ObjPS.DtResultados.Rows(0)("DatosMaquilador").ToString
TxtUsoAutorizado.Text = ObjPS.DtResultados.Rows(0)("UsoAutorizado").ToString
End If
UpCartaPorte.Update()
End Sub
Private Function GuardaDatosCartPorte(ByRef transaccionSQL As SqlTransaction) As Boolean
Dim Respuesta As Boolean = True
If DdlMaterialPeligroso.SelectedValue.ToEntero > 0 Or DdlEmbalaje.SelectedValue.ToEntero > 0 Or DdlClaveSectorCOFEPRIS.SelectedValue.ToEntero > 0 Or DdlClaveFormaFarmaceutica.SelectedValue.ToEntero > 0 Then
Dim ObjPS As New ClsProductosServicios(transaccionSQL)
If Not ObjPS.AddUpdateProductosServiciosComplementos(CvePS, TxtPesoKg.Text.ToDecimal, DdlMaterialPeligroso.SelectedValue.ToEntero, DdlEmbalaje.SelectedValue.ToEntero, TxtDimensiones.Text, DdlClaveSectorCOFEPRIS.SelectedValue.ToEntero,
TxtNombreIngredienteActivo.Text.Trim, TxtNomQuimico.Text.Trim, TxtDenominacionGenerica.Text.Trim, TxtDenominacionDistintiva.Text.Trim, TxtFabricante.Text.Trim, DdlClaveFormaFarmaceutica.SelectedValue.ToEntero, TxtCondicionesTransporte.Text.Trim,
TxtRegistroSanitarioAutorizacion.Text.Trim, TxtPermisoImportacion.Text.Trim, TxtFolioImportacionVUCEM.Text.Trim, TxtNumCAS.Text.Trim, TxtRazonSocialEmpImportacion.Text, TxtNumRegistroPlagCOFEPRIS.Text.Trim, TxtDatosFabricante.Text.Trim,
TxtDatosFormulador.Text.Trim, TxtDatosMaquilador.Text.Trim, TxtUsoAutorizado.Text) Then
Respuesta = False
End If
End If
Return Respuesta
End Function
End Class