Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -4048,7 +4048,7 @@ Public Class ClsInventarios
|
||||
End Function
|
||||
|
||||
Public Function AddTrasladoSolicitudDetalle(CveTrasladoSolicitud As Integer, Cantidad As Integer, CveUM As Integer, CvePS As Integer, Precio As Double, Observaciones As String,
|
||||
CveContratoDetalle As Integer, Optional Serie As String = "-1") As Boolean
|
||||
CveContratoDetalle As Integer, Optional Serie As String = "-1", Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
Dim CveTraspasoSolicitud As Integer = 0
|
||||
DataAdapter("PA_Inv_TraspasoSolicitudDetalleAdd")
|
||||
@@ -4062,6 +4062,9 @@ Public Class ClsInventarios
|
||||
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
||||
.Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle
|
||||
.Add("@Serie", SqlDbType.NVarChar).Value = Serie
|
||||
.Add("@Lote", SqlDbType.NVarChar).Value = Lote
|
||||
.Add("@FechaCaducidad", SqlDbType.Date).Value = FechaCaducidad
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -2204,6 +2204,7 @@ Namespace Modelos
|
||||
End If
|
||||
|
||||
Dim UsaComplementariaClientes As Boolean = True
|
||||
'If UsuarioActual.CveEmpresa.Contiene(1, 119) Then UsaComplementariaClientes = True
|
||||
|
||||
If ObjConta.GetPlantillaConceptos(ObjFactura.CveEmpresa, CvePlantilaPoliza) Then
|
||||
Dim dtt As DataTable = ObjConta.DtResultados
|
||||
@@ -3797,6 +3798,18 @@ Namespace Modelos
|
||||
End If
|
||||
End If
|
||||
|
||||
If factura.TipoDocto = "Rem" AndAlso factura.ServicioDomicilio Then
|
||||
Dim CveMovimientoSalida As Integer = GenerarMovimientoAlmacenServicioDomicilio(ObjInventario, factura, DtInventario, factura.CveAlmacenServicioDomicilio, 8, factura.CveMoneda, factura.CveVenta, "Modelos/SD1")
|
||||
If CveMovimientoSalida > 0 Then
|
||||
|
||||
If Not (GenerarMovimientoAlmacenServicioDomicilio(ObjInventario, factura, DtInventario, factura.CveAlmacenTraspasoDestino, 9, factura.CveMoneda, factura.CveVenta, "Modelos/SD1", CveMovimientoRelacionado:=CveMovimientoSalida) > 0) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Return OcurrioError
|
||||
@@ -4058,6 +4071,129 @@ Namespace Modelos
|
||||
'Return Not OcurrioError
|
||||
|
||||
End Function
|
||||
|
||||
Private Function GenerarMovimientoAlmacenServicioDomicilio(ByRef ObjInventario As ClsInventarios, factura As Modelos.Factura, DtInventario As DataTable, CveAlmacen As Integer, CveConcepto As Integer, CveMoneda As Integer, CveVenta As Integer, Modulo As String, Optional MovimientoPrePoliza As Boolean = False, Optional ByRef ObjConta As ClsContabilidad = Nothing, Optional CveMovimientoRelacionado As Integer = -1) As Integer
|
||||
Dim OcurrioError As Boolean = False
|
||||
|
||||
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, CveConcepto, factura.CveMoneda, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1, Modulo:=Modulo, CveMovimientoRelacionado:=CveMovimientoRelacionado)
|
||||
|
||||
If CveMovimientoInventario <= 0 Then
|
||||
OcurrioError = True
|
||||
ErrorList.Add("Ocurrió un error al agregar los Movimientos de salida al Inventario.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
Else
|
||||
Dim Mensaje As String = ""
|
||||
Dim i As Integer = 0
|
||||
Dim Cantidad As Double
|
||||
Dim CveUnidad As Integer
|
||||
Dim CveProducto As Integer
|
||||
Dim Existencia As Double
|
||||
'Dim Pu As Double
|
||||
'DtInv.Clone()
|
||||
|
||||
Dim DtEquivalencias As DataTable
|
||||
For Each Dr As DataRow In DtInventario.Rows
|
||||
CveProducto = Dr("CvePS").ToString.ToEntero
|
||||
CveUnidad = Dr("CveUM").ToString.ToEntero
|
||||
Cantidad = Dr("Cantidad").ToString.ToDouble
|
||||
|
||||
If Dr("CveTipoInvPS").ToString.ToEntero = 5 And Dr("Serie").ToString = "" Then
|
||||
OcurrioError = True
|
||||
ErrorList.Add("Se deben especificar las Series de los productos de almacén")
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119}) AndAlso factura.TipoDocto.Contiene("Rem", "Ing") Then
|
||||
Existencia = ObjInventario.GetExistenciasPS(CveProducto, CveUnidad, UsuarioActual.CveEmpresa, CveAlmacen, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=factura.CveSubProyecto, CveVendedor:=factura.CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, RestringirAlmacenes:=1, ExcluyeApartados:=1)
|
||||
If Existencia < Cantidad Then
|
||||
OcurrioError = True
|
||||
ErrorList.Add($"No cuenta con la cantidad suficiente en inventario del producto {Dr("CodigoPS")} .Cuenta con {Existencia.FormatoNumero(2)}.")
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 1 Then
|
||||
DtEquivalencias = New DataTable
|
||||
DtEquivalencias = GlobalDTProductosServiciosEquivalencias(CveProducto, -1, UsuarioActual.CveEmpresa)
|
||||
Dim CveUnidadBase As Integer = DtEquivalencias.FiltroPrimeroValor("CveUM", "UnidadBase = 'True'").ToEntero
|
||||
Dim drUMBase As DataRow = DtEquivalencias.FiltroPrimero("UnidadBase = 'True'")
|
||||
|
||||
'SI LA UNIDAD ACTUAL NO ES LA BASE SACA PROPORCION (EQUIVALENTE)
|
||||
If CveUnidadBase <> CveUnidad Then
|
||||
' LO QUE PUSE LO QUE VALE UNIDAD BASE LO QUE VALE UNIDAD SELECCIONADA
|
||||
Cantidad = Dr("Cantidad").ToString.ToDouble * drUMBase("Cantidad").ToString.ToDouble / DtEquivalencias.FiltraParametros(String.Format("CveUM = {0}", CveUnidad)).Rows(0)("Cantidad").ToString.ToDouble
|
||||
CveUnidad = CveUnidadBase
|
||||
End If
|
||||
End If
|
||||
|
||||
If CveProducto > 0 Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, 0, CveSeccionAlmacen:=-3, Serie:=Dr("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
|
||||
OcurrioError = True
|
||||
ErrorList.Add("Ocurrió un error al agregar los Movimientos de salida al Inventario.<br />")
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
OcurrioError = True
|
||||
ErrorList.Add("Ocurrió un error al agregar los Movimientos de salida al Inventario.<br />")
|
||||
Exit For
|
||||
End If
|
||||
|
||||
|
||||
i = i + 1
|
||||
Next
|
||||
|
||||
'REGISTRO LA PREPOLIZA DE COSTO VS ALMACEN
|
||||
If MovimientoPrePoliza AndAlso Not OcurrioError Then
|
||||
Dim DtCostos As DataTable = Nothing
|
||||
Dim ValorInventario As Decimal = 0
|
||||
Dim TotalCosto As Decimal = 0
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoInventario, UsuarioActual.CveEmpresa) Then
|
||||
DtCostos = ObjInventario.DtResultados
|
||||
TotalCosto = DtCostos.SUMD("Total").RoundSQL()
|
||||
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
|
||||
Dim IdCtaContable As Integer = 0
|
||||
Dim CveCuenta As Integer = 0
|
||||
If tmpCostos.Rows.Count > 0 Then
|
||||
Dim TotalCostoAcumulado As Decimal = 0
|
||||
Dim cont As Integer = 1
|
||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||
For Each RowInv As DataRow In tmpCostos.Rows
|
||||
ValorInventario = DtCostos.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").RoundSQL()
|
||||
TotalCostoAcumulado += ValorInventario
|
||||
|
||||
'cuando es el último movimiento y hay diferencias en los importes
|
||||
If cont = DtCostos.Rows.Count AndAlso TotalCosto <> TotalCostoAcumulado Then
|
||||
ValorInventario = ValorInventario + (TotalCosto - TotalCostoAcumulado)
|
||||
End If
|
||||
|
||||
'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString, Row2("SubProyecto").ToString)
|
||||
IdCtaContable = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
||||
CveCuenta = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
||||
If ValorInventario <> 0 Then
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, False, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
cont += 1
|
||||
Next
|
||||
End If
|
||||
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero
|
||||
|
||||
If TotalCosto <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, True, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=factura.CveSubProyecto) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
factura.Inv_CveMovimiento = CveMovimientoInventario
|
||||
factura.Inv_ValorInventario = ValorInventario
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Return CveMovimientoInventario
|
||||
End Function
|
||||
Private Sub GuardarVentaEstimaciones(ByRef factura As Modelos.Factura, ObjContr As ClsContratos)
|
||||
'debe de ser por contrato el movimiento
|
||||
If factura.CveContratoSecciones.Length > 0 Then
|
||||
@@ -5785,6 +5921,7 @@ Namespace Modelos
|
||||
Public Property CvePedido2 As Integer = -1
|
||||
Public Property CveAlmacenTraspasoOrigen As Integer = -1
|
||||
Public Property CveAlmacenTraspasoDestino As Integer = -1
|
||||
Public Property CveAlmacenServicioDomicilio As Integer = -1
|
||||
Public Property EsDevolucionVenta As Integer = -1
|
||||
Public Property EsInterno As Integer = -1
|
||||
Public Property CveEmpresaCRM As Integer = -1
|
||||
|
||||
@@ -4382,21 +4382,27 @@ Partial Class Bancos_IE
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim Banc As New ClsBancos
|
||||
Dim ObjConta As New ClsContabilidad(Banc.IniciaTransacSQL())
|
||||
|
||||
Dim ObjAC As ClsContPAQi = Nothing
|
||||
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
|
||||
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjAC.IniciaTransacSQL()
|
||||
End If
|
||||
|
||||
|
||||
Dim ErrorCancelar = False
|
||||
Dim MensajeError = ""
|
||||
Dim IdPolizaNueva = -1
|
||||
Dim FolioPolizaNueva = -1
|
||||
|
||||
Dim Banc As New ClsBancos
|
||||
Dim ObjConta As New ClsContabilidad(Banc.IniciaTransacSQL())
|
||||
|
||||
Dim ObjAC As ClsContPAQi = Nothing
|
||||
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
|
||||
Try
|
||||
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjAC.IniciaTransacSQL()
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al iniciar la contabilización", ex)
|
||||
ErrorCancelar = True
|
||||
End Try
|
||||
|
||||
End If
|
||||
|
||||
Try
|
||||
If (IDPoliza > 0 AndAlso (UsuarioActual.Empresa.UsaAC)) Then
|
||||
|
||||
If ObjAC Is Nothing Then
|
||||
@@ -4504,6 +4510,9 @@ Partial Class Bancos_IE
|
||||
If CvePrePolizaCancelacion <= 0 Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Error al cancelar IE MES ANTERIOR"
|
||||
Else
|
||||
'DEBE GENERAR UNA NUEVA POLIZA
|
||||
IDPoliza = -1
|
||||
End If
|
||||
Else
|
||||
'CANCELA IE MES ACTUAL
|
||||
@@ -4612,6 +4621,9 @@ Partial Class Bancos_IE
|
||||
Alert("El movimiento bancario no se pudo cancelar. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
GuardaLog(MensajeError + " | CANCELAR IE")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrio un error al cancelar", ex)
|
||||
End Try
|
||||
|
||||
If ObjAC IsNot Nothing Then ObjAC.Dispose()
|
||||
Banc.Dispose()
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
||||
<AutoRefresh>0</AutoRefresh>
|
||||
<DataSources>
|
||||
<DataSource Name="DsOC">
|
||||
<ConnectionProperties>
|
||||
<DataProvider>System.Data.DataSet</DataProvider>
|
||||
<ConnectString>/* Local Connection */</ConnectString>
|
||||
</ConnectionProperties>
|
||||
<rd:DataSourceID>06ae5329-8ff5-42b5-b7f4-6d68e5186420</rd:DataSourceID>
|
||||
</DataSource>
|
||||
</DataSources>
|
||||
<DataSets>
|
||||
<DataSet Name="DsOC">
|
||||
<Query>
|
||||
<DataSourceName>DsOC</DataSourceName>
|
||||
<CommandText>/* Local Query */</CommandText>
|
||||
</Query>
|
||||
<Fields>
|
||||
<Field Name="Unidad">
|
||||
<DataField>Unidad</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Fecha">
|
||||
<DataField>Fecha</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Conductor">
|
||||
<DataField>Conductor</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Direccion">
|
||||
<DataField>Direccion</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Velocidad">
|
||||
<DataField>Velocidad</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
</Fields>
|
||||
<rd:DataSetInfo>
|
||||
<rd:DataSetName>DsOC</rd:DataSetName>
|
||||
<rd:SchemaPath>C:\Users\Orlando Bojorquez\Documents\Visual Studio 2013\WebSites\WebSite1\App_Code\DsOC.xsd</rd:SchemaPath>
|
||||
<rd:TableName>DtOCDetalle</rd:TableName>
|
||||
<rd:TableAdapterFillMethod />
|
||||
<rd:TableAdapterGetDataMethod />
|
||||
<rd:TableAdapterName />
|
||||
</rd:DataSetInfo>
|
||||
</DataSet>
|
||||
</DataSets>
|
||||
<ReportSections>
|
||||
<ReportSection>
|
||||
<Body>
|
||||
<ReportItems>
|
||||
<Textbox Name="Textbox15">
|
||||
@@ -337,7 +387,7 @@
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
@@ -387,21 +437,6 @@
|
||||
</Border>
|
||||
</Style>
|
||||
</Tablix>
|
||||
<Image Name="Image2">
|
||||
<Source>Embedded</Source>
|
||||
<Value>LogoSinFondo</Value>
|
||||
<Sizing>FitProportional</Sizing>
|
||||
<Top>0.13104cm</Top>
|
||||
<Left>1.07649cm</Left>
|
||||
<Height>2.44264cm</Height>
|
||||
<Width>2.74883cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
</Style>
|
||||
</Image>
|
||||
<Textbox Name="Textbox1">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
@@ -431,7 +466,7 @@
|
||||
<Left>2.51123cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>8.26727cm</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -471,7 +506,56 @@
|
||||
<Left>10.88433cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>8.26727cm</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Image Name="Logo">
|
||||
<Source>External</Source>
|
||||
<Value>=Parameters!LogoPath.Value</Value>
|
||||
<Sizing>FitProportional</Sizing>
|
||||
<Top>0.05159in</Top>
|
||||
<Left>0.29332cm</Left>
|
||||
<Height>2.09585cm</Height>
|
||||
<Width>21.10052cm</Width>
|
||||
<ZIndex>4</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
</Style>
|
||||
</Image>
|
||||
<Textbox Name="Textbox5">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!NombreEmpresa.Value</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>1.97368cm</Top>
|
||||
<Left>0.29332cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>21.10052cm</Width>
|
||||
<ZIndex>5</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -489,7 +573,7 @@
|
||||
<Width>21.47166cm</Width>
|
||||
<Page>
|
||||
<PageFooter>
|
||||
<Height>0.71437cm</Height>
|
||||
<Height>0.75104cm</Height>
|
||||
<PrintOnFirstPage>true</PrintOnFirstPage>
|
||||
<PrintOnLastPage>true</PrintOnLastPage>
|
||||
<ReportItems>
|
||||
@@ -550,6 +634,7 @@
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<Format>g</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -558,7 +643,7 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox31</rd:DefaultName>
|
||||
<Top>0.17639cm</Top>
|
||||
<Left>13.9056cm</Left>
|
||||
<Left>10.14852cm</Left>
|
||||
<Height>0.41981cm</Height>
|
||||
<Width>6.02198cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
@@ -572,6 +657,60 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox32">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value xml:space="preserve"> </Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Globals!PageNumber</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value> de </Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Globals!TotalPages</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox31</rd:DefaultName>
|
||||
<Top>0.17639cm</Top>
|
||||
<Left>18.75852cm</Left>
|
||||
<Height>0.41981cm</Height>
|
||||
<Width>2.63532cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -588,54 +727,8 @@
|
||||
<ColumnSpacing>1.27cm</ColumnSpacing>
|
||||
<Style />
|
||||
</Page>
|
||||
<AutoRefresh>0</AutoRefresh>
|
||||
<DataSources>
|
||||
<DataSource Name="DsOC">
|
||||
<ConnectionProperties>
|
||||
<DataProvider>System.Data.DataSet</DataProvider>
|
||||
<ConnectString>/* Local Connection */</ConnectString>
|
||||
</ConnectionProperties>
|
||||
<rd:DataSourceID>06ae5329-8ff5-42b5-b7f4-6d68e5186420</rd:DataSourceID>
|
||||
</DataSource>
|
||||
</DataSources>
|
||||
<DataSets>
|
||||
<DataSet Name="DsOC">
|
||||
<Query>
|
||||
<DataSourceName>DsOC</DataSourceName>
|
||||
<CommandText>/* Local Query */</CommandText>
|
||||
</Query>
|
||||
<Fields>
|
||||
<Field Name="Unidad">
|
||||
<DataField>Unidad</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Fecha">
|
||||
<DataField>Fecha</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Conductor">
|
||||
<DataField>Conductor</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Direccion">
|
||||
<DataField>Direccion</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Velocidad">
|
||||
<DataField>Velocidad</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
</Fields>
|
||||
<rd:DataSetInfo>
|
||||
<rd:DataSetName>DsOC</rd:DataSetName>
|
||||
<rd:SchemaPath>C:\Users\Orlando Bojorquez\Documents\Visual Studio 2013\WebSites\WebSite1\App_Code\DsOC.xsd</rd:SchemaPath>
|
||||
<rd:TableName>DtOCDetalle</rd:TableName>
|
||||
<rd:TableAdapterFillMethod />
|
||||
<rd:TableAdapterGetDataMethod />
|
||||
<rd:TableAdapterName />
|
||||
</rd:DataSetInfo>
|
||||
</DataSet>
|
||||
</DataSets>
|
||||
</ReportSection>
|
||||
</ReportSections>
|
||||
<ReportParameters>
|
||||
<ReportParameter Name="FechaInicio">
|
||||
<DataType>String</DataType>
|
||||
@@ -673,6 +766,18 @@
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="LogoPath">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="NombreEmpresa">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<EmbeddedImages>
|
||||
<EmbeddedImage Name="compuproveedores">
|
||||
|
||||
@@ -1586,7 +1586,7 @@ Partial Class GPS_Rastreo
|
||||
RptParametro.Add(New ReportParameter("FechaInicio", FechaI.ToString))
|
||||
RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToString))
|
||||
RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString))
|
||||
|
||||
retorno = StreamPDF(RutaReporte, DtDatos, RptParametro, $"{NombreReporte}{Date.Now.ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC")
|
||||
|
||||
@@ -1614,6 +1614,8 @@ Partial Class GPS_Rastreo
|
||||
ElseIf Opcion = "Speed" Then
|
||||
RutaReporte = "Empresas/Grales/ReportesProgramados/RPVelocidad.rdlc"
|
||||
NombreReporte = "ReporteExcesosVelocidad"
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim RptParametro As New List(Of ReportParameter)
|
||||
Dim DtDatos As New DataTable()
|
||||
@@ -1628,9 +1630,14 @@ Partial Class GPS_Rastreo
|
||||
RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToString))
|
||||
RptParametro.Add(New ReportParameter("MapaURL", ""))
|
||||
RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString))
|
||||
RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
|
||||
RptParametro.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
If Imagen.Exists Then
|
||||
RptParametro.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
RptParametro.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
For Each row As GridViewRow In GvBarra.Rows
|
||||
Dim DrNew = DtDatos.NewRow()
|
||||
|
||||
@@ -1676,7 +1683,7 @@ Partial Class GPS_Rastreo
|
||||
RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToString))
|
||||
RptParametro.Add(New ReportParameter("MapaURL", ""))
|
||||
RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString))
|
||||
RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
|
||||
If Opcion = "Idle" Then
|
||||
@@ -1825,12 +1832,20 @@ Partial Class GPS_Rastreo
|
||||
|
||||
Private Sub ImprimirCrystal(NombreReporte As String, Format As String)
|
||||
Dim RptParametro As New List(Of CrystalParametro)
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
RptParametro.Add(New CrystalParametro("FechaInicio", FechaI.ToString))
|
||||
RptParametro.Add(New CrystalParametro("FechaFin", FechaF.ToString))
|
||||
RptParametro.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
RptParametro.Add(New CrystalParametro("FechaImpresion", DateTime.Now.ToShortDateString))
|
||||
RptParametro.Add(New CrystalParametro("FechaImpresion", DateTime.Now.ToString))
|
||||
RptParametro.Add(New CrystalParametro("KMRecorridos", $"{DtPosiciones.SUM("KMRecorridos").ToString} KM"))
|
||||
|
||||
RptParametro.Add(New CrystalParametro("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
If Imagen.Exists Then
|
||||
RptParametro.Add(New CrystalParametro("LogoPath", logouri))
|
||||
Else
|
||||
RptParametro.Add(New CrystalParametro("LogoPath", ""))
|
||||
End If
|
||||
Dim DtDatos As New DataTable()
|
||||
|
||||
DtDatos.Columns.Add("Vehiculo", GetType(String))
|
||||
|
||||
@@ -326,6 +326,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
End Sub
|
||||
|
||||
Private Sub CargaInicial()
|
||||
ConsecutivoVenta = 0
|
||||
CveMovimiento = -1
|
||||
CveMovimientoRelacionado = -1
|
||||
TieneRelacionado = -1
|
||||
@@ -2255,7 +2256,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
'VALIDA PROMOCIONES Y EXISTENCIAS
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetPromocionesPS(-1, Now, CveSubProyecto, Me.ObjRemisionNC.CveCliente, Me.ObjRemisionNC.CveVendedor, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetPromocionesPS(-1, Now, CveSubProyecto, Me.ObjRemisionNC.CveCliente, Me.ObjRemisionNC.CveVendedor, 1, UsuarioActual.CveEmpresa) Then
|
||||
Me.ObjRemisionNC.DtPromociones = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
@@ -2573,8 +2574,11 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
Dim Obs As String = SbBCI.ToString()
|
||||
|
||||
AddPSRNC(ObjRemisionNC.DtDetalle, 1, CveUnidadMedida, "", CveClasificacion, "", CvePS, "", Obs, PU, 0, -1, "",
|
||||
ObjRemisionNC.CveSubProyecto, ObjRemisionNC.SubProyecto.SubProyecto, PorcentajeIVA:=PorcentajeIVA)
|
||||
If AddPSRNC(ObjRemisionNC.DtDetalle, 1, CveUnidadMedida, "", CveClasificacion, "", CvePS, "", Obs, PU, 0, -1, "",
|
||||
ObjRemisionNC.CveSubProyecto, ObjRemisionNC.SubProyecto.SubProyecto, PorcentajeIVA:=PorcentajeIVA) Then
|
||||
ConsecutivoVenta += 1
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
End If
|
||||
@@ -2966,6 +2970,9 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Dim CargoActual As Double = 0
|
||||
|
||||
Dim Row As DataRow = Nothing
|
||||
|
||||
ConsecutivoVenta += 1
|
||||
|
||||
Row = TmpDTAjustes.NewRow
|
||||
Row("CveFolioGarantia") = DdlFolioGarantia.SelectedValue.ToEntero
|
||||
Row("CveTipoUso") = DdlTipoUso.SelectedValue.ToEntero
|
||||
@@ -2981,7 +2988,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Row("TipoComprobante") = 1
|
||||
Row("Comprobante") = TxtPoliza.Text
|
||||
Row("Importe") = TxtImporteAjuste.Text.ToDouble
|
||||
Row("ConsecutivoVenta") = TxtConsecutivoAjuste.Text.ToEntero()
|
||||
Row("ConsecutivoVenta") = ConsecutivoVenta
|
||||
Row("CvePS") = DdlPSAjuste.SelectedValue
|
||||
Row("PS") = DdlPSAjuste.SelectedText
|
||||
Row("CveVenta") = -1
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePS, CodigoPS, CveUM, Cantidad, Precio, Observaciones, CveContratoDetalle,UnidadMedida,Serie" EmptyDataText="No se encontraron Productos registrados" ToolTip="Listado de Productos" CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePS, CodigoPS, CveUM, Cantidad, Precio, Observaciones, CveContratoDetalle,UnidadMedida,Serie, Lote, FechaCaducidad" EmptyDataText="No se encontraron Productos registrados" ToolTip="Listado de Productos" CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Cantidad" HeaderStyle-HorizontalAlign="Left" DataFormatString="{0:N}" ItemStyle-HorizontalAlign="Center" DataField="Cantidad" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="U.M" HeaderStyle-HorizontalAlign="Center" DataFormatString="{0:N}" ItemStyle-HorizontalAlign="Center" DataField="UnidadMedida" ItemStyle-Width="10%" />
|
||||
@@ -311,9 +311,21 @@
|
||||
<%--<asp:BoundField HeaderText="Direccion Envio" HeaderStyle-HorizontalAlign="Left" DataField="DireccionEnvio" ItemStyle-Width="20%" />--%>
|
||||
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="20%" />
|
||||
<asp:BoundField HeaderText="Precio" HeaderStyle-HorizontalAlign="Right" DataFormatString="{0:c}" ItemStyle-HorizontalAlign="Right" DataField="Precio" Visible="false" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" Visible="false" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center"/>
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" Visible="false" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center"/>
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" Visible="false" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}"/>
|
||||
<asp:TemplateField HeaderText="Serie" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSerie" runat="server" Text='<%# Eval("Serie")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlLote" runat="server" Text='<%# Eval("Lote")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Caducidad" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaCaducidad" runat="server" Text='<%# Eval("FechaCaducidad", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="Si" />
|
||||
@@ -492,6 +504,9 @@
|
||||
<div class="col-md-4 form-group form-md-line-input input-iconright" id="divLote" runat="server" visible="false">
|
||||
<asp:TextBox ID="TxtLote" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<label for="<%= TxtLote.ClientID.ToString()%>">Lote:</label>
|
||||
<asp:RequiredFieldValidator ID="RFVLote" runat="server" ControlToValidate="TxtLote" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Lote''</b> es necesario, por favor ingréselo." ValidationGroup="AgregarPS"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCLote" runat="server" HighlightCssClass="vco" TargetControlID="RFVLote" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 form-group form-md-line-input input-iconright" id="divCaducidad" runat="server" visible="false">
|
||||
@@ -501,11 +516,11 @@
|
||||
|
||||
<div class="col-md-1 form-group form-md-line-input input-iconright" id="divCaducidad2" runat="server" visible="false">
|
||||
<asp:LinkButton ID="ImgFechaCad" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaCad" runat="server" ControlToValidate="TxtCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="AddPSInvFisico"></asp:RequiredFieldValidator>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaCad" runat="server" ControlToValidate="TxtCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="AgregarPS"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFechaCad" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaCad" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaCad" runat="server" TargetControlID="TxtCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaCad" TargetControlID="TxtCaducidad" PopupButtonID="ImgFechaCad" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CVFechaCad" runat="server" ControlToValidate="TxtCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="AddPSInvFisico"></asp:CompareValidator>
|
||||
<asp:CompareValidator ID="CVFechaCad" runat="server" ControlToValidate="TxtCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="AgregarPS"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaCad" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaCad" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -50,6 +50,48 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property AplicaSerie As Boolean
|
||||
Get
|
||||
If ViewState("AplicaSerie") Is Nothing Then
|
||||
Return False
|
||||
Else
|
||||
Return CType(ViewState("AplicaSerie"), Boolean)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("AplicaSerie") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property AplicaLote As Boolean
|
||||
Get
|
||||
If ViewState("AplicaLote") Is Nothing Then
|
||||
Return False
|
||||
Else
|
||||
Return CType(ViewState("AplicaLote"), Boolean)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("AplicaLote") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property AplicaCaducidad As Boolean
|
||||
Get
|
||||
If ViewState("AplicaCaducidad") Is Nothing Then
|
||||
Return False
|
||||
Else
|
||||
Return CType(ViewState("AplicaCaducidad"), Boolean)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("AplicaCaducidad") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
@@ -153,9 +195,26 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
|
||||
If ObjInventarios.AddTrasladoSolicitudGet(CveTraspasoSolicitud, UsuarioActual.CveEmpresa) Then
|
||||
If ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
For Each rowtp As DataRow In ObjInventarios.DtResultados.Rows
|
||||
If Not AplicaSerie Then
|
||||
AplicaSerie = rowtp("Serie").ToString <> ""
|
||||
End If
|
||||
If Not AplicaLote Then
|
||||
AplicaLote = rowtp("Lote").ToString <> ""
|
||||
End If
|
||||
If Not AplicaCaducidad Then
|
||||
AplicaCaducidad = rowtp("FechaCaducidad").ToString <> ""
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlProductoServicio.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
|
||||
|
||||
GvDatos.Columns(4).Visible = False
|
||||
GvDatos.Columns(5).Visible = True
|
||||
GvDatos.Columns(5).Visible = AplicaSerie
|
||||
GvDatos.Columns(6).Visible = AplicaLote
|
||||
GvDatos.Columns(7).Visible = AplicaCaducidad
|
||||
|
||||
DivFolio.Visible = True
|
||||
LbFolio.Text = ObjInventarios.DtResultados.Rows(0)("FolioTraspaso").ToString
|
||||
TxtObservaciones.Text = ObjInventarios.DtResultados.Rows(0)("ObservacionesTraspaso").ToString
|
||||
@@ -369,14 +428,14 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
Row("CveUM") = DdlUM.SelectedValue.ToEntero
|
||||
Row("UnidadMedida") = DdlUM.SelectedItem.Text
|
||||
Row("Observaciones") = ""
|
||||
Row("Lote") = "-1"
|
||||
Row("Serie") = "-1"
|
||||
Row("FechaCaducidad") = MinFecha
|
||||
|
||||
If divLote.Visible Then
|
||||
Row("Lote") = TxtLote.Text
|
||||
GvDatos.Columns(6).Visible = True
|
||||
Lote = TxtLote.Text.ToString
|
||||
Else
|
||||
Row("Lote") = "-1"
|
||||
Lote = "-1"
|
||||
End If
|
||||
|
||||
|
||||
@@ -384,8 +443,9 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
Row("FechaCaducidad") = TxtCaducidad.Text
|
||||
GvDatos.Columns(7).Visible = True
|
||||
FechaCaducidad = TxtCaducidad.Text.ToDate
|
||||
RFVFechaCad.Enabled = True
|
||||
|
||||
Else
|
||||
Row("FechaCaducidad") = MinFecha
|
||||
FechaCaducidad = MinFecha
|
||||
End If
|
||||
|
||||
@@ -393,8 +453,6 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
If Div4.Visible Then
|
||||
Row("Serie") = TxtSerie.Text
|
||||
GvDatos.Columns(5).Visible = True
|
||||
Else
|
||||
Row("Serie") = "-1"
|
||||
End If
|
||||
|
||||
|
||||
@@ -621,7 +679,7 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
|
||||
For Each row As GridViewRow In GvDatos.Rows
|
||||
CodigoPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=row.DataKey("CvePS").ToEntero).FiltroPrimeroValor("PSCodigo", "")
|
||||
Existencia = ObjInventarios.GetExistenciasPS(row.DataKey("CvePS").ToEntero, row.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"))
|
||||
Existencia = ObjInventarios.GetExistenciasPS(row.DataKey("CvePS").ToEntero, row.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), Lote:=row.DataKey("Lote").ToString, FechaCaducidad:=row.DataKey("FechaCaducidad").ToString.ToDate)
|
||||
If Existencia - TempDT.SUM("Cantidad", $"CvePS = {row.DataKey("CvePS").ToEntero} AND CveUM = {row.DataKey("CveUM").ToEntero}") < 0 Then
|
||||
MensajeExistencia.AppendFormat("<br/> - <b>{0}.</b> Existencia: {1}", CodigoPS, Existencia)
|
||||
TieneErrorExistencia = True
|
||||
@@ -667,8 +725,10 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
Dim Observaciones As String = Row.DataKey("Observaciones")
|
||||
Dim CveContratoDetalle As Integer = Row.DataKey("CveContratoDetalle").ToEntero
|
||||
Dim Serie As String = Row.DataKey("Serie")
|
||||
Dim Lote As String = Row.DataKey("Lote")
|
||||
Dim FechaCaducidad As Date = Row.DataKey("FechaCaducidad").ToDate
|
||||
|
||||
If Not ObjInventarios.AddTrasladoSolicitudDetalle(CveTraspasoSolicitud, Cantidad, CveUM, CvePS, Precio, Observaciones, CveContratoDetalle, Serie) Then
|
||||
If Not ObjInventarios.AddTrasladoSolicitudDetalle(CveTraspasoSolicitud, Cantidad, CveUM, CvePS, Precio, Observaciones, CveContratoDetalle, Serie, Lote, FechaCaducidad) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -1019,15 +1079,17 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
DdlUM.SelectedValue = "-1"
|
||||
DdlUM.DataBind()
|
||||
DdlUM.SelectedValueExist(drPS("CveUnidadMedida").ToString)
|
||||
Dim AplicaSerie As Boolean = drPS("AplicaSerie").ToString = "True"
|
||||
AplicaSerie = drPS("AplicaSerie").ToString = "True"
|
||||
Div4.Visible = AplicaSerie
|
||||
|
||||
Dim AplicaLote As Boolean = drPS("AplicaLote").ToString = "True"
|
||||
AplicaLote = drPS("AplicaLote").ToString = "True"
|
||||
divLote.Visible = AplicaLote
|
||||
RFVLote.Enabled = AplicaLote
|
||||
|
||||
Dim AplicaCaducidad As Boolean = drPS("AplicaCaducidad").ToString = "True"
|
||||
AplicaCaducidad = drPS("AplicaCaducidad").ToString = "True"
|
||||
divCaducidad.Visible = AplicaCaducidad
|
||||
divCaducidad2.Visible = AplicaCaducidad
|
||||
RFVFechaCad.Enabled = AplicaCaducidad
|
||||
|
||||
End If
|
||||
UpPS.Update()
|
||||
@@ -1180,5 +1242,23 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
GvDatos.Columns(5).Visible = Mostrar
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.FCLiteral("LtlSerie").ToString = "-1" Then
|
||||
e.Row.FCLiteral("LtlSerie").Text = ""
|
||||
End If
|
||||
|
||||
If e.Row.FCLiteral("LtlLote").ToString = "-1" Then
|
||||
e.Row.FCLiteral("LtlLote").Text = ""
|
||||
End If
|
||||
|
||||
If e.Row.FCLiteral("LtlFechaCaducidad").ToString.ToDate = MinFecha Then
|
||||
e.Row.FCLiteral("LtlFechaCaducidad").Text = ""
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
@@ -493,7 +493,7 @@
|
||||
<td>
|
||||
|
||||
|
||||
<div class="row col-md-12" align="right">
|
||||
<div class="text-right">
|
||||
<input type="text" id="TxtBusqueda7" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda7','{0}')", GVHistorial.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda7','{0}')", GVHistorial.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
@@ -1939,7 +1939,8 @@
|
||||
<asp:Panel ID="PanelBloqueo" runat="server" CssClass="modalPopup" align="center" Style="display: none">
|
||||
<table border="0" width="250px" cellspacing="1" style="background-color: White; padding-left: 10px;">
|
||||
<tr style="background-color: #3598dc; color: #FFFFFF; font-size: 14px; text-align: center">
|
||||
<td colspan="2"><asp:Label runat="server" Text="<i class='fa fa-lock fa-2 icontxt'></i> Acceso Restringido"/></td>
|
||||
<td colspan="2">
|
||||
<asp:Label runat="server" Text="<i class='fa fa-lock fa-2 icontxt'></i> Acceso Restringido" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1"> </td>
|
||||
@@ -2895,8 +2896,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
@@ -2907,6 +2906,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<ADS:Dropdownlost ID="DdlPSAjuste" CssStyle="width: 100%;" CssClass=" form-control input-sm DdlPS" IncluyeTodos="false" CssClassDdl="select2me form-control" runat="server" CausesValidation="true" DataTextField="PSCodigo" DataValueField="CvePS" Onselectedindexchange="DdlPSAjuste_selectedindexchange"></ADS:Dropdownlost>
|
||||
<asp:HiddenField ID="HdnPSAjusteMarca" ClientIDMode="Static" runat="server" Value="-1" />
|
||||
|
||||
@@ -1264,6 +1264,9 @@ Partial Class PV
|
||||
DdlMarcaPS.DataBind()
|
||||
DdlMarcaPSAjuste.DataBind()
|
||||
|
||||
DdlMarcaPS.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
DdlMarcaPSAjuste.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
|
||||
UpModalVenta.Update()
|
||||
UpAjuste.Update()
|
||||
End Sub
|
||||
@@ -3519,20 +3522,32 @@ Partial Class PV
|
||||
ObjFactura.DtInventario = DtInv.FiltraParametros("Seleccionado = 1")
|
||||
End If
|
||||
|
||||
ObjFactura.ServicioDomicilio = ChkServicioDomicilio.Checked
|
||||
|
||||
'VALIDA ENTREGA POR ADELANTADO
|
||||
If UsuarioActual.Empresa.Funcionalidad(145) = "1" Then
|
||||
'INCRUSTAMOS ALMACEN ENTREGA POR ADELANTADO CUANDO SEA REMISION Y NO TRAIGA ASIGNADO POR EL USUARIO
|
||||
If ObjFactura.CveAlmacenTraspasoDestino <= 0 And ObjFactura.TipoDocto = "Rem" Then
|
||||
If ObjFactura.ServicioDomicilio Then
|
||||
ObjFactura.CveAlmacenServicioDomicilio = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 29 AND CveSubProyecto = {DdlSubProyectoDatos.SelectedValue}").ToString.ToEntero
|
||||
ObjFactura.DtInventario = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
||||
End If
|
||||
|
||||
ObjFactura.CveAlmacenTraspasoDestino = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 10 AND CveSubProyecto = {DdlSubProyectoDatos.SelectedValue}").ToString.ToEntero
|
||||
|
||||
End If
|
||||
|
||||
'SI LA SUCURSAL NO TIENE ENTREGA POR ADELANTADO
|
||||
If ObjFactura.CveAlmacenTraspasoDestino <= 0 And ObjFactura.TipoDocto = "Rem" Then
|
||||
ObjFactura.ErrorList.Add("Ocurrió un error al seleccionar el almacen de entrega por adelantado de la sucursal.")
|
||||
End If
|
||||
|
||||
'SI LA SUCURSAL NO TIENE SERVICIO A DOMICILIO
|
||||
If ObjFactura.ServicioDomicilio AndAlso ObjFactura.CveAlmacenServicioDomicilio <= 0 And ObjFactura.TipoDocto = "Rem" Then
|
||||
ObjFactura.ErrorList.Add("No existe un almacen configurado como 'Servicio a Domicilio' en esta sucursal.")
|
||||
End If
|
||||
|
||||
ObjFactura.ServicioDomicilio = ChkServicioDomicilio.Checked
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -754,6 +754,12 @@
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="left" id="TrServicioDomicilio" runat="server" visible="false">
|
||||
<td><b>Servicio a Domicilio:</b> </td>
|
||||
<td>
|
||||
activado
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -4012,6 +4012,10 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CBool(DbRowVenta("ServicioDomicilio")) Then
|
||||
TrServicioDomicilio.Visible = True
|
||||
End If
|
||||
|
||||
'CargaDetalle
|
||||
If ObjVentas.GetVentaDetalle(CveVenta) Then
|
||||
TmpDT = ObjVentas.DtResultados
|
||||
@@ -12977,8 +12981,10 @@ Partial Class Ventas
|
||||
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
|
||||
Dim IdCtaContable As Integer = 0
|
||||
Dim CveCuenta As Integer = 0
|
||||
If tmpCostos.Rows.Count > 0 Then
|
||||
Dim TotalCostoAcumulado As Decimal = 0
|
||||
|
||||
If tmpCostos.Rows.Count > 0 Then
|
||||
|
||||
Dim cont As Integer = 1
|
||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||
For Each RowInv As DataRow In tmpCostos.Rows
|
||||
@@ -13002,6 +13008,12 @@ Partial Class Ventas
|
||||
cont += 1
|
||||
Next
|
||||
End If
|
||||
|
||||
'AJUSTA EL TOTAL
|
||||
If Math.Abs(TotalCostoAcumulado - TotalCosto) = 0.01 Then
|
||||
TotalCosto = TotalCostoAcumulado
|
||||
End If
|
||||
|
||||
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero()
|
||||
|
||||
'If TotalCosto <> 0 Then
|
||||
@@ -23192,7 +23204,7 @@ Partial Class Ventas
|
||||
Dim ObjBancos As New ClsBancos
|
||||
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
GvComplementoPagos.Columns(8).Visible = True
|
||||
GvComplementoPagos.Columns(7).Visible = True
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Reference in New Issue
Block a user