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
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
DataAdapter("PA_Banc_ComplementoPagoUpdate")
@@ -1199,6 +1199,7 @@ Public Class ClsBancos
.Add("@CvePACCancelacion", SqlDbType.Int).Value = CvePACCancelacion
.Add("@FechaCancelacion", SqlDbType.Date).Value = FechaCancelacion
.Add("@SelloCancelacion", SqlDbType.VarChar).Value = SelloCancelacion
.Add("@CveSATMotivoCancelacion", SqlDbType.Int).Value = CveSATMotivoCancelacion
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.DtResultados.Rows.Count > 0 Then
Dim Dr As DataRow = ObjInv.DtResultados.Rows(0)
If Dr IsNot Nothing Then
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("PaisDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", País: {0}", Dr("PaisDestino").ToString)
End If
End If
End If
End If

View File

@@ -163,6 +163,25 @@ Public Class ClsVentas
Return Retorno
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
Dim Retorno As Boolean = False
DataAdapter("PA_VentasGetTerminal")

View File

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

View File

@@ -5847,6 +5847,8 @@ Partial Class Bancos_IE
Else
GvComplementoPagos.DataSource = Nothing
End If
GvComplementoPagos.Columns(8).Visible = False
Else
If CveIE > 0 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", "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"
End If
End If
GvComplementoPagos.Columns(8).Visible = True
End If
ObjBancos.Dispose()
@@ -5904,6 +5907,12 @@ Partial Class Bancos_IE
e.Row.FCDropDownList("DdlMotivoCancelacion").Visible = False
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
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 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.")
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
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

View File

@@ -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

File diff suppressed because it is too large Load Diff

View File

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

View File

@@ -784,14 +784,6 @@
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Moneda</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>9.16pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>Forma de pago: </Value>
<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">
<AutoRefresh>0</AutoRefresh>
<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">
<ConnectionProperties>
<DataProvider>System.Data.DataSet</DataProvider>
@@ -11,6 +18,26 @@
</DataSource>
</DataSources>
<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">
<Query>
<DataSourceName>DataSet</DataSourceName>
@@ -72,7 +99,7 @@
</TablixColumns>
<TablixRows>
<TablixRow>
<Height>0.6cm</Height>
<Height>0.2825cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
@@ -667,7 +694,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.52062cm</Height>
<Height>0.4677cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
@@ -856,7 +883,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.52062cm</Height>
<Height>0.4677cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
@@ -953,7 +980,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.54708cm</Height>
<Height>0.4677cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
@@ -1036,7 +1063,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.6cm</Height>
<Height>0.46771cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
@@ -1197,7 +1224,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.6cm</Height>
<Height>0.46771cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
@@ -1392,7 +1419,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.41479cm</Height>
<Height>0.3258cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
@@ -1475,7 +1502,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.09729cm</Height>
<Height>0.07938cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
@@ -1820,7 +1847,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.49417cm</Height>
<Height>0.38834cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
@@ -1963,7 +1990,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.46771cm</Height>
<Height>0.36188cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
@@ -2168,7 +2195,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.46771cm</Height>
<Height>0.41479cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
@@ -2315,7 +2342,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.6cm</Height>
<Height>0.52062cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
@@ -2456,13 +2483,14 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>1.18209cm</Height>
<Height>0.99688cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Image Name="Image2">
<Source>Embedded</Source>
<Value>CodBarr</Value>
<Image Name="Image4">
<Source>Database</Source>
<Value>=First(Fields!ImagenByte.Value, "dsImagenes")</Value>
<MIMEType>image/png</MIMEType>
<Sizing>FitProportional</Sizing>
<Style>
<Border>
@@ -2479,9 +2507,10 @@ KM12 HERMOSILLO, SONORA</Value>
<TablixCell />
<TablixCell>
<CellContents>
<Image Name="Image3">
<Source>Embedded</Source>
<Value>CodBarr</Value>
<Image Name="Image5">
<Source>Database</Source>
<Value>=First(Fields!ImagenByte.Value, "dsImagenes")</Value>
<MIMEType>image/png</MIMEType>
<Sizing>FitProportional</Sizing>
<Style>
<Border>
@@ -2490,6 +2519,7 @@ KM12 HERMOSILLO, SONORA</Value>
</Style>
</Image>
<ColSpan>5</ColSpan>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
<TablixCell />
@@ -2499,7 +2529,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.49417cm</Height>
<Height>0.36188cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
@@ -2580,7 +2610,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>1.12917cm</Height>
<Height>1.0498cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
@@ -2981,9 +3011,10 @@ Produce of MX.</Value>
</TablixMember>
</TablixMembers>
</TablixRowHierarchy>
<DataSetName>DataSet1</DataSetName>
<Top>0.07228cm</Top>
<Left>0.05625cm</Left>
<Height>10.19917cm</Height>
<Height>8.58414cm</Height>
<Width>10.52136cm</Width>
<Style>
<Border>
@@ -2992,7 +3023,7 @@ Produce of MX.</Value>
</Style>
</Tablix>
</ReportItems>
<Height>4.23096in</Height>
<Height>3.53304in</Height>
<Style />
</Body>
<Width>4.19342in</Width>

View File

@@ -19,6 +19,14 @@ Partial Class OC
ViewState("CveEmpresaActual") = value
End Set
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
Get
Return If(IsNothing(ViewState("CveUsuarioAsignado")), -1, ViewState("CveUsuarioAsignado").ToString.ToEntero)
@@ -584,6 +592,9 @@ Partial Class OC
CveProveedorOriginal = -1
'MODALIDAD MULTIEMPRESA
CveEmpresaActual = UsuarioActual.CveEmpresa
If CveEmpresaActual > 0 Then
EmpresaActualOC = UsuarioActual.Empresa
End If
CargaEstatusUsuariosClasificaciones()
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
CveEmpresaActual = objOC.CveEmpresa
If CveEmpresaActual > 0 Then
EmpresaActualOC = CreaObjetoEmpresa(CveEmpresaActual)
End If
InicializarValores()
ViewState("CveOrdenCompra") = pCveOrdenCompra
@@ -4956,6 +4970,27 @@ Partial Class OC
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 "
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 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
GvEB.DataSource = ObjEventoBitacora.DtResultados
@@ -5061,7 +5101,11 @@ Partial Class OC
End If
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

View File

@@ -127,9 +127,10 @@ Partial Class RH_RepPersonalInconsistencias
End Sub
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.Tables.Add(ObjAnomalias.DSResultados().Tables(0))
'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
LbTotalCumpleañeros.Text = "Total de Cumpleañeros: " + ObjAnomalias.DSResultados().Tables(2).Rows.Count.ToString
CargaGrid("")
End If
CargaGrid("")
ObjAnomalias.Dispose()
End Using
Dim ObjAF As New ClsAF()
If ObjAF.GetLicenciasVencidas(-1, -1, UsuarioActual.CveEmpresa, Estatus:=1) Then
GvLicencias.DataSource = ObjAF.DtResultados.FiltraParametros("CveEstatusPersonal = 1")
Using ObjAF As New ClsAF()
If ObjAF.GetLicenciasVencidas(-1, -1, UsuarioActual.CveEmpresa, Estatus:=1) Then
GvLicencias.DataSource = ObjAF.DtResultados.FiltraParametros("CveEstatusPersonal = 1")
Else
GvLicencias.DataSource = Nothing
End If
ObjAF.Dispose()
Else
GvLicencias.DataSource = Nothing
End If
End Using
UpLicenciasVencidas.Update()
GvLicencias.DataBind()

View File

@@ -4434,7 +4434,7 @@
<ContentTemplate>
<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"
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
<Columns>

View File

@@ -9420,7 +9420,7 @@ Partial Class Clientes
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 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
DdlTipoComprobante.Items.Add(New ListItem("Remisión", "Rem"))
DdlTipoComprobante.SelectedValueExist("Rem")
DdlTipoComprobante_SelectedIndexChanged(DdlTipoComprobante, EventArgs.Empty)
End If
DdlTipoDefecto.Width = New Unit(260%)
@@ -5964,7 +5965,7 @@ Partial Class PV
Case 1 'CREDITO
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
Case 2 'CONTADO
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem") Then
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant") Then
DivContado.Visible = True
TxtImporteContado.Text = TxtTotal.Text
End If
@@ -6165,6 +6166,11 @@ Partial Class PV
Retorno = True
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
End Function
@@ -7315,12 +7321,10 @@ Partial Class PV
TxtPrecio.Text = TxtPrecio.Text
TxtObsPS.Text = "Descuento por garantía"
Else
'For Each Gvr As GridViewRow In GvRecepcionUsados.Rows
' If Gvr.RowType = DataControlRowType.DataRow Then
' Gvr.FCTextBox("TxtCantidad").Text = ""
' Gvr.FCTextBox("TxtCantidad").Enabled = True
' End If
'Next
If TmpDTAjustes IsNot Nothing Then
TmpDTAjustes.Clear()
End If
TxtObsPS.Text = TxtObsPS.Text.Replace("Descuento por garantía", "")
DdlRecepcionUsados.SelectedValueExist("-1")
DdlRecepcionUsados.Enabled = True

View File

@@ -6602,6 +6602,30 @@ Partial Class Ventas
LnkOCs.Visible = False
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
@@ -6620,6 +6644,32 @@ Partial Class Ventas
DdlTipoComprobante.SelectedValueExistInsert("Cot", "Cotización")
End If
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
@@ -6753,10 +6803,39 @@ Partial Class Ventas
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)
Vta.Dispose()
If Opcion > 0 Then
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
BtnsFacturar.Visible = False
BtnGenerarRemision.Visible = False
If 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 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

View File

@@ -3,6 +3,7 @@
<package id="AjaxControlToolkit" 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="BarcodeLib" version="2.4.0" targetFramework="net461" />
<package id="ClosedXML" version="0.95.4" targetFramework="net461" />
<package id="DocumentFormat.OpenXml" version="2.7.2" 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.Data.SqlClient" version="4.8.2" 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.IO.FileSystem.Primitives" version="4.0.1" targetFramework="net461" />
<package id="System.IO.Packaging" version="4.0.0" targetFramework="net461" />