This commit is contained in:
2022-02-10 20:56:19 -07:00
21 changed files with 1572 additions and 142 deletions

View File

@@ -1185,7 +1185,7 @@ Public Class ClsBancos
'End Function 'End Function
Public Function UpdateComplementoPago(CveComplementoPago As Integer, FolioFiscal As String, CvePAC As Integer, CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional CvePACCancelacion As Integer = -1, Public Function UpdateComplementoPago(CveComplementoPago As Integer, FolioFiscal As String, CvePAC As Integer, CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional CvePACCancelacion As Integer = -1,
Optional FechaCancelacion As Date = MinFecha, Optional SelloCancelacion As String = "") As Boolean Optional FechaCancelacion As Date = MinFecha, Optional SelloCancelacion As String = "", Optional CveSATMotivoCancelacion As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Banc_ComplementoPagoUpdate") DataAdapter("PA_Banc_ComplementoPagoUpdate")
@@ -1199,6 +1199,7 @@ Public Class ClsBancos
.Add("@CvePACCancelacion", SqlDbType.Int).Value = CvePACCancelacion .Add("@CvePACCancelacion", SqlDbType.Int).Value = CvePACCancelacion
.Add("@FechaCancelacion", SqlDbType.Date).Value = FechaCancelacion .Add("@FechaCancelacion", SqlDbType.Date).Value = FechaCancelacion
.Add("@SelloCancelacion", SqlDbType.VarChar).Value = SelloCancelacion .Add("@SelloCancelacion", SqlDbType.VarChar).Value = SelloCancelacion
.Add("@CveSATMotivoCancelacion", SqlDbType.Int).Value = CveSATMotivoCancelacion
End With End With

View File

@@ -7528,6 +7528,7 @@ Public Class ClsPaginas
If ObjInv.GetMovimientos(Vta.Inv_CveMovimiento.ToEntero, -1, -1, UsuarioActual.CveEmpresa) Then If ObjInv.GetMovimientos(Vta.Inv_CveMovimiento.ToEntero, -1, -1, UsuarioActual.CveEmpresa) Then
If ObjInv.DtResultados.Rows.Count > 0 Then If ObjInv.DtResultados.Rows.Count > 0 Then
Dim Dr As DataRow = ObjInv.DtResultados.Rows(0) Dim Dr As DataRow = ObjInv.DtResultados.Rows(0)
If Dr IsNot Nothing Then If Dr IsNot Nothing Then
AlmOrigen = Dr("AlmacenOrigen").ToString AlmOrigen = Dr("AlmacenOrigen").ToString
@@ -7553,7 +7554,13 @@ Public Class ClsPaginas
If Dr("EstadoDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Edo: {0}", Dr("EstadoDestino").ToString) If Dr("EstadoDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Edo: {0}", Dr("EstadoDestino").ToString)
If Dr("PaisDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", País: {0}", Dr("PaisDestino").ToString) If Dr("PaisDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", País: {0}", Dr("PaisDestino").ToString)
End If End If
End If End If
End If End If
End If End If

View File

@@ -163,6 +163,25 @@ Public Class ClsVentas
Return Retorno Return Retorno
End Function End Function
Public Function Embarque_ManifiestoUpvta(cveVenta As Int32, cveUsuario As Int32, cveEmpresa As Int32, cveEmbarqueManifiesto As Int32) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_AGRO_Embarque_ManifiestoUpvta", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CveVenta", SqlDbType.Int).Value = cveVenta
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
.Add("@cveEmbarqueManifiesto", SqlDbType.Int).Value = cveEmbarqueManifiesto
.Add("@CveUsuario", SqlDbType.Int).Value = cveUsuario
End With
Try
SqlAdapter.Fill(Data)
retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar venta manifiesto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return retorno
End Function
Public Function GetVentaTerminal(CveVentaTerminal As Integer, Fecha As DateTime, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean Public Function GetVentaTerminal(CveVentaTerminal As Integer, Fecha As DateTime, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_VentasGetTerminal") DataAdapter("PA_VentasGetTerminal")

View File

@@ -1370,11 +1370,13 @@
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Motivo" Visible="true" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%"> <asp:TemplateField HeaderText="Motivo" Visible="true" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%">
<ItemTemplate> <ItemTemplate>
<asp:DropDownList runat="server" id="DdlMotivoCancelacion" DataTextField="CodigoSATDescripcion" DataValueField="CveMotivoCancelacion" CssClass="select2me" Visible ="false"> <asp:DropDownList runat="server" id="DdlMotivoCancelacion" DataTextField="CodigoSATDescripcion" DataValueField="CveMotivoCancelacion" CssClass="select2me" Visible ="false">
</asp:DropDownList> </asp:DropDownList>
<asp:Literal runat="server" ID="LtlMotivoCancelacion" Text='<%# Eval("MotivoCancelacion") %>'> </asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Cancelar" Visible="true" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%"> <asp:TemplateField HeaderText="Cancelar" Visible="true" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%">

View File

@@ -5847,6 +5847,8 @@ Partial Class Bancos_IE
Else Else
GvComplementoPagos.DataSource = Nothing GvComplementoPagos.DataSource = Nothing
End If End If
GvComplementoPagos.Columns(8).Visible = False
Else Else
If CveIE > 0 Then If CveIE > 0 Then
If ObjBancos.GetComplementoPagos(-1, CveIE, -1, UsuarioActual.CveEmpresa) Then If ObjBancos.GetComplementoPagos(-1, CveIE, -1, UsuarioActual.CveEmpresa) Then
@@ -5862,13 +5864,14 @@ Partial Class Bancos_IE
' GvComplementoPagos.DataSource = ObjBancos.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "SerieFolio", "Fecha", "CveIE"}) ' GvComplementoPagos.DataSource = ObjBancos.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "SerieFolio", "Fecha", "CveIE"})
GvComplementoPagos.DataSource = ObjBancos.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "FolioFiscal", "Folio", "SerieFolio", "FechaComplemento", "Importe", "RFCReceptor", "StrEstatus", "FechaCancelacion", "Tipo", "Estatus", "CveIE", "CvePAC"}) GvComplementoPagos.DataSource = ObjBancos.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "FolioFiscal", "Folio", "SerieFolio", "FechaComplemento", "Importe", "RFCReceptor", "StrEstatus", "FechaCancelacion", "Tipo", "Estatus", "CveIE", "CvePAC", "MotivoCancelacion"})
'"CveComplementoPago","FolioFiscal","Folio","SerieFolio","FechaComplemento","Importe","RFCReceptor","StrEstatus","FechaCancelacion","Tipo,Estatus","CveIE","CvePAC" '"CveComplementoPago","FolioFiscal","Folio","SerieFolio","FechaComplemento","Importe","RFCReceptor","StrEstatus","FechaCancelacion","Tipo,Estatus","CveIE","CvePAC"
End If End If
End If End If
GvComplementoPagos.Columns(8).Visible = True
End If End If
ObjBancos.Dispose() ObjBancos.Dispose()
@@ -5904,6 +5907,12 @@ Partial Class Bancos_IE
e.Row.FCDropDownList("DdlMotivoCancelacion").Visible = False e.Row.FCDropDownList("DdlMotivoCancelacion").Visible = False
End If End If
If e.Row.DataKey("Estatus").ToEntero = 2 Then
e.Row.FCLiteral("LtlMotivoCancelacion").Visible = True
Else
e.Row.FCDropDownList("DdlMotivoCancelacion").Visible = False
End If
ElseIf e.Row.DataKey("Tipo") = "Egs" Then ElseIf e.Row.DataKey("Tipo") = "Egs" Then
e.Row.Cells(3).Text = String.Format("<a class=""texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class=""fa fa-file-code-o""></i></a>", Encripta(String.Format("OP=Fact&EXT=xml&CveFactura={0}&RFC={1}", e.Row.DBCampo("CveFactura"), e.Row.DBCampo(("RFCde").ToString.Replace("&", "%26%"))))) e.Row.Cells(3).Text = String.Format("<a class=""texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class=""fa fa-file-code-o""></i></a>", Encripta(String.Format("OP=Fact&EXT=xml&CveFactura={0}&RFC={1}", e.Row.DBCampo("CveFactura"), e.Row.DBCampo(("RFCde").ToString.Replace("&", "%26%")))))
@@ -6676,7 +6685,7 @@ Partial Class Bancos_IE
If ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then If ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
If ObjBanco.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse) Then If ObjBanco.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
Alert("El complemento se cancelo correctamente.") Alert("El complemento se cancelo correctamente.")
End If End If

BIN
Bin/BarcodeStandard.dll Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -6899,24 +6899,34 @@ Partial Class Compras_Compras
Dim DiferenciaDevolucion As Decimal = importeMovimiento - TotalRealDevolucion 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 CveSubProyecto69 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", "CveSubProyecto > 0 ").ToEntero
Dim CveClasificacion69 As Integer = TmpDT.FiltroPrimeroValor("CveClasificacion", "CveClasificacion > 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 ErrorPrepoliza = True
End If End If
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
End If End If

View File

@@ -261,8 +261,8 @@ Partial Class PopUpVerFactura
Camion = String.Format("{0} {1}", row("CamEspecificacion"), row("CamAnio")) Camion = String.Format("{0} {1}", row("CamEspecificacion"), row("CamAnio"))
Rem1Placa = row("Rem1Placa").ToString() Rem1Placa = row("Rem1Placa").ToString()
NoFactura = row("NoFactura").ToString() NoFactura = row("NoFactura").ToString()
Remolque1 = String.Format("{0} ", row("Rem1Especificacion"), row("Rem1Anio")) Remolque1 = String.Format("{0} ", row("NumeroTrailer"), row("Rem1Anio"))
Mercado = If(row("AgenciaAduanalUSA").ToString() = "2", "Extranjero", "Nacional") Mercado = If(row("CveDestino").ToString() = "2", "Extranjero", "Nacional")
NumeroTrailer = String.Format("No. {0}", row("NumeroTrailer").ToString()) NumeroTrailer = String.Format("No. {0}", row("NumeroTrailer").ToString())
@@ -394,11 +394,12 @@ Partial Class PopUpVerFactura
NoCajas = row("NoCajas").ToString() NoCajas = row("NoCajas").ToString()
Fecha = String.Format("{0:MMM dd}", row("Fecha")).Replace(".", "").ToUpper() Fecha = String.Format("{0:MMM dd}", row("Fecha")).Replace(".", "").ToUpper()
CvetypeImpresion = row("CvetypeImpresion").ToString().ToEntero() 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 If
End Using End Using
Dim params As New List(Of ReportParameter) Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("Tamano", Tamano)) params.Add(New ReportParameter("Tamano", Tamano))
params.Add(New ReportParameter("noPallet", noPallet)) params.Add(New ReportParameter("noPallet", noPallet))
params.Add(New ReportParameter("FormatoImpresion", FormatoImpresion)) 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("Cultivo", If(CvetypeImpresion = 2, Cultivoingles, Cultivo)))
params.Add(New ReportParameter("Envase", If(CvetypeImpresion = 2, "PLU 4062", Envase))) params.Add(New ReportParameter("Envase", If(CvetypeImpresion = 2, "PLU 4062", Envase)))
Dim tablaReporte As New DataTable Dim tablaReporte As New DataTable
tablaReporte.Columns.Add(New DataColumn("Codigo", GetType(String))) tablaReporte.Columns.Add(New DataColumn("Codigo", GetType(String)))
tablaReporte.Rows.Add(tablaReporte.NewRow) tablaReporte.Rows.Add(tablaReporte.NewRow)
tablaReporte.Rows.Add(tablaReporte.NewRow) tablaReporte.Rows.Add(tablaReporte.NewRow)
Dim lrds As New List(Of ReportDataSource) 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} Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = tablaReporte}
lrds.Add(rds) lrds.Add(rds)
'"Empresas/Grales/Formatos/EquiposGPS.rdlc" '"Empresas/Grales/Formatos/EquiposGPS.rdlc"
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc" '"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
Dim ruta As String = "GPS/PalletEtiquetaCaja.rdlc" Dim ruta As String = "GPS/PalletEtiquetaCaja.rdlc"
@@ -987,7 +1016,7 @@ Partial Class PopUpVerFactura
Private Sub ImprimeFormatoCartaPorte(CveMovimiento As Integer) Private Sub ImprimeFormatoCartaPorte(CveMovimiento As Integer)
If CveMovimiento > 0 Then If CveMovimiento > 0 Then
Dim ObjInv As New ClsInventarios Dim ObjInv As New ClsInventarios
Dim ObjAcar As New ClsAcarreos
Dim SerieFolio As String = "" Dim SerieFolio As String = ""
Dim DomicilioSucursal As String = "" Dim DomicilioSucursal As String = ""
Dim LugarFecha As String = "" Dim LugarFecha As String = ""
@@ -1008,6 +1037,10 @@ Partial Class PopUpVerFactura
Dim Ciudad As String = "" Dim Ciudad As String = ""
Dim Licencia As String = "" Dim Licencia As String = ""
Dim SBDireccionO As New StringBuilder() Dim SBDireccionO As New StringBuilder()
Dim SBDireccionD As New StringBuilder() Dim SBDireccionD As New StringBuilder()
@@ -1022,9 +1055,8 @@ Partial Class PopUpVerFactura
Destino = Dr("AlmacenDestino").ToString Destino = Dr("AlmacenDestino").ToString
Observaciones = Dr("Observaciones").ToString Observaciones = Dr("Observaciones").ToString
CveChofer = Dr("CveChofer").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 Placa = Dr("Traslado_Placa").ToString
Recibio = Dr("Recibio").ToString Recibio = Dr("Recibio").ToString
FechaEntrega = Dr("FechaEntrega").ToString FechaEntrega = Dr("FechaEntrega").ToString
@@ -1058,10 +1090,18 @@ Partial Class PopUpVerFactura
Telefono = Dr("Telefono1").ToString Telefono = Dr("Telefono1").ToString
Ciudad = Dr("Ciudad").ToString Ciudad = Dr("Ciudad").ToString
Licencia = Dr("Licencia").ToString Licencia = Dr("Licencia").ToString
Chofer = Dr("Chofer").ToString
Placa = Dr("Placa").ToString
EspecifUnidad = Dr("Especificacion").ToString
End If End If
End If End If
End If End If
ObjAcar.Dispose()
Dim Dt As DataTable = Nothing Dim Dt As DataTable = Nothing
If ObjInv.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then 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) 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), ""))) '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 If Imagen.Exists Then
Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName)
params.Add(New ReportParameter("LogoPath", LogoRuta)) params.Add(New ReportParameter("LogoPath", LogoRuta))
Else Else
params.Add(New ReportParameter("LogoPath", "")) params.Add(New ReportParameter("LogoPath", ""))
End If End If
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
@@ -1100,6 +1141,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("Destinatario", "")) params.Add(New ReportParameter("Destinatario", ""))
params.Add(New ReportParameter("Observaciones", Observaciones)) params.Add(New ReportParameter("Observaciones", Observaciones))
params.Add(New ReportParameter("Chofer", Chofer)) params.Add(New ReportParameter("Chofer", Chofer))
params.Add(New ReportParameter("ResponsableRecibio", Chofer))
params.Add(New ReportParameter("Placa", Placa)) params.Add(New ReportParameter("Placa", Placa))
params.Add(New ReportParameter("Recibio", Recibio)) params.Add(New ReportParameter("Recibio", Recibio))
params.Add(New ReportParameter("FechaEntrega", FechaEntrega.ToDateTime().ToString("dd/MM/yyyy"))) 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("Telefono", Telefono))
params.Add(New ReportParameter("Ciudad", Ciudad)) params.Add(New ReportParameter("Ciudad", Ciudad))
params.Add(New ReportParameter("Licencia", Licencia)) params.Add(New ReportParameter("Licencia", Licencia))
ImprimirPDF("Empresas/Grales/Formatos/CartaPorte.rdlc", Dt, params, String.Format("Carta Porte -{0}", Now.ToDateTime.ToShortDateString)) ImprimirPDF("Empresas/Grales/Formatos/CartaPorte.rdlc", Dt, params, String.Format("Carta Porte -{0}", Now.ToDateTime.ToShortDateString))
End If End If
End If End If

File diff suppressed because it is too large Load Diff

View File

@@ -1224,7 +1224,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>=Fields!Cantidad.Value * Fields!PU.Value</Value> <Value>=(Fields!Cantidad.Value * Fields!PU.Value) - Fields!Descuento.Value</Value>
<Style> <Style>
<FontFamily>Myriad Pro</FontFamily> <FontFamily>Myriad Pro</FontFamily>
<FontSize>9pt</FontSize> <FontSize>9pt</FontSize>

View File

@@ -784,14 +784,6 @@
</Paragraph> </Paragraph>
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun>
<Value>Moneda</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>9.16pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun> <TextRun>
<Value>Forma de pago: </Value> <Value>Forma de pago: </Value>
<Style> <Style>

View File

@@ -2,6 +2,13 @@
<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition"> <Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition">
<AutoRefresh>0</AutoRefresh> <AutoRefresh>0</AutoRefresh>
<DataSources> <DataSources>
<DataSource Name="dsImagenes">
<ConnectionProperties>
<DataProvider>System.Data.DataSet</DataProvider>
<ConnectString>/* Local Connection */</ConnectString>
</ConnectionProperties>
<rd:DataSourceID>06ae5329-8ff5-42b5-b7f4-6d68e5186421</rd:DataSourceID>
</DataSource>
<DataSource Name="DataSet"> <DataSource Name="DataSet">
<ConnectionProperties> <ConnectionProperties>
<DataProvider>System.Data.DataSet</DataProvider> <DataProvider>System.Data.DataSet</DataProvider>
@@ -11,6 +18,26 @@
</DataSource> </DataSource>
</DataSources> </DataSources>
<DataSets> <DataSets>
<DataSet Name="dsImagenes">
<Query>
<DataSourceName>dsImagenes</DataSourceName>
<CommandText>/* Local Query */</CommandText>
</Query>
<Fields>
<Field Name="ImagenByte">
<DataField>ImagenByte</DataField>
<rd:TypeName>System.Byte[]</rd:TypeName>
</Field>
</Fields>
<rd:DataSetInfo>
<rd:DataSetName>dsImagenes</rd:DataSetName>
<rd:SchemaPath>C:\Users\Caudillo\Documents\Visual Studio 2013\WebSites\WebSite3\App_Code\DataSet.xsd</rd:SchemaPath>
<rd:TableName>dtImagenes</rd:TableName>
<rd:TableAdapterFillMethod />
<rd:TableAdapterGetDataMethod />
<rd:TableAdapterName />
</rd:DataSetInfo>
</DataSet>
<DataSet Name="DataSet1"> <DataSet Name="DataSet1">
<Query> <Query>
<DataSourceName>DataSet</DataSourceName> <DataSourceName>DataSet</DataSourceName>
@@ -72,7 +99,7 @@
</TablixColumns> </TablixColumns>
<TablixRows> <TablixRows>
<TablixRow> <TablixRow>
<Height>0.6cm</Height> <Height>0.2825cm</Height>
<TablixCells> <TablixCells>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
@@ -667,7 +694,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells> </TablixCells>
</TablixRow> </TablixRow>
<TablixRow> <TablixRow>
<Height>0.52062cm</Height> <Height>0.4677cm</Height>
<TablixCells> <TablixCells>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
@@ -856,7 +883,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells> </TablixCells>
</TablixRow> </TablixRow>
<TablixRow> <TablixRow>
<Height>0.52062cm</Height> <Height>0.4677cm</Height>
<TablixCells> <TablixCells>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
@@ -953,7 +980,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells> </TablixCells>
</TablixRow> </TablixRow>
<TablixRow> <TablixRow>
<Height>0.54708cm</Height> <Height>0.4677cm</Height>
<TablixCells> <TablixCells>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
@@ -1036,7 +1063,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells> </TablixCells>
</TablixRow> </TablixRow>
<TablixRow> <TablixRow>
<Height>0.6cm</Height> <Height>0.46771cm</Height>
<TablixCells> <TablixCells>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
@@ -1197,7 +1224,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells> </TablixCells>
</TablixRow> </TablixRow>
<TablixRow> <TablixRow>
<Height>0.6cm</Height> <Height>0.46771cm</Height>
<TablixCells> <TablixCells>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
@@ -1392,7 +1419,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells> </TablixCells>
</TablixRow> </TablixRow>
<TablixRow> <TablixRow>
<Height>0.41479cm</Height> <Height>0.3258cm</Height>
<TablixCells> <TablixCells>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
@@ -1475,7 +1502,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells> </TablixCells>
</TablixRow> </TablixRow>
<TablixRow> <TablixRow>
<Height>0.09729cm</Height> <Height>0.07938cm</Height>
<TablixCells> <TablixCells>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
@@ -1820,7 +1847,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells> </TablixCells>
</TablixRow> </TablixRow>
<TablixRow> <TablixRow>
<Height>0.49417cm</Height> <Height>0.38834cm</Height>
<TablixCells> <TablixCells>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
@@ -1963,7 +1990,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells> </TablixCells>
</TablixRow> </TablixRow>
<TablixRow> <TablixRow>
<Height>0.46771cm</Height> <Height>0.36188cm</Height>
<TablixCells> <TablixCells>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
@@ -2168,7 +2195,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells> </TablixCells>
</TablixRow> </TablixRow>
<TablixRow> <TablixRow>
<Height>0.46771cm</Height> <Height>0.41479cm</Height>
<TablixCells> <TablixCells>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
@@ -2315,7 +2342,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells> </TablixCells>
</TablixRow> </TablixRow>
<TablixRow> <TablixRow>
<Height>0.6cm</Height> <Height>0.52062cm</Height>
<TablixCells> <TablixCells>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
@@ -2456,13 +2483,14 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells> </TablixCells>
</TablixRow> </TablixRow>
<TablixRow> <TablixRow>
<Height>1.18209cm</Height> <Height>0.99688cm</Height>
<TablixCells> <TablixCells>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
<Image Name="Image2"> <Image Name="Image4">
<Source>Embedded</Source> <Source>Database</Source>
<Value>CodBarr</Value> <Value>=First(Fields!ImagenByte.Value, "dsImagenes")</Value>
<MIMEType>image/png</MIMEType>
<Sizing>FitProportional</Sizing> <Sizing>FitProportional</Sizing>
<Style> <Style>
<Border> <Border>
@@ -2479,9 +2507,10 @@ KM12 HERMOSILLO, SONORA</Value>
<TablixCell /> <TablixCell />
<TablixCell> <TablixCell>
<CellContents> <CellContents>
<Image Name="Image3"> <Image Name="Image5">
<Source>Embedded</Source> <Source>Database</Source>
<Value>CodBarr</Value> <Value>=First(Fields!ImagenByte.Value, "dsImagenes")</Value>
<MIMEType>image/png</MIMEType>
<Sizing>FitProportional</Sizing> <Sizing>FitProportional</Sizing>
<Style> <Style>
<Border> <Border>
@@ -2490,6 +2519,7 @@ KM12 HERMOSILLO, SONORA</Value>
</Style> </Style>
</Image> </Image>
<ColSpan>5</ColSpan> <ColSpan>5</ColSpan>
<rd:Selected>true</rd:Selected>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell /> <TablixCell />
@@ -2499,7 +2529,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells> </TablixCells>
</TablixRow> </TablixRow>
<TablixRow> <TablixRow>
<Height>0.49417cm</Height> <Height>0.36188cm</Height>
<TablixCells> <TablixCells>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
@@ -2580,7 +2610,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells> </TablixCells>
</TablixRow> </TablixRow>
<TablixRow> <TablixRow>
<Height>1.12917cm</Height> <Height>1.0498cm</Height>
<TablixCells> <TablixCells>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
@@ -2981,9 +3011,10 @@ Produce of MX.</Value>
</TablixMember> </TablixMember>
</TablixMembers> </TablixMembers>
</TablixRowHierarchy> </TablixRowHierarchy>
<DataSetName>DataSet1</DataSetName>
<Top>0.07228cm</Top> <Top>0.07228cm</Top>
<Left>0.05625cm</Left> <Left>0.05625cm</Left>
<Height>10.19917cm</Height> <Height>8.58414cm</Height>
<Width>10.52136cm</Width> <Width>10.52136cm</Width>
<Style> <Style>
<Border> <Border>
@@ -2992,7 +3023,7 @@ Produce of MX.</Value>
</Style> </Style>
</Tablix> </Tablix>
</ReportItems> </ReportItems>
<Height>4.23096in</Height> <Height>3.53304in</Height>
<Style /> <Style />
</Body> </Body>
<Width>4.19342in</Width> <Width>4.19342in</Width>

View File

@@ -19,6 +19,14 @@ Partial Class OC
ViewState("CveEmpresaActual") = value ViewState("CveEmpresaActual") = value
End Set End Set
End Property End Property
Private Property EmpresaActualOC As Empresa
Get
EmpresaActualOC = If(IsNothing(ViewState("EmpresaActualOC")), Nothing, DirectCast(ViewState("EmpresaActualOC"), Empresa))
End Get
Set(value As Empresa)
ViewState("EmpresaActualOC") = value
End Set
End Property
Private Property CveUsuarioAsignado As Integer Private Property CveUsuarioAsignado As Integer
Get Get
Return If(IsNothing(ViewState("CveUsuarioAsignado")), -1, ViewState("CveUsuarioAsignado").ToString.ToEntero) Return If(IsNothing(ViewState("CveUsuarioAsignado")), -1, ViewState("CveUsuarioAsignado").ToString.ToEntero)
@@ -584,6 +592,9 @@ Partial Class OC
CveProveedorOriginal = -1 CveProveedorOriginal = -1
'MODALIDAD MULTIEMPRESA 'MODALIDAD MULTIEMPRESA
CveEmpresaActual = UsuarioActual.CveEmpresa CveEmpresaActual = UsuarioActual.CveEmpresa
If CveEmpresaActual > 0 Then
EmpresaActualOC = UsuarioActual.Empresa
End If
CargaEstatusUsuariosClasificaciones() CargaEstatusUsuariosClasificaciones()
TxtObsPS.Attributes.Add("maxlength", "750") TxtObsPS.Attributes.Add("maxlength", "750")
@@ -1275,6 +1286,9 @@ Partial Class OC
If objOC.GetOC(pCveOrdenCompra, CveEmpresaActual, CveUsuario:=UsuarioActual.CveUsuario) AndAlso objOC.DtResultados.Rows.Count > 0 Then If objOC.GetOC(pCveOrdenCompra, CveEmpresaActual, CveUsuario:=UsuarioActual.CveUsuario) AndAlso objOC.DtResultados.Rows.Count > 0 Then
CveEmpresaActual = objOC.CveEmpresa CveEmpresaActual = objOC.CveEmpresa
If CveEmpresaActual > 0 Then
EmpresaActualOC = CreaObjetoEmpresa(CveEmpresaActual)
End If
InicializarValores() InicializarValores()
ViewState("CveOrdenCompra") = pCveOrdenCompra ViewState("CveOrdenCompra") = pCveOrdenCompra
@@ -4956,6 +4970,27 @@ Partial Class OC
End Sub End Sub
Private Function CreaObjetoEmpresa(CveEmpresa As Integer) As Empresa
Dim Retorno As Empresa = Nothing
Dim ObjEmpresa As New ClsSisEmpresas()
If ObjEmpresa.GetEmpresas(CveEmpresa, "-1", "-1", "-1", "-1") Then
If ObjEmpresa.GetEmpresasFuncionalidades(CveEmpresa) Then
Dim dttmp As Data.DataTable = ObjEmpresa.DtResultados
Dim EmpresasFuncionalidades As New HybridDictionary
For Each Row As Data.DataRow In dttmp.Rows
EmpresasFuncionalidades.Add(Convert.ToInt32(Row("CveFuncionalidad")), Row("Valor").ToString)
Next
ObjEmpresa.Empresa.SetFuncionalidades(EmpresasFuncionalidades)
End If
Retorno = ObjEmpresa.Empresa
End If
ObjEmpresa.Dispose()
Return Retorno
End Function
#Region " GUARDA DIRECTO " #Region " GUARDA DIRECTO "
Private Sub GuardaBitacora(Optional EsCotizacion As Boolean = False) Private Sub GuardaBitacora(Optional EsCotizacion As Boolean = False)
@@ -4974,7 +5009,12 @@ Partial Class OC
If ObjEventoBitacora.AddEventoBitacora(descripcion, String.Format("{0}", FileExtension), UsuarioActual.CveUsuario, CveEmpresaActual, CveOC:=CveOrdenCompra, Prioridad:=Prioridad) Then If ObjEventoBitacora.AddEventoBitacora(descripcion, String.Format("{0}", FileExtension), UsuarioActual.CveUsuario, CveEmpresaActual, CveOC:=CveOrdenCompra, Prioridad:=Prioridad) Then
If Filename <> "" Then If Filename <> "" Then
Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", CveEmpresaActual)) If EmpresaActualOC IsNot Nothing Then
Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}\OI", EmpresaActualOC.Ruta), ConcatenarDirectorioBase:=False)
Else
Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", CveEmpresaActual))
End If
End If End If
GvEB.DataSource = ObjEventoBitacora.DtResultados GvEB.DataSource = ObjEventoBitacora.DtResultados
@@ -5061,7 +5101,11 @@ Partial Class OC
End If End If
If Filename <> "" Then If Filename <> "" Then
Filename.FilesMove(String.Format("OI{0}{1}", UsuarioActual.CveUsuario, DtDetalle.Rows.Count), String.Format("Empresas\{0}\OI\Temp", CveEmpresaActual)) If EmpresaActualOC IsNot Nothing Then
Filename.FilesMove(String.Format("OI{0}{1}", UsuarioActual.CveUsuario, DtDetalle.Rows.Count), String.Format("{0}OI\Temp", EmpresaActualOC.Ruta), ConcatenarDirectorioBase:=False)
Else
Filename.FilesMove(String.Format("OI{0}{1}", UsuarioActual.CveUsuario, DtDetalle.Rows.Count), String.Format("Empresas\{0}\OI\Temp", CveEmpresaActual))
End If
End If End If

View File

@@ -127,9 +127,10 @@ Partial Class RH_RepPersonalInconsistencias
End Sub End Sub
Protected Sub CargaDatos() Protected Sub CargaDatos()
Dim ObjAnomalias As New ClsRH Using ObjAnomalias As New ClsRH
If ObjAnomalias.GetRepPersonalInconsistencias(UsuarioActual.CveEmpresa.ToEntero) Then
If ObjAnomalias.GetRepPersonalInconsistencias(UsuarioActual.CveEmpresa.ToEntero) Then
'DSContratosProximosAVencer = ObjAnomalias.DtResultados 'DSContratosProximosAVencer = ObjAnomalias.DtResultados
'DSContratosProximosAVencer.Tables.Add(ObjAnomalias.DSResultados().Tables(0)) 'DSContratosProximosAVencer.Tables.Add(ObjAnomalias.DSResultados().Tables(0))
'DSContratosProximosAVencer.Tables.Add(ObjAnomalias.DSResultados().Tables(1)) 'DSContratosProximosAVencer.Tables.Add(ObjAnomalias.DSResultados().Tables(1))
@@ -173,20 +174,20 @@ Partial Class RH_RepPersonalInconsistencias
LbTotalAnomalias.Text = "Total de Anomalías: " + ObjAnomalias.DSResultados().Tables(1).Rows.Count.ToString LbTotalAnomalias.Text = "Total de Anomalías: " + ObjAnomalias.DSResultados().Tables(1).Rows.Count.ToString
LbTotalCumpleañeros.Text = "Total de Cumpleañeros: " + ObjAnomalias.DSResultados().Tables(2).Rows.Count.ToString LbTotalCumpleañeros.Text = "Total de Cumpleañeros: " + ObjAnomalias.DSResultados().Tables(2).Rows.Count.ToString
CargaGrid("")
End If End If
CargaGrid("")
ObjAnomalias.Dispose() End Using
Dim ObjAF As New ClsAF() Using ObjAF As New ClsAF()
If ObjAF.GetLicenciasVencidas(-1, -1, UsuarioActual.CveEmpresa, Estatus:=1) Then If ObjAF.GetLicenciasVencidas(-1, -1, UsuarioActual.CveEmpresa, Estatus:=1) Then
GvLicencias.DataSource = ObjAF.DtResultados.FiltraParametros("CveEstatusPersonal = 1") GvLicencias.DataSource = ObjAF.DtResultados.FiltraParametros("CveEstatusPersonal = 1")
Else Else
GvLicencias.DataSource = Nothing GvLicencias.DataSource = Nothing
End If End If
ObjAF.Dispose() End Using
UpLicenciasVencidas.Update() UpLicenciasVencidas.Update()
GvLicencias.DataBind() GvLicencias.DataBind()

View File

@@ -4434,7 +4434,7 @@
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvAcum" Width="100%" runat="server" GridLines="None" <asp:GridView ID="GvAcum" Width="100%" runat="server" GridLines="None"
DataKeyNames="CveMovto, CveCliente,Cantidad,CvePSCargo,CveTamaño,Puntos,ImporteCargo,ImporteBonificacion,Cargo,Bonificacion,ImporteCompra,CveConcepto,CveVenta,Observaciones,CveUsuario,FechaIng,FacturadoCargo,FacturadoBonificacion,CveSubProyecto" DataKeyNames="CveMovto, CveCliente,Cantidad,CvePSCargo,CveTamaño,Puntos,ImporteCargo,ImporteBonificacion,Cargo,Bonificacion,ImporteCompra,CveConcepto,CveVenta,Observaciones,CveUsuario,FechaIng,FacturadoCargo,FacturadoBonificacion,CveSubProyecto,TipoEstatus"
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False"> AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
<Columns> <Columns>

View File

@@ -9420,7 +9420,7 @@ Partial Class Clientes
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DataKey("CveConcepto").ToEntero() = 1 Then If e.Row.DataKey("CveConcepto").ToEntero() = 1 AndAlso e.Row.DataKey("TipoEstatus").ToEntero() <> 5 Then
Dim FacturadoCargo As Boolean = Boolean.Parse(e.Row.DataKey("FacturadoCargo")) Dim FacturadoCargo As Boolean = Boolean.Parse(e.Row.DataKey("FacturadoCargo"))
Dim FacturadoBonificacion As Boolean = Boolean.Parse(e.Row.DataKey("FacturadoBonificacion")) Dim FacturadoBonificacion As Boolean = Boolean.Parse(e.Row.DataKey("FacturadoBonificacion"))

View File

@@ -1286,6 +1286,7 @@ Partial Class PV
If UsuarioActual.Empresa.Funcionalidad(569) = "1" Then If UsuarioActual.Empresa.Funcionalidad(569) = "1" Then
DdlTipoComprobante.Items.Add(New ListItem("Remisión", "Rem")) DdlTipoComprobante.Items.Add(New ListItem("Remisión", "Rem"))
DdlTipoComprobante.SelectedValueExist("Rem") DdlTipoComprobante.SelectedValueExist("Rem")
DdlTipoComprobante_SelectedIndexChanged(DdlTipoComprobante, EventArgs.Empty)
End If End If
DdlTipoDefecto.Width = New Unit(260%) DdlTipoDefecto.Width = New Unit(260%)
@@ -5964,7 +5965,7 @@ Partial Class PV
Case 1 'CREDITO Case 1 'CREDITO
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
Case 2 'CONTADO Case 2 'CONTADO
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem") Then If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant") Then
DivContado.Visible = True DivContado.Visible = True
TxtImporteContado.Text = TxtTotal.Text TxtImporteContado.Text = TxtTotal.Text
End If End If
@@ -6165,6 +6166,11 @@ Partial Class PV
Retorno = True Retorno = True
End If End If
If DtPagos IsNot Nothing AndAlso DtPagos.SUM("Importe").ToString.ToDecimal() > 0 AndAlso DdlTipoComprobante.SelectedValue = "Rem" Then
Alert("Los pagos no deben ser aplicados a una remisión.", TipoMensaje.MsgAdvertencia)
Retorno = True
End If
Return Retorno Return Retorno
End Function End Function
@@ -7315,12 +7321,10 @@ Partial Class PV
TxtPrecio.Text = TxtPrecio.Text TxtPrecio.Text = TxtPrecio.Text
TxtObsPS.Text = "Descuento por garantía" TxtObsPS.Text = "Descuento por garantía"
Else Else
'For Each Gvr As GridViewRow In GvRecepcionUsados.Rows If TmpDTAjustes IsNot Nothing Then
' If Gvr.RowType = DataControlRowType.DataRow Then TmpDTAjustes.Clear()
' Gvr.FCTextBox("TxtCantidad").Text = "" End If
' Gvr.FCTextBox("TxtCantidad").Enabled = True TxtObsPS.Text = TxtObsPS.Text.Replace("Descuento por garantía", "")
' End If
'Next
DdlRecepcionUsados.SelectedValueExist("-1") DdlRecepcionUsados.SelectedValueExist("-1")
DdlRecepcionUsados.Enabled = True DdlRecepcionUsados.Enabled = True

View File

@@ -6602,6 +6602,30 @@ Partial Class Ventas
LnkOCs.Visible = False LnkOCs.Visible = False
End If End If
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
Dim Autorizacion As Integer = 0
Dim ObjVentas As New ClsVentas
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedor.SelectedValue.ToEntero, "Ing", CveEstatus:=1) Then
Dim RowAutorizacion As DataRow = Nothing
'SI TIENE DIAS VENCIDOS BUSCAR POR TIPO VENCIMIENTO
If TieneDiasVencidos Then
RowAutorizacion = ObjVentas.DtResultados.FiltroPrimero($"TipoAutorizacion IN(1,2) AND CveVenta IS NULL AND CveTipoDocumento='Ing'", Orderby:="Importe DESC")
Else
RowAutorizacion = ObjVentas.DtResultados.FiltroPrimero($"TipoAutorizacion = 1 AND CveVenta IS NULL AND CveTipoDocumento='Ing'", Orderby:="Importe DESC")
End If
If RowAutorizacion IsNot Nothing Then
Autorizacion = RowAutorizacion("CveAutorizacion").ToString().ToEntero()
End If
End If
ObjVentas.Dispose()
'SI NO TIENE AUTORIZACION, MANTIENE EL BLOQUEO POR CONDICIONES DE CREDITO
If Autorizacion > 0 Then
BtnsFacturar.Visible = True
End If
End If
Else Else
@@ -6620,6 +6644,32 @@ Partial Class Ventas
DdlTipoComprobante.SelectedValueExistInsert("Cot", "Cotización") DdlTipoComprobante.SelectedValueExistInsert("Cot", "Cotización")
End If End If
TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString
If EsCotizacion AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
Dim Autorizacion As Integer = 0
Dim ObjVentas As New ClsVentas
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedor.SelectedValue.ToEntero, "Ing", CveEstatus:=1) Then
Dim RowAutorizacion As DataRow = Nothing
'SI TIENE DIAS VENCIDOS BUSCAR POR TIPO VENCIMIENTO
If TieneDiasVencidos Then
RowAutorizacion = ObjVentas.DtResultados.FiltroPrimero($"TipoAutorizacion IN(1,2) AND CveVenta IS NULL AND CveTipoDocumento='Ing'", Orderby:="Importe DESC")
Else
RowAutorizacion = ObjVentas.DtResultados.FiltroPrimero($"TipoAutorizacion = 1 AND CveVenta IS NULL AND CveTipoDocumento='Ing'", Orderby:="Importe DESC")
End If
If RowAutorizacion IsNot Nothing Then
Autorizacion = RowAutorizacion("CveAutorizacion").ToString().ToEntero()
End If
End If
ObjVentas.Dispose()
'SI NO TIENE AUTORIZACION, MANTIENE EL BLOQUEO POR CONDICIONES DE CREDITO
If Autorizacion > 0 Then
BtnsFacturar.Visible = True
End If
End If
End If End If
@@ -6753,10 +6803,39 @@ Partial Class Ventas
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa) Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta) Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta)
Vta.Dispose() Vta.Dispose()
If Opcion > 0 Then
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia) If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
BtnsFacturar.Visible = False Dim Autorizacion As Integer = 0
BtnGenerarRemision.Visible = False
Dim ObjVentas As New ClsVentas
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedor.SelectedValue.ToEntero, "Ing", CveEstatus:=1) Then
Dim RowAutorizacion As DataRow = Nothing
'SI TIENE DIAS VENCIDOS BUSCAR POR TIPO VENCIMIENTO
If TieneDiasVencidos Then
RowAutorizacion = ObjVentas.DtResultados.FiltroPrimero($"TipoAutorizacion IN(1,2) AND CveVenta IS NULL AND CveTipoDocumento='Ing'", Orderby:="Importe DESC")
Else
RowAutorizacion = ObjVentas.DtResultados.FiltroPrimero($"TipoAutorizacion = 1 AND CveVenta IS NULL AND CveTipoDocumento='Ing'", Orderby:="Importe DESC")
End If
If RowAutorizacion IsNot Nothing Then
Autorizacion = RowAutorizacion("CveAutorizacion").ToString().ToEntero()
End If
End If
ObjVentas.Dispose()
'SI NO TIENE AUTORIZACION, MANTIENE EL BLOQUEO POR CONDICIONES DE CREDITO
If Opcion > 0 AndAlso Autorizacion <= 0 Then
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
BtnsFacturar.Visible = False
BtnGenerarRemision.Visible = False
End If
Else
If Opcion > 0 Then
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
BtnsFacturar.Visible = False
BtnGenerarRemision.Visible = False
End If
End If End If
End If End If
End If End If

View File

@@ -3,6 +3,7 @@
<package id="AjaxControlToolkit" version="15.1.4.0" targetFramework="net461" /> <package id="AjaxControlToolkit" version="15.1.4.0" targetFramework="net461" />
<package id="AjaxControlToolkit.StaticResources" version="15.1.4.0" targetFramework="net461" /> <package id="AjaxControlToolkit.StaticResources" version="15.1.4.0" targetFramework="net461" />
<package id="Antlr" version="3.4.1.9004" targetFramework="net461" /> <package id="Antlr" version="3.4.1.9004" targetFramework="net461" />
<package id="BarcodeLib" version="2.4.0" targetFramework="net461" />
<package id="ClosedXML" version="0.95.4" targetFramework="net461" /> <package id="ClosedXML" version="0.95.4" targetFramework="net461" />
<package id="DocumentFormat.OpenXml" version="2.7.2" targetFramework="net461" /> <package id="DocumentFormat.OpenXml" version="2.7.2" targetFramework="net461" />
<package id="ExcelNumberFormat" version="1.0.10" targetFramework="net461" /> <package id="ExcelNumberFormat" version="1.0.10" targetFramework="net461" />
@@ -62,6 +63,7 @@
<package id="System.ComponentModel.Annotations" version="4.7.0" targetFramework="net461" /> <package id="System.ComponentModel.Annotations" version="4.7.0" targetFramework="net461" />
<package id="System.Data.SqlClient" version="4.8.2" targetFramework="net461" /> <package id="System.Data.SqlClient" version="4.8.2" targetFramework="net461" />
<package id="System.Diagnostics.DiagnosticSource" version="4.7.1" targetFramework="net461" /> <package id="System.Diagnostics.DiagnosticSource" version="4.7.1" targetFramework="net461" />
<package id="System.Drawing.Common" version="5.0.2" targetFramework="net461" />
<package id="System.IdentityModel.Tokens.Jwt" version="6.11.0" targetFramework="net461" /> <package id="System.IdentityModel.Tokens.Jwt" version="6.11.0" targetFramework="net461" />
<package id="System.IO.FileSystem.Primitives" version="4.0.1" targetFramework="net461" /> <package id="System.IO.FileSystem.Primitives" version="4.0.1" targetFramework="net461" />
<package id="System.IO.Packaging" version="4.0.0" targetFramework="net461" /> <package id="System.IO.Packaging" version="4.0.0" targetFramework="net461" />