Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -4041,9 +4041,7 @@ Partial Class Compras_Compras
|
||||
Protected Sub BtnGuardar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
|
||||
'If Not AjustaCombustibles() Then
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
|
||||
'------------------ INICIA VALIDACIONES ------------------
|
||||
|
||||
@@ -4465,6 +4463,10 @@ Partial Class Compras_Compras
|
||||
|
||||
'------------------TERMINA VALIDACIONES------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'si hay necesidad de actualizar el globaldtps
|
||||
If RegeneraPS Then
|
||||
'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDT)
|
||||
@@ -5922,7 +5924,10 @@ Partial Class Compras_Compras
|
||||
Dim IdCtaContable As Integer = 0
|
||||
Dim Concepto As String = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, NombreProveedor, $"{TxtSerie.Text}-{TxtFolio.Text}", If(TxtDocumentoFolio.Visible, TxtDocumentoFolio.Text, If(TxtDocumentoFolioCaja.Visible, TxtDocumentoFolioCaja.Text, ConceptoPersonal)))
|
||||
Dim importeMN As Decimal = 0
|
||||
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, 1, -1)
|
||||
|
||||
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, -1, 1)
|
||||
|
||||
|
||||
Dim Referencia As String = $"{TxtSerie.Text}-{TxtFolio.Text}" ' concatenation interpolation
|
||||
Dim PorcentajeImpuesto As Decimal = 0
|
||||
CveConceptoOriginal = ConceptoContable
|
||||
@@ -8967,7 +8972,7 @@ Partial Class Compras_Compras
|
||||
IdCtaContable = 0
|
||||
Dim Concepto As String = String.Format("{0}-{1}", TxtSerie.Text, TxtFolio.Text)
|
||||
Dim importeMN As Decimal = 0
|
||||
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, 1, -1)
|
||||
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, -1, 1)
|
||||
Dim PorcentajeImpuesto As Decimal = 0
|
||||
Dim ConceptoPartida As String = String.Format("{0}-{1}", TxtSerie.Text, TxtFolio.Text)
|
||||
|
||||
@@ -10586,7 +10591,7 @@ Partial Class Compras_Compras
|
||||
Dim importeMovimiento As Decimal = 0
|
||||
Dim IdCtaContable As Integer = 0
|
||||
Dim importeMN As Decimal = 0
|
||||
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, 1, -1)
|
||||
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, -1, 1)
|
||||
Dim Referencia As String = $"{TxtSerie.Text}-{TxtFolio.Text}" ' concatenation interpolation
|
||||
|
||||
Select Case ConceptoContable
|
||||
|
||||
@@ -212,11 +212,15 @@ Partial Class PopUpVerFactura
|
||||
If Request("onlyPrint").ToString() = "manifiestoRemision" Then
|
||||
imprimirManifiestoRemision(Request("cveEmbarqueManifiesto").ToString.ToEntero())
|
||||
End If
|
||||
If Request("onlyPrint").ToString() = "manifiestoCartaPorte" Then
|
||||
imprimirManifiestoCartaPorte(Request("cveEmbarqueManifiesto").ToString.ToEntero())
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub imprimirManifiesto(cveEmbarqueManifiesto As Integer)
|
||||
Dim NoEmbarque As String = ""
|
||||
Dim Fecha As String = ""
|
||||
@@ -235,6 +239,8 @@ Partial Class PopUpVerFactura
|
||||
Dim NoKgManifiesto As String = ""
|
||||
Dim Mercado As String = ""
|
||||
Dim NoFactura As String = ""
|
||||
Dim Cliente As String = ""
|
||||
Dim Direccion As String = ""
|
||||
|
||||
Dim LongitudCaja As String = ""
|
||||
Dim LineaTransportacion As String = ""
|
||||
@@ -254,6 +260,8 @@ Partial Class PopUpVerFactura
|
||||
If objnom.PA_AGRO_Embarque_ManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then
|
||||
Dim row As DataRow = objnom.DtResultados.Rows(0)
|
||||
NoEmbarque = row("NoEmbarque").ToString()
|
||||
Cliente = row("Cliente").ToString()
|
||||
Direccion = row("Direccion").ToString()
|
||||
Fecha = String.Format("{0:dd/MM/yyyy}", row("Fecha"))
|
||||
SubProyecto = row("SubProyecto").ToString()
|
||||
AgenciaAduanalUSA = row("AgenciaAduanalUSA").ToString()
|
||||
@@ -288,6 +296,7 @@ Partial Class PopUpVerFactura
|
||||
NoPallets = objnom.DtResultados.Rows.Count.ToString()
|
||||
NoKgManifiesto = objnom.DtResultados.SUM("Peso").ToString("N2")
|
||||
NoBultos = objnom.DtResultados.SUM("NoCajas").ToString("N0")
|
||||
|
||||
tablaReporte = objnom.DtResultados
|
||||
End If
|
||||
End If
|
||||
@@ -295,6 +304,8 @@ Partial Class PopUpVerFactura
|
||||
End Using
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NoEmbarque", NoEmbarque))
|
||||
params.Add(New ReportParameter("Cliente", Cliente))
|
||||
params.Add(New ReportParameter("Direccion", Direccion))
|
||||
params.Add(New ReportParameter("Fecha", Fecha))
|
||||
params.Add(New ReportParameter("SubProyecto", SubProyecto))
|
||||
params.Add(New ReportParameter("AgenciaAduanalUSA", AgenciaAduanalUSA))
|
||||
@@ -335,8 +346,7 @@ Partial Class PopUpVerFactura
|
||||
ImprimirPDF("GPS/EmbarqueManifiesto.rdlc", lrds, params, "Manifesto")
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub imprimirManifiestoRemisionRemision(cveEmbarqueManifiesto As Integer)
|
||||
Private Sub imprimirManifiestoRemision(cveEmbarqueManifiesto As Integer)
|
||||
Dim NoEmbarque As String = ""
|
||||
Dim Fecha As String = ""
|
||||
Dim SubProyecto As String = ""
|
||||
@@ -361,6 +371,8 @@ Partial Class PopUpVerFactura
|
||||
Dim RPC As String = ""
|
||||
Dim BINSDECARTON As String = ""
|
||||
Dim TotalDlls As String = ""
|
||||
Dim Cliente As String = ""
|
||||
Dim Direccion As String = ""
|
||||
|
||||
|
||||
|
||||
@@ -382,6 +394,8 @@ Partial Class PopUpVerFactura
|
||||
If objnom.PA_AGRO_Embarque_ManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then
|
||||
Dim row As DataRow = objnom.DtResultados.Rows(0)
|
||||
NoEmbarque = row("NoEmbarque").ToString()
|
||||
Cliente = row("Cliente").ToString()
|
||||
Direccion = row("Direccion").ToString()
|
||||
Fecha = String.Format("{0:dd/MM/yyyy}", row("Fecha"))
|
||||
DivisoresdeCarton = String.Format("{0:N0}", row("DivisoresdeCarton"))
|
||||
BolsasdePlastico = String.Format("{0:N0}", row("BolsasdePlastico"))
|
||||
@@ -389,6 +403,7 @@ Partial Class PopUpVerFactura
|
||||
CAJASDECARTON = String.Format("{0:N0}", row("CAJASDECARTON"))
|
||||
RPC = String.Format("{0:N0}", row("RPC"))
|
||||
BINSDECARTON = String.Format("{0:N0}", row("BINSDECARTON"))
|
||||
TotalDlls = String.Format("{0:N0}", row("TotalDlls"))
|
||||
|
||||
|
||||
|
||||
@@ -402,7 +417,7 @@ Partial Class PopUpVerFactura
|
||||
Camion = String.Format("{0} {1}", row("CamEspecificacion"), row("CamAnio"))
|
||||
Rem1Placa = row("Rem1Placa").ToString()
|
||||
NoFactura = row("NoFactura").ToString()
|
||||
Remolque1 = String.Format("{0} ", row("NumeroTrailer"), row("Rem1Anio"))
|
||||
Remolque1 = String.Format("{0} ", row("NumeroTrailer"))
|
||||
Mercado = If(row("CveDestino").ToString() = "2", "Extranjero", "Nacional")
|
||||
|
||||
NumeroTrailer = String.Format("No. {0}", row("NumeroTrailer").ToString())
|
||||
@@ -432,6 +447,8 @@ Partial Class PopUpVerFactura
|
||||
End Using
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NoEmbarque", NoEmbarque))
|
||||
params.Add(New ReportParameter("Cliente", Cliente))
|
||||
params.Add(New ReportParameter("Direccion", Direccion))
|
||||
params.Add(New ReportParameter("Fecha", Fecha))
|
||||
params.Add(New ReportParameter("SubProyecto", SubProyecto))
|
||||
params.Add(New ReportParameter("AgenciaAduanalUSA", AgenciaAduanalUSA))
|
||||
@@ -476,8 +493,178 @@ Partial Class PopUpVerFactura
|
||||
lrds.Add(rds)
|
||||
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
|
||||
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
||||
ImprimirPDF("GPS/EmbarqueManifiestoRemision.rdlc", lrds, params, "Manifesto")
|
||||
ImprimirPDF("GPS/EmbarqueManifiestoRemision.rdlc", lrds, params, "Remisión")
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub imprimirManifiestoCartaPorte(cveEmbarqueManifiesto As Integer)
|
||||
Dim NoEmbarque As String = ""
|
||||
Dim Fecha As String = ""
|
||||
Dim SubProyecto As String = ""
|
||||
Dim AgenciaAduanalUSA As String = ""
|
||||
Dim AgenciaAduanalMEX As String = ""
|
||||
Dim Temperatura As String = ""
|
||||
Dim Hora As String = ""
|
||||
Dim Chofer As String = ""
|
||||
Dim CamPlaca As String = ""
|
||||
Dim Camion As String = ""
|
||||
Dim Rem1Placa As String = ""
|
||||
Dim Remolque1 As String = ""
|
||||
Dim NoPallets As String = ""
|
||||
Dim NoBultos As String = ""
|
||||
Dim NoKgManifiesto As String = ""
|
||||
Dim Mercado As String = ""
|
||||
Dim NoFactura As String = ""
|
||||
Dim DivisoresdeCarton As String = ""
|
||||
Dim BolsasdePlastico As String = ""
|
||||
Dim TapaderasdeCarton As String = ""
|
||||
Dim CAJASDECARTON As String = ""
|
||||
Dim RPC As String = ""
|
||||
Dim BINSDECARTON As String = ""
|
||||
Dim TotalDlls As String = ""
|
||||
Dim Cliente As String = ""
|
||||
Dim Direccion As String = ""
|
||||
Dim Correo As String = ""
|
||||
|
||||
|
||||
Dim LongitudCaja As String = ""
|
||||
Dim LineaTransportacion As String = ""
|
||||
Dim SCAC As String = ""
|
||||
Dim CAAT As String = ""
|
||||
Dim NumeroTrailer As String = ""
|
||||
|
||||
|
||||
Dim tablaReporte As New DataTable
|
||||
|
||||
'Envase = "1 1/9"
|
||||
'Tamano = "Small"
|
||||
'Cultivo = "Tomate"
|
||||
'noPallet = "000001"
|
||||
'Variedad = "Golden"
|
||||
Using objnom As New ClsNominas
|
||||
If objnom.PA_AGRO_Embarque_ManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then
|
||||
Dim row As DataRow = objnom.DtResultados.Rows(0)
|
||||
NoEmbarque = row("NoEmbarque").ToString()
|
||||
Cliente = row("Cliente").ToString()
|
||||
Direccion = row("Direccion").ToString()
|
||||
Correo = row("Correo").ToString()
|
||||
Fecha = String.Format("{0:dd/MM/yyyy}", row("Fecha"))
|
||||
DivisoresdeCarton = String.Format("{0:N0}", row("DivisoresdeCarton"))
|
||||
BolsasdePlastico = String.Format("{0:N0}", row("BolsasdePlastico"))
|
||||
TapaderasdeCarton = String.Format("{0:N0}", row("TapaderasdeCarton"))
|
||||
CAJASDECARTON = String.Format("{0:N0}", row("CAJASDECARTON"))
|
||||
RPC = String.Format("{0:N0}", row("RPC"))
|
||||
BINSDECARTON = String.Format("{0:N0}", row("BINSDECARTON"))
|
||||
TotalDlls = String.Format("{0:N0}", row("TotalDlls"))
|
||||
|
||||
|
||||
|
||||
SubProyecto = row("SubProyecto").ToString()
|
||||
AgenciaAduanalUSA = row("AgenciaAduanalUSA").ToString()
|
||||
AgenciaAduanalMEX = row("AgenciaAduanalMEX").ToString()
|
||||
Temperatura = row("Temperatura").ToString()
|
||||
Hora = String.Format("{0:hh }:{0:mm }:{0:ss tt}:", row("FechaIng"))
|
||||
Chofer = row("Chofer").ToString()
|
||||
CamPlaca = row("CamPlaca").ToString()
|
||||
Camion = String.Format("{0} {1}", row("CamEspecificacion"), row("CamAnio"))
|
||||
Rem1Placa = row("Rem1Placa").ToString()
|
||||
NoFactura = row("NoFactura").ToString()
|
||||
Remolque1 = String.Format("{0} ", row("NumeroTrailer"))
|
||||
Mercado = If(row("CveDestino").ToString() = "2", "Extranjero", "Nacional")
|
||||
|
||||
NumeroTrailer = String.Format("No. {0}", row("NumeroTrailer").ToString())
|
||||
|
||||
LongitudCaja = row("LongitudCaja").ToString()
|
||||
LineaTransportacion = row("LineaTransportacion").ToString()
|
||||
SCAC = row("SCAC").ToString()
|
||||
CAAT = row("CAAT").ToString()
|
||||
|
||||
'If row("CveCamionRemolque1").ToString() = "1" Then
|
||||
' Rem1Placa = "12-TF-5E"
|
||||
' Remolque1 = "Remolque 1"
|
||||
'Else
|
||||
' Rem1Placa = "15-TF-7f"
|
||||
' Remolque1 = "Remolque 2"
|
||||
|
||||
'End If
|
||||
|
||||
If objnom.PA_Agro_Embarque_PalletGet(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, cveEmbarqueManifiesto, -1) And objnom.DtResultados.Rows.Count > 0 Then
|
||||
NoPallets = objnom.DtResultados.Rows.Count.ToString()
|
||||
NoKgManifiesto = objnom.DtResultados.SUM("Peso").ToString("N2")
|
||||
NoBultos = objnom.DtResultados.SUM("NoCajas").ToString("N0")
|
||||
tablaReporte = objnom.DtResultados
|
||||
End If
|
||||
End If
|
||||
'Remolque 1 12-TF-5E' }, { cveCamion: 2, placa: 'Remolque 2 15-TF-7f
|
||||
End Using
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NoEmbarque", NoEmbarque))
|
||||
params.Add(New ReportParameter("Cliente", Cliente))
|
||||
params.Add(New ReportParameter("Direccion", Direccion))
|
||||
params.Add(New ReportParameter("Fecha", Fecha))
|
||||
params.Add(New ReportParameter("SubProyecto", SubProyecto))
|
||||
params.Add(New ReportParameter("AgenciaAduanalUSA", AgenciaAduanalUSA))
|
||||
params.Add(New ReportParameter("AgenciaAduanalMEX", AgenciaAduanalMEX))
|
||||
params.Add(New ReportParameter("Temperatura", Temperatura))
|
||||
params.Add(New ReportParameter("Hora", Hora))
|
||||
params.Add(New ReportParameter("Chofer", Chofer))
|
||||
params.Add(New ReportParameter("CamPlaca", CamPlaca))
|
||||
params.Add(New ReportParameter("Camion", Camion))
|
||||
params.Add(New ReportParameter("Rem1Placa", Rem1Placa))
|
||||
params.Add(New ReportParameter("Remolque1", Remolque1))
|
||||
|
||||
|
||||
params.Add(New ReportParameter("LongitudCaja", LongitudCaja))
|
||||
params.Add(New ReportParameter("LineaTransportacion", LineaTransportacion))
|
||||
params.Add(New ReportParameter("SCAC", SCAC))
|
||||
params.Add(New ReportParameter("CAAT", CAAT))
|
||||
params.Add(New ReportParameter("NumeroTrailer", NumeroTrailer))
|
||||
|
||||
|
||||
params.Add(New ReportParameter("NoFactura", NoFactura))
|
||||
params.Add(New ReportParameter("Mercado", Mercado))
|
||||
params.Add(New ReportParameter("NoBultos", NoBultos))
|
||||
params.Add(New ReportParameter("NoPallets", NoPallets))
|
||||
params.Add(New ReportParameter("NoKgManifiesto", NoKgManifiesto))
|
||||
|
||||
|
||||
'params.Add(New ReportParameter("DivisoresdeCarton", DivisoresdeCarton))
|
||||
'params.Add(New ReportParameter("BolsasdePlastico", BolsasdePlastico))
|
||||
'params.Add(New ReportParameter("TapaderasdeCarton", TapaderasdeCarton))
|
||||
'params.Add(New ReportParameter("CAJASDECARTON", CAJASDECARTON))
|
||||
'params.Add(New ReportParameter("RPC", RPC))
|
||||
'params.Add(New ReportParameter("BINSDECARTON", BINSDECARTON))
|
||||
'params.Add(New ReportParameter("TotalDlls", TotalDlls))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = tablaReporte}
|
||||
lrds.Add(rds)
|
||||
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
|
||||
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
||||
Dim pdf = StreamPDF("GPS/EmbarqueManifiestoCartaPorte.rdlc", lrds, params, "DatosCartaPorte")
|
||||
|
||||
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
|
||||
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = pdf, .NombreArchivo = String.Format("{0}.pdf", "DatosCartaPorte")})
|
||||
|
||||
Dim ObjMail As New ClsSisMail()
|
||||
|
||||
If ObjMail.SendMail(UsuarioActual.Empresa, Correo, "Datos carta porte", "", "", LSRutasMail) Then
|
||||
'ResultadoMail = 1
|
||||
Else
|
||||
'GuardaLogFacturacion($"No se envio el correo {Mail}, {Asunto}, {Cuerpo}, {MailCC},")
|
||||
'GuardaLogFacturacion($"Ruta XML {ArchivoXML}")
|
||||
'ResultadoMail = 3
|
||||
End If
|
||||
ImprimirPDF("GPS/EmbarqueManifiestoCartaPorte.rdlc", lrds, params, "DatosCartaPorte", Content_Disposition:="inline")
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub imprimirpallet2(cvePallet As Integer)
|
||||
Dim Envase As String = ""
|
||||
Dim Tamano As String = ""
|
||||
|
||||
@@ -713,18 +713,36 @@ Partial Class Compras_Proveedores
|
||||
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 nodo As XmlNode = XMLDoc.DocumentElement
|
||||
|
||||
If Prefijo.ToLower <> "cfdi" Then cfdVer = "http://www.sat.gob.mx/cfd/2"
|
||||
namespaces.AddNamespace(Prefijo, cfdVer)
|
||||
Dim nodo As XmlNode = XMLDoc.DocumentElement
|
||||
Dim Version As String = ValorXml(nodo, "Version")
|
||||
|
||||
|
||||
If Version = "3.2" Then
|
||||
Prefijo = "cfd"
|
||||
cfdVer = "http://www.sat.gob.mx/cfd/2"
|
||||
ElseIf 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
|
||||
|
||||
|
||||
|
||||
'If Prefijo.ToLower <> "cfdi" Then cfdVer = "http://www.sat.gob.mx/cfd/2"
|
||||
namespaces.AddNamespace(Prefijo, cfdVer)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Dim node As XmlNode
|
||||
node = XMLDoc.SelectSingleNode(String.Format("//{0}:Emisor", Prefijo), namespaces)
|
||||
If node IsNot Nothing Then
|
||||
TxtRFC.Text = ValorXml(node, "rfc")
|
||||
|
||||
If Version = "3.3" Then
|
||||
If Version = "3.3" Or Version = "4.0" Then
|
||||
TxtRazonSocial.Text = HttpUtility.HtmlDecode(ValorXml(node, "Nombre"))
|
||||
TxtNombreComercial.Text = HttpUtility.HtmlDecode(ValorXml(node, "Nombre"))
|
||||
ChkEstado.Checked = True
|
||||
|
||||
@@ -1700,7 +1700,7 @@ Partial Class Compras_eFacturas
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalFacturas"))
|
||||
|
||||
|
||||
asdasd
|
||||
|
||||
'Alert(String.Format("Se cargaron {0} Facturas", Arreglo.Count), TipoMensaje.MsgInformacion)
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user