Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -6899,24 +6899,34 @@ Partial Class Compras_Compras
|
||||
|
||||
Dim DiferenciaDevolucion As Decimal = importeMovimiento - TotalRealDevolucion
|
||||
|
||||
If Math.Abs(DiferenciaDevolucion) > 0 Then
|
||||
|
||||
If TotalRealDevolucion <> 0 Then
|
||||
|
||||
If Math.Abs(DiferenciaDevolucion) > 0 Then
|
||||
|
||||
|
||||
Dim CveSubProyecto69 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", "CveSubProyecto > 0 ").ToEntero
|
||||
Dim CveClasificacion69 As Integer = TmpDT.FiltroPrimeroValor("CveClasificacion", "CveClasificacion > 0 ").ToEntero
|
||||
Dim CveSubProyecto69 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", "CveSubProyecto > 0 ").ToEntero
|
||||
Dim CveClasificacion69 As Integer = TmpDT.FiltroPrimeroValor("CveClasificacion", "CveClasificacion > 0 ").ToEntero
|
||||
|
||||
|
||||
Dim IdCtaContable69 As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasificacion69}").ToString.ToEntero
|
||||
Dim IdCtaContable69 As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasificacion69}").ToString.ToEntero
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaDevolucion, Referencia, 69, Concepto, FechaMovimiento, IdCtaContable69, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=DiferenciaDevolucion, ImporteME:=If(tipoCambioActual = 1, 0, DiferenciaDevolucion), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto69, CveClasificacion:=CveClasificacion69) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaDevolucion, Referencia, 69, Concepto, FechaMovimiento, IdCtaContable69, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=DiferenciaDevolucion, ImporteME:=If(tipoCambioActual = 1, 0, DiferenciaDevolucion), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto69, CveClasificacion:=CveClasificacion69) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TotalRealDevolucion, Referencia, ConceptoContabilizacionNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Else
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContabilizacionNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TotalRealDevolucion, Referencia, ConceptoContabilizacionNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=TotalRealDevolucion, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -261,8 +261,8 @@ 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("Rem1Especificacion"), row("Rem1Anio"))
|
||||
Mercado = If(row("AgenciaAduanalUSA").ToString() = "2", "Extranjero", "Nacional")
|
||||
Remolque1 = String.Format("{0} ", row("NumeroTrailer"), row("Rem1Anio"))
|
||||
Mercado = If(row("CveDestino").ToString() = "2", "Extranjero", "Nacional")
|
||||
|
||||
NumeroTrailer = String.Format("No. {0}", row("NumeroTrailer").ToString())
|
||||
|
||||
@@ -394,11 +394,12 @@ Partial Class PopUpVerFactura
|
||||
NoCajas = row("NoCajas").ToString()
|
||||
Fecha = String.Format("{0:MMM dd}", row("Fecha")).Replace(".", "").ToUpper()
|
||||
CvetypeImpresion = row("CvetypeImpresion").ToString().ToEntero()
|
||||
NumberOfCode = String.Format("(01)00856977005186(13){0:ddMMyy}(10){0}01", Regex.Match(row("Cuadro").ToString(), "\\d+"), row("Fecha"))
|
||||
NumberOfCode = String.Format("(01)00856977005186(13){1:ddMMyy}(10){0}01", Right(String.Format("0{0}", Regex.Match(row("Cuadro").ToString(), "\d+")), 2), row("Fecha"))
|
||||
|
||||
End If
|
||||
End Using
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
params.Add(New ReportParameter("Tamano", Tamano))
|
||||
params.Add(New ReportParameter("noPallet", noPallet))
|
||||
params.Add(New ReportParameter("FormatoImpresion", FormatoImpresion))
|
||||
@@ -410,16 +411,44 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("Cultivo", If(CvetypeImpresion = 2, Cultivoingles, Cultivo)))
|
||||
params.Add(New ReportParameter("Envase", If(CvetypeImpresion = 2, "PLU 4062", Envase)))
|
||||
|
||||
|
||||
|
||||
Dim tablaReporte As New DataTable
|
||||
|
||||
|
||||
tablaReporte.Columns.Add(New DataColumn("Codigo", GetType(String)))
|
||||
tablaReporte.Rows.Add(tablaReporte.NewRow)
|
||||
tablaReporte.Rows.Add(tablaReporte.NewRow)
|
||||
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
|
||||
'img
|
||||
Dim dtqr As New DataTable
|
||||
Dim column As DataColumn = New DataColumn("ImagenByte")
|
||||
column.DataType = System.Type.[GetType]("System.Byte[]")
|
||||
column.AllowDBNull = True
|
||||
column.Caption = "ImagenByte"
|
||||
dtqr.Columns.Add(column)
|
||||
Dim rowqr As DataRow = dtqr.NewRow()
|
||||
|
||||
|
||||
Dim bcode As New BarcodeLib.Barcode()
|
||||
Dim img = bcode.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", noPallet), 50, 10)
|
||||
Dim barcodebyte As Byte()
|
||||
Using ms = New MemoryStream()
|
||||
img.Save(ms, System.Drawing.Imaging.ImageFormat.Png)
|
||||
barcodebyte = ms.ToArray()
|
||||
End Using
|
||||
rowqr("ImagenByte") = barcodebyte
|
||||
|
||||
dtqr.Rows.Add(rowqr)
|
||||
Dim rds2 As New ReportDataSource With {.Name = "dsImagenes", .Value = dtqr}
|
||||
rds2.Name = "dsImagenes"
|
||||
rds2.Value = dtqr
|
||||
lrds.Add(rds2)
|
||||
'endimg
|
||||
|
||||
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 ruta As String = "GPS/PalletEtiquetaCaja.rdlc"
|
||||
@@ -987,7 +1016,7 @@ Partial Class PopUpVerFactura
|
||||
Private Sub ImprimeFormatoCartaPorte(CveMovimiento As Integer)
|
||||
If CveMovimiento > 0 Then
|
||||
Dim ObjInv As New ClsInventarios
|
||||
Dim ObjAcar As New ClsAcarreos
|
||||
|
||||
Dim SerieFolio As String = ""
|
||||
Dim DomicilioSucursal As String = ""
|
||||
Dim LugarFecha As String = ""
|
||||
@@ -1008,6 +1037,10 @@ Partial Class PopUpVerFactura
|
||||
Dim Ciudad As String = ""
|
||||
Dim Licencia As String = ""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Dim SBDireccionO As New StringBuilder()
|
||||
Dim SBDireccionD As New StringBuilder()
|
||||
|
||||
@@ -1022,9 +1055,8 @@ Partial Class PopUpVerFactura
|
||||
Destino = Dr("AlmacenDestino").ToString
|
||||
Observaciones = Dr("Observaciones").ToString
|
||||
CveChofer = Dr("CveChofer").ToString
|
||||
If ObjAcar.GetChofer(CveChofer.ToEntero, UsuarioActual.CveEmpresa, -1, -1) Then
|
||||
Chofer = ObjAcar.DtResultados.FiltroPrimeroValor("Chofer")
|
||||
End If
|
||||
|
||||
|
||||
Placa = Dr("Traslado_Placa").ToString
|
||||
Recibio = Dr("Recibio").ToString
|
||||
FechaEntrega = Dr("FechaEntrega").ToString
|
||||
@@ -1058,10 +1090,18 @@ Partial Class PopUpVerFactura
|
||||
Telefono = Dr("Telefono1").ToString
|
||||
Ciudad = Dr("Ciudad").ToString
|
||||
Licencia = Dr("Licencia").ToString
|
||||
|
||||
|
||||
Chofer = Dr("Chofer").ToString
|
||||
Placa = Dr("Placa").ToString
|
||||
EspecifUnidad = Dr("Especificacion").ToString
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
ObjAcar.Dispose()
|
||||
|
||||
|
||||
Dim Dt As DataTable = Nothing
|
||||
If ObjInv.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
@@ -1074,18 +1114,19 @@ Partial Class PopUpVerFactura
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
|
||||
|
||||
'params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, ImageToBase64(Drawing.Image.FromFile(Imagen.FullName), Drawing.Imaging.ImageFormat.Png), "")))
|
||||
Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName)
|
||||
|
||||
|
||||
|
||||
If Imagen.Exists Then
|
||||
Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName)
|
||||
params.Add(New ReportParameter("LogoPath", LogoRuta))
|
||||
|
||||
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
|
||||
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
@@ -1100,6 +1141,7 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("Destinatario", ""))
|
||||
params.Add(New ReportParameter("Observaciones", Observaciones))
|
||||
params.Add(New ReportParameter("Chofer", Chofer))
|
||||
params.Add(New ReportParameter("ResponsableRecibio", Chofer))
|
||||
params.Add(New ReportParameter("Placa", Placa))
|
||||
params.Add(New ReportParameter("Recibio", Recibio))
|
||||
params.Add(New ReportParameter("FechaEntrega", FechaEntrega.ToDateTime().ToString("dd/MM/yyyy")))
|
||||
@@ -1113,6 +1155,7 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("Telefono", Telefono))
|
||||
params.Add(New ReportParameter("Ciudad", Ciudad))
|
||||
params.Add(New ReportParameter("Licencia", Licencia))
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/CartaPorte.rdlc", Dt, params, String.Format("Carta Porte -{0}", Now.ToDateTime.ToShortDateString))
|
||||
End If
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user