This commit is contained in:
2023-01-05 21:07:20 -07:00
16 changed files with 276 additions and 263 deletions

View File

@@ -5969,7 +5969,8 @@ Public Class ClsContabilidad
Public Function AddCuentasAsignaciones(Optional CveConceptoContable As Integer = -1, Optional CveEmpresa As Integer = -1, Optional CveCuenta As Integer = -1, Optional IdCtaContable As Integer = -1, Public Function AddCuentasAsignaciones(Optional CveConceptoContable As Integer = -1, Optional CveEmpresa As Integer = -1, Optional CveCuenta As Integer = -1, Optional IdCtaContable As Integer = -1,
Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveClasificacion As Integer = -1,
Optional CveAlmacen As Integer = -1, Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1, Optional CveAlmacen As Integer = -1, Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1,
Optional CveSubProyecto As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveTipoGasto As Integer = -1, Optional RegeneraCuenta As Boolean = False) As Boolean Optional CveSubProyecto As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveTipoGasto As Integer = -1, Optional RegeneraCuenta As Boolean = False,
Optional OpActualizarClasificacion As Boolean = False) As Boolean
Dim Retorno = False Dim Retorno = False
DataAdapter("PA_Conta_CuentasAsignacionesAdd") DataAdapter("PA_Conta_CuentasAsignacionesAdd")
@@ -5991,6 +5992,7 @@ Public Class ClsContabilidad
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo .Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
.Add("@CveTipoGasto", SqlDbType.Int).Value = CveTipoGasto .Add("@CveTipoGasto", SqlDbType.Int).Value = CveTipoGasto
.Add("@RegeneraCuenta", SqlDbType.Bit).Value = RegeneraCuenta .Add("@RegeneraCuenta", SqlDbType.Bit).Value = RegeneraCuenta
.Add("@OpActualizarClasificacion", SqlDbType.Bit).Value = OpActualizarClasificacion
End With End With
Try Try

View File

@@ -1422,15 +1422,15 @@ Partial Class Bancos_IE
End If End If
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then 'If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" Then ' If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
Alert("El Beneficiario no tiene cuenta contable vinculada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) ' Alert("El Beneficiario no tiene cuenta contable vinculada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
BtnGuardar.Enabled = False ' BtnGuardar.Enabled = False
Else ' Else
BtnGuardar.Enabled = True ' BtnGuardar.Enabled = True
End If ' End If
UpGuardar.Update() ' UpGuardar.Update()
End If 'End If
CargaCuentasDepositos() CargaCuentasDepositos()
Else Else

View File

@@ -12408,6 +12408,7 @@ Partial Class Compras_Compras
GvPS.Columns(15).Visible = True GvPS.Columns(15).Visible = True
GvPS.Columns(16).Visible = True GvPS.Columns(16).Visible = True
GvPS.Columns(17).Visible = True GvPS.Columns(17).Visible = True
GvPS.Columns(18).Visible = True
'Panel General 'Panel General
UpPresupuestosAC.Visible = True UpPresupuestosAC.Visible = True

View File

@@ -5422,7 +5422,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("Solicito", dr("PersonaSolicito").ToString)) params.Add(New ReportParameter("Solicito", dr("PersonaSolicito").ToString))
params.Add(New ReportParameter("Descripcion", dr("Descripcion").ToString)) params.Add(New ReportParameter("Descripcion", dr("Descripcion").ToString))
params.Add(New ReportParameter("Recibio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Recibio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaRecibido", dr("FechaRecepcion").ToString)) params.Add(New ReportParameter("FechaRecibido", dr("FechaRecepcion").ToString.ToDate.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("FolioOS", dr("Folio").ToString)) params.Add(New ReportParameter("FolioOS", dr("Folio").ToString))
params.Add(New ReportParameter("ClienteTelefono", dr("Telefono").ToString)) params.Add(New ReportParameter("ClienteTelefono", dr("Telefono").ToString))
params.Add(New ReportParameter("ClienteCalle", dr("Direccion").ToString)) params.Add(New ReportParameter("ClienteCalle", dr("Direccion").ToString))
@@ -5452,6 +5452,12 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("Año", dr("Año").ToString)) params.Add(New ReportParameter("Año", dr("Año").ToString))
params.Add(New ReportParameter("TelefonoContacto", dr("TelefonoContacto").ToString)) params.Add(New ReportParameter("TelefonoContacto", dr("TelefonoContacto").ToString))
params.Add(New ReportParameter("FechaImpresion", Now.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
'End If 'End If

View File

@@ -232,7 +232,7 @@
<rd:DefaultName>Cantidad</rd:DefaultName> <rd:DefaultName>Cantidad</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Style>Solid</Style> <Style>None</Style>
</Border> </Border>
<TopBorder> <TopBorder>
<Color>Black</Color> <Color>Black</Color>
@@ -240,7 +240,6 @@
</TopBorder> </TopBorder>
<BottomBorder> <BottomBorder>
<Color>Black</Color> <Color>Black</Color>
<Width>1pt</Width>
</BottomBorder> </BottomBorder>
<LeftBorder> <LeftBorder>
<Style>None</Style> <Style>None</Style>
@@ -278,7 +277,7 @@
<rd:DefaultName>PS</rd:DefaultName> <rd:DefaultName>PS</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Style>Solid</Style> <Style>None</Style>
</Border> </Border>
<TopBorder> <TopBorder>
<Color>Black</Color> <Color>Black</Color>
@@ -286,102 +285,6 @@
</TopBorder> </TopBorder>
<BottomBorder> <BottomBorder>
<Color>Black</Color> <Color>Black</Color>
<Width>1pt</Width>
</BottomBorder>
<LeftBorder>
<Style>None</Style>
</LeftBorder>
<RightBorder>
<Style>None</Style>
</RightBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.20312cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="Textbox29">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox29</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<TopBorder>
<Color>Black</Color>
</TopBorder>
<BottomBorder>
<Style>None</Style>
</BottomBorder>
<LeftBorder>
<Style>None</Style>
</LeftBorder>
<RightBorder>
<Style>None</Style>
</RightBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox32">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox32</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<TopBorder>
<Color>Black</Color>
</TopBorder>
<BottomBorder>
<Style>None</Style>
</BottomBorder> </BottomBorder>
<LeftBorder> <LeftBorder>
<Style>None</Style> <Style>None</Style>
@@ -415,15 +318,12 @@
<TablixMember> <TablixMember>
<Group Name="Detalles" /> <Group Name="Detalles" />
</TablixMember> </TablixMember>
<TablixMember>
<KeepWithGroup>Before</KeepWithGroup>
</TablixMember>
</TablixMembers> </TablixMembers>
</TablixRowHierarchy> </TablixRowHierarchy>
<DataSetName>DataSet1</DataSetName> <DataSetName>DataSet1</DataSetName>
<Top>2.78954cm</Top> <Top>2.78954cm</Top>
<Left>0.06614cm</Left> <Left>0.06614cm</Left>
<Height>1.08562cm</Height> <Height>0.8825cm</Height>
<Width>16.19696cm</Width> <Width>16.19696cm</Width>
<Style> <Style>
<Border> <Border>
@@ -1153,9 +1053,6 @@
<Height>0.50475cm</Height> <Height>0.50475cm</Height>
<Width>3.16146cm</Width> <Width>3.16146cm</Width>
<ZIndex>9</ZIndex> <ZIndex>9</ZIndex>
<Visibility>
<Hidden>true</Hidden>
</Visibility>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -1360,7 +1257,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>=Parameters!NombreEmpresa.Value</Value> <Value>BDH BATERIAS DISTRIBUCIONES DE HERMOSILLO</Value>
<Style> <Style>
<FontFamily>Myriad Pro</FontFamily> <FontFamily>Myriad Pro</FontFamily>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
@@ -1762,7 +1659,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName> <rd:DefaultName>Textbox3</rd:DefaultName>
<Top>0.2734cm</Top> <Top>0.27339cm</Top>
<Left>17.14236cm</Left> <Left>17.14236cm</Left>
<Height>0.68085cm</Height> <Height>0.68085cm</Height>
<Width>3.13456cm</Width> <Width>3.13456cm</Width>
@@ -1794,7 +1691,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox8</rd:DefaultName> <rd:DefaultName>Textbox8</rd:DefaultName>
<Top>0.2734cm</Top> <Top>0.27339cm</Top>
<Left>0.06614cm</Left> <Left>0.06614cm</Left>
<Height>0.68085cm</Height> <Height>0.68085cm</Height>
<Width>1.60042cm</Width> <Width>1.60042cm</Width>
@@ -1826,7 +1723,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox9</rd:DefaultName> <rd:DefaultName>Textbox9</rd:DefaultName>
<Top>0.2734cm</Top> <Top>0.27339cm</Top>
<Left>1.61047cm</Left> <Left>1.61047cm</Left>
<Height>0.68085cm</Height> <Height>0.68085cm</Height>
<Width>5.14936cm</Width> <Width>5.14936cm</Width>
@@ -1859,7 +1756,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox10</rd:DefaultName> <rd:DefaultName>Textbox10</rd:DefaultName>
<Top>0.2734cm</Top> <Top>0.27339cm</Top>
<Left>6.93622cm</Left> <Left>6.93622cm</Left>
<Height>0.68085cm</Height> <Height>0.68085cm</Height>
<Width>2.92333cm</Width> <Width>2.92333cm</Width>
@@ -1892,7 +1789,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox11</rd:DefaultName> <rd:DefaultName>Textbox11</rd:DefaultName>
<Top>0.2734cm</Top> <Top>0.27339cm</Top>
<Left>9.84544cm</Left> <Left>9.84544cm</Left>
<Height>0.68085cm</Height> <Height>0.68085cm</Height>
<Width>4.32745cm</Width> <Width>4.32745cm</Width>
@@ -1908,7 +1805,7 @@
</Style> </Style>
</Textbox> </Textbox>
<Line Name="Line2"> <Line Name="Line2">
<Top>0.15874cm</Top> <Top>0.15873cm</Top>
<Left>0.08599cm</Left> <Left>0.08599cm</Left>
<Height>0cm</Height> <Height>0cm</Height>
<Width>20.21078cm</Width> <Width>20.21078cm</Width>

View File

@@ -647,7 +647,7 @@ Partial Class General_SaldosIniciales
Dim DTCuentasContables As New DataTable Dim DTCuentasContables As New DataTable
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then If UsuarioActual.Empresa.TipoContabilizacion = 1 Or UsuarioActual.CveEmpresa.Contiene(172) Then
Dim ObjConta As New ClsContabilidad Dim ObjConta As New ClsContabilidad
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
@@ -2365,14 +2365,14 @@ Partial Class General_SaldosIniciales
DTClasificaiones.CaseSensitive = False DTClasificaiones.CaseSensitive = False
For Each dRow As DataRow In dt.Rows For Each dRow As DataRow In dt.FiltraParametros(" LEN(Clasificacion) > 0 ").Rows
Dim Clasificacion As String = dRow("Clasificacion").ToString().Trim Dim Clasificacion As String = Regex.Replace(dRow("Clasificacion").ToString().Trim.Replace("\r\n", "").Replace(vbCrLf, "").Replace(vbCr, ""), "[^\u0009\u000A\u000D\u0020-\u007E]", "")
Dim Categoria As String = dRow("Categoria").ToString().Trim Dim Categoria As String = dRow("Categoria").ToString().Trim.Replace("\r\n", "").Replace(vbCrLf, "").Replace(vbCr, "")
Dim UsoClasificacion As String = dRow("UsoClasificacion").ToString().Trim.ToUpper Dim UsoClasificacion As String = dRow("UsoClasificacion").ToString().Trim.ToUpper.Replace("\r\n", "").Replace(vbCrLf, "").Replace(vbCr, "")
Dim CuentaContableIngreso As String = dRow("CuentaContableIngreso").ToString().Trim.Replace("-", "") Dim CuentaContableIngreso As String = dRow("CuentaContableIngreso").ToString().Trim.Replace("-", "").Replace("\r\n", "").Replace(vbCrLf, "").Replace(vbCr, "")
Dim CuentaContableGasto As String = dRow("CuentaContableGasto").ToString().Trim.Replace("-", "") Dim CuentaContableGasto As String = dRow("CuentaContableGasto").ToString().Trim.Replace("-", "").Replace("\r\n", "").Replace(vbCrLf, "").Replace(vbCr, "")
Dim CveClasificacion As Integer = -1 Dim CveClasificacion As Integer = -1
Dim CveUsoClasificacion As Integer = -1 Dim CveUsoClasificacion As Integer = -1
@@ -2441,13 +2441,19 @@ Partial Class General_SaldosIniciales
Else Else
ErrorProceso = True ErrorProceso = True
End If End If
Else
If Not ObjClasificaciones.UpdateClasificacion(Clasificacion, "-1", -1, "-1", -1, "-1", -1, "-1", True, True, CveCategoria, UsuarioActual.CveUsuario, CveClasificacion, UsoClasificacion:=CveUsoClasificacion) Then
ErrorProceso = True
End If
End If End If
If Not ErrorProceso Then If Not ErrorProceso Then
If CveCuentaContableIngreso > 0 Then If CveCuentaContableIngreso > 0 Then
If Not AsignacionCuenta(ObjConta, 4, CveCuentaContableIngreso, -1, -1, -1, -1, UsuarioActual.CveEmpresa, CveClasificacion) Then If Not AsignacionCuenta(ObjConta, 4, CveCuentaContableIngreso, -1, -1, -1, -1, UsuarioActual.CveEmpresa, CveClasificacion, OpActualizarClasificacion:=True) Then
ErrorProceso = True ErrorProceso = True
Alert("Se presento un error al guardar en asignaciones", TipoMensaje.MsgAdvertencia) Alert("Se presento un error al guardar en asignaciones", TipoMensaje.MsgAdvertencia)
Exit For Exit For
@@ -2455,7 +2461,7 @@ Partial Class General_SaldosIniciales
End If End If
If CveCuentaContableGasto > 0 Then If CveCuentaContableGasto > 0 Then
If Not AsignacionCuenta(ObjConta, 6, CveCuentaContableGasto, -1, -1, -1, -1, UsuarioActual.CveEmpresa, CveClasificacion) Then If Not AsignacionCuenta(ObjConta, 6, CveCuentaContableGasto, -1, -1, -1, -1, UsuarioActual.CveEmpresa, CveClasificacion, OpActualizarClasificacion:=True) Then
ErrorProceso = True ErrorProceso = True
Alert("Se presento un error al guardar en asignaciones", TipoMensaje.MsgAdvertencia) Alert("Se presento un error al guardar en asignaciones", TipoMensaje.MsgAdvertencia)
Exit For Exit For
@@ -2890,7 +2896,7 @@ Partial Class General_SaldosIniciales
Private Function AsignacionCuenta(ObjContabilidad As ClsContabilidad, CveConceptoContable As Integer, CveCuentaContable As Integer, CveBancoCuenta As Integer, CveProveedor As Integer, CveCliente As Integer, Private Function AsignacionCuenta(ObjContabilidad As ClsContabilidad, CveConceptoContable As Integer, CveCuentaContable As Integer, CveBancoCuenta As Integer, CveProveedor As Integer, CveCliente As Integer,
CvePersonal As Integer, CveEmpresa As Integer, CveClasificacion As Integer) As Boolean CvePersonal As Integer, CveEmpresa As Integer, CveClasificacion As Integer, Optional OpActualizarClasificacion As Boolean = False) As Boolean
Dim Respuesta As Boolean = False Dim Respuesta As Boolean = False
@@ -2898,7 +2904,7 @@ Partial Class General_SaldosIniciales
If ObjContabilidad.AddCuentasAsignaciones(CveConceptoContable, CveEmpresa, CveCuentaContable, -1, If ObjContabilidad.AddCuentasAsignaciones(CveConceptoContable, CveEmpresa, CveCuentaContable, -1,
CveProveedor, CveCliente, CvePersonal, CveClasificacion, -1, 0, CveBancoCuenta:=CveBancoCuenta, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=-1, CveProveedor, CveCliente, CvePersonal, CveClasificacion, -1, 0, CveBancoCuenta:=CveBancoCuenta, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=-1,
CveTipoGasto:=-1, RegeneraCuenta:=False) Then CveTipoGasto:=-1, RegeneraCuenta:=False, OpActualizarClasificacion:=OpActualizarClasificacion) Then
Respuesta = True Respuesta = True
End If End If

View File

@@ -706,7 +706,7 @@
<div class="row rowpadding" > <div class="row rowpadding" >
<label class="col-md-3">Direccón:</label> <label class="col-md-3">Direccón:</label>
<div class="col-md-9"> <div class="col-md-9">
<asp:DropDownList ID="DdlDireccionEnvio" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="SucursalClienteVentaDireccion" DataValueField="CveDireccionEnvio" Width="180px" Visible="false" > <asp:DropDownList ID="DdlDireccionEnvio" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="SucursalClienteVentaDireccion" DataValueField="CveDireccionEnvio" Width="180px" Visible="true" >
<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>

View File

@@ -373,7 +373,7 @@ Partial Class Inventarios_EntradasSalidas
End If End If
If IfNull(Request("APOYO"), "").ToString = "1" Then If IfNull(Request("AL"), "").ToString = "1" Then
DivEmitirTransitorio.Visible = True DivEmitirTransitorio.Visible = True
EsApoyoLogistico = True EsApoyoLogistico = True
End If End If
@@ -643,7 +643,8 @@ Partial Class Inventarios_EntradasSalidas
End If End If
If EsApoyoLogistico Then If EsApoyoLogistico Then
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (27)") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa) DdlAlmacen.Items.Clear()
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (27)") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
End If End If
DdlAlmacenInventarioFisico.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (9,11)") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa) DdlAlmacenInventarioFisico.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (9,11)") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
@@ -1435,7 +1436,7 @@ Partial Class Inventarios_EntradasSalidas
Private Sub AgregarPS() Private Sub AgregarPS()
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltroPrimero("")
If ChkEmitirTimbrado.Checked AndAlso ChkEmitirCartaPorte.Checked Then If ChkEmitirTimbrado.Checked AndAlso ChkEmitirCartaPorte.Checked Then
If Not ValidaPSSAT(DrPS) Then If Not ValidaPSSAT(DrPS) Then
Exit Sub Exit Sub
@@ -2385,7 +2386,13 @@ Partial Class Inventarios_EntradasSalidas
If UsuarioActual.CveUsuario.Contiene(2185, 100) Then If UsuarioActual.CveUsuario.Contiene(2185, 100) Then
DdlConcepto.Items.Add(New ListItem("Entrada por Ajuste", "32")) DdlConcepto.Items.Add(New ListItem("Entrada por Ajuste", "32"))
DdlConcepto.Items.Add(New ListItem("Salida por Ajuste", "34")) DdlConcepto.Items.Add(New ListItem("Salida por Ajuste", "34"))
End If
If EsApoyoLogistico Then
DdlConcepto.Items.Clear()
DdlConcepto.Items.Add(New ListItem("Selecione Uno", "-1"))
DdlConcepto.Items.Add(New ListItem("Salida de Almacen", "3"))
End If End If
DdlConcepto.SelectedValue = "-1" DdlConcepto.SelectedValue = "-1"
@@ -3881,7 +3888,7 @@ Partial Class Inventarios_EntradasSalidas
Else Else
If ObjInventario.Modulo.Contiene("TA/G1", "Recons") Then If ObjInventario.Modulo.Contiene("TA/G1", "Recons") Then
Contabilizable = False Contabilizable = False
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 289, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoRelacionado, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=Contabilizable) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoRelacionado, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=Contabilizable) Then
ErrorMovInv = True ErrorMovInv = True
End If End If
Else Else

View File

@@ -146,15 +146,17 @@
<div class="col-md-4"> <div class="col-md-4">
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="500" Rows="3" TextMode="MultiLine" CssClass="form-control" /> <asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="500" Rows="3" TextMode="MultiLine" CssClass="form-control" />
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
<b>Tipo de Orden:</b> <b>Tipo de Orden:</b>
</div> </div>
<div class="col-md-3" style="margin-top: 5px;text-align:left"> <div class="col-md-3" style="margin-top: 5px;text-align:left">
<asp:DropDownList ID="DdlTipoOrdenOS" CssClass="form-control input-sm select2me" runat="server" DataTextField="OrdenServicioTipo" DataValueField="CveOrdenServicioTipo" Width="100%" Height="30px"> <asp:DropDownList ID="DdlTipoOrdenOS" CssClass="form-control input-sm select2me" runat="server" DataTextField="OrdenServicioTipo" DataValueField="CveOrdenServicioTipo" Width="100%" Height="30px">
</asp:DropDownList> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTipoOS" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlTipoOrdenOS" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Orden''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVTipoOS" runat="server" CssClass="help-block errorimput" Display="Dynamic" ControlToValidate="DdlTipoOrdenOS" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Orden''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETipoOS" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoOS" Width="100px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCETipoOS" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoOS" Width="100px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<div class="row" > <div class="row" >
@@ -314,10 +316,10 @@
<asp:Panel ID="PnlTitulosPS" runat="server"> <asp:Panel ID="PnlTitulosPS" runat="server">
<table border="0" class="table table-striped mygvps Widthall"> <table border="0" class="table table-striped mygvps Widthall">
<tr class="Titulos TextTab"> <tr class="Titulos TextTab">
<th>#</th> <th style="width:50px">#</th>
<th>Cant</th> <th style="width:50px">Cant</th>
<th>Servicio</th> <th>Servicio</th>
<th id="thCuentaEquipo" runat="server"> <th id="thCuentaEquipo" runat="server" style="width:200px">
<asp:Label runat="server" ID="LblCuentaEquipoTH"> Cuenta y/o Equipo</asp:Label><br /> <asp:Label runat="server" ID="LblCuentaEquipoTH"> Cuenta y/o Equipo</asp:Label><br />
<asp:DropDownList ID="DdlCuentaEquipo" runat="server" AutoPostBack="true" DataTextField="CuentaEquipo" DataValueField="CveCuentaEquipo" CssClass="form-control input-sm select2me" Width="15%"> <asp:DropDownList ID="DdlCuentaEquipo" runat="server" AutoPostBack="true" DataTextField="CuentaEquipo" DataValueField="CveCuentaEquipo" CssClass="form-control input-sm select2me" Width="15%">
@@ -326,7 +328,7 @@
<th> <th>
<asp:Label ID="LblA" runat="server" ToolTip="Archivo" Text="<i class='fa fa-download'></i>"></asp:Label> <asp:Label ID="LblA" runat="server" ToolTip="Archivo" Text="<i class='fa fa-download'></i>"></asp:Label>
</th> </th>
<th>Comandos</th> <th style="width:250px">Comandos</th>
</tr> </tr>
</table> </table>
</asp:Panel> </asp:Panel>

View File

@@ -6,6 +6,7 @@ Imports System.IO
Imports System.Data Imports System.Data
Imports Microsoft.Reporting.WebForms Imports Microsoft.Reporting.WebForms
Imports ADSNetLibrary.SIGAPI.Models.Sistema Imports ADSNetLibrary.SIGAPI.Models.Sistema
Imports Telerik.Charting.Styles
'Imports msExcel = Microsoft.Office.Interop.Excel 'Imports msExcel = Microsoft.Office.Interop.Excel
'Imports VBIDE 'Imports VBIDE
@@ -375,19 +376,24 @@ Partial Class OS_OrdenesServicios
If CveOS = -1 Then If CveOS = -1 Then
CargaCliente(-1, 1, True) CargaCliente(-1, 1, True)
End If End If
Else Else
LblCuentaEquipoTH.Visible = False LblCuentaEquipoTH.Visible = False
DdlCuentaEquipo.Visible = False DdlCuentaEquipo.Visible = False
End If End If
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
'DivDetalles.Attributes.Add("style", "display:none") 'No se usa .visible = false pora que la llamada a updatepanel no cause errores de js en el cliente DivMateriales.Attributes.Add("style", "display:none") 'No se usa .visible = false pora que la llamada a updatepanel no cause errores de js en el cliente
TREstatus.Visible = False TREstatus.Visible = False
LblCuentaEquipoTH.Visible = False
DdlCuentaEquipo.Visible = False
TREstatus2.Visible = If(TipoEstatus.Contiene(4, 5), False, True) TREstatus2.Visible = If(TipoEstatus.Contiene(4, 5), False, True)
DdlPsModalFinalizar.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1") DdlPsModalFinalizar.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
@@ -1575,10 +1581,10 @@ Partial Class OS_OrdenesServicios
Protected Sub GVEventoBitacora_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEB.RowDataBound Protected Sub GVEventoBitacora_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEB.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then If e.Row.RowIndex = 0 Then
e.Row.Cells(0).Width = Unit.Pixel(200) e.Row.Cells(0).Width = 200
e.Row.Cells(1).Width = Unit.Pixel(200) e.Row.Cells(1).Width = 200
e.Row.Cells(2).Width = Unit.Pixel(100) e.Row.Cells(2).Width = 100
e.Row.Cells(3).Width = Unit.Pixel(500) e.Row.Cells(3).Width = 500
End If End If
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Left e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Left
End If End If

View File

@@ -75,12 +75,28 @@
</style> </style>
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" /> <%-- <asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />--%>
</asp:Content> </asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server"> <asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Reporte de Ordenes de Servicio Reporte de Ordenes de Servicio
</asp:Content> </asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkExportar" runat="server" > <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkExportar" />
</Triggers>
</asp:UpdatePanel>
</asp:Content> </asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server"> <asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
@@ -96,8 +112,7 @@
<div class="row"> <div class="row">
<label class="col-md-1">Cliente: </label> <label class="col-md-1">Cliente: </label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" ID="DdlClientes" DataTextField="Nombre" DataValueField="CveCliente" runat="server" AutoPostBack="true"> <ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
</asp:DropDownList>
</div> </div>
<label class="col-md-1 ">Centro de Costo:</label> <label class="col-md-1 ">Centro de Costo:</label>
@@ -139,7 +154,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<label class="col-md-1 truncate">F.I.:</label> <label class="col-md-1 truncate">F.Inicio:</label>
<div class="col-md-2"> <div class="col-md-2">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;"> <div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;">
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox> <asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
@@ -154,7 +169,7 @@
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<label class="col-md-1 truncate">F.F.:</label> <label class="col-md-1 truncate">F.Fin:</label>
<div class="col-md-2"> <div class="col-md-2">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;"> <div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;">
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox> <asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
@@ -226,6 +241,36 @@
<asp:Literal ID="LtlSubProyecto" runat="server" Text='<%# Eval("SubProyecto", "{0}")%>'></asp:Literal> <asp:Literal ID="LtlSubProyecto" runat="server" Text='<%# Eval("SubProyecto", "{0}")%>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
<HeaderTemplate>
Estatus
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlEstatusOrdenServicio" runat="server" Text='<%# Eval("EstatusOrdenServicio")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
<HeaderTemplate>
Técnico Asignado
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LblUsuarioAsignado" runat="server" Text='<%# Eval("UsuarioAsignado")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
<HeaderTemplate>
Ubicación
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LblDireccion" runat="server" Text='<%# Eval("Direccion")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center"> <asp:TemplateField ItemStyle-HorizontalAlign="Center">
<HeaderTemplate> <HeaderTemplate>
Fecha Recepción Fecha Recepción
@@ -234,15 +279,6 @@
<asp:Literal ID="LtlFechaRecepcion" runat="server" Text='<%# Eval("FechaRecepcion", "{0:d}")%>'></asp:Literal> <asp:Literal ID="LtlFechaRecepcion" runat="server" Text='<%# Eval("FechaRecepcion", "{0:d}")%>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-CssClass="Excede truncate">
<HeaderTemplate>
Usuario Recibió
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LtlUsuarioRecibio" runat="server" data-toggle="tooltip" title='<%# Eval("UsuarioRecibio")%>' Text='<%# Eval("UsuarioRecibio")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left"> <asp:TemplateField ItemStyle-HorizontalAlign="Left">
<HeaderTemplate> <HeaderTemplate>
Estatus Estatus
@@ -251,6 +287,7 @@
<asp:Literal ID="LtlEstatusOrdenServicio" runat="server" Text='<%# Eval("EstatusOrdenServicio")%>'></asp:Literal> <asp:Literal ID="LtlEstatusOrdenServicio" runat="server" Text='<%# Eval("EstatusOrdenServicio")%>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField Visible="false" ItemStyle-HorizontalAlign="Center">
<HeaderTemplate>Fecha Cita</HeaderTemplate> <HeaderTemplate>Fecha Cita</HeaderTemplate>
<ItemTemplate> <ItemTemplate>

View File

@@ -27,9 +27,10 @@ Partial Class OS_RepOrdenesServicios
Private Sub CargaCombos() Private Sub CargaCombos()
'CargaClientes 'CargaClientes
DdlClientes.DataSource() = GlobalDTCliente(UsuarioActual.CveEmpresa) DdlClientes.setEsWebService(True)
DdlClientes.DataBind() 'DdlClientes.DataSource() = GlobalDTCliente(UsuarioActual.CveEmpresa)
DdlClientes.Items.Insert(0, New ListItem("Todos", "-1")) 'DdlClientes.DataBind()
'DdlClientes.Items.Insert(0, New ListItem("Todos", "-1"))
'CargaSubProyectos 'CargaSubProyectos
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, Estatus:=1) DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, Estatus:=1)
@@ -82,28 +83,28 @@ Partial Class OS_RepOrdenesServicios
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then 'If e.Row.RowIndex = 0 Then
e.Row.Cells(0).Width = Unit.Pixel(50) ' e.Row.Cells(0).Width = Unit.Pixel(50)
e.Row.Cells(1).Width = Unit.Pixel(200) ' e.Row.Cells(1).Width = Unit.Pixel(200)
e.Row.Cells(2).Width = Unit.Pixel(130) ' e.Row.Cells(2).Width = Unit.Pixel(130)
'e.Row.Cells(3).Width = Unit.Pixel(100) ' 'e.Row.Cells(3).Width = Unit.Pixel(100)
e.Row.Cells(4).Width = Unit.Pixel(100) ' e.Row.Cells(4).Width = Unit.Pixel(100)
e.Row.Cells(5).Width = Unit.Pixel(100) ' e.Row.Cells(5).Width = Unit.Pixel(100)
'e.Row.Cells(6).Width = Unit.Pixel(100) ' 'e.Row.Cells(6).Width = Unit.Pixel(100)
End If 'End If
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
e.Row.FCLiteral("LtlFolio").Text = "<a class=""Texto"" href=""/OS/OrdenesServicios.aspx?CveOS=" & e.Row.DBCampo("CveOS") & """>" & e.Row.FCLiteral("LtlFolio").Text & "</a>" e.Row.FCLiteral("LtlFolio").Text = "<a class=""Texto"" href=""/OS/OrdenesServicios.aspx?CveOS=" & e.Row.DBCampo("CveOS") & """>" & e.Row.FCLiteral("LtlFolio").Text & "</a>"
e.Row.FCLabel("LtlCliente").Text = "<a class=""Texto"" href=""/OS/OrdenesServicios.aspx?CveOS=" & e.Row.DBCampo("CveOS") & """>" & e.Row.FCLabel("LtlCliente").Text & "</a>" 'e.Row.FCLabel("LtlCliente").Text = "<a class=""Texto"" href=""/OS/OrdenesServicios.aspx?CveOS=" & e.Row.DBCampo("CveOS") & """>" & e.Row.FCLabel("LtlCliente").Text & "</a>"
e.Row.FCLiteral("LtlFechaRecepcion").Text = "<a class=""Texto"" href=""/OS/OrdenesServicios.aspx?CveOS=" & e.Row.DBCampo("CveOS") & """>" & e.Row.FCLiteral("LtlFechaRecepcion").Text & "</a>" 'e.Row.FCLiteral("LtlFechaRecepcion").Text = "<a class=""Texto"" href=""/OS/OrdenesServicios.aspx?CveOS=" & e.Row.DBCampo("CveOS") & """>" & e.Row.FCLiteral("LtlFechaRecepcion").Text & "</a>"
e.Row.FCLabel("LtlDescripcion").Text = "<a class=""Texto"" href=""/OS/OrdenesServicios.aspx?CveOS=" & e.Row.DBCampo("CveOS") & """>" & e.Row.FCLabel("LtlDescripcion").Text & "</a>" 'e.Row.FCLabel("LtlDescripcion").Text = "<a class=""Texto"" href=""/OS/OrdenesServicios.aspx?CveOS=" & e.Row.DBCampo("CveOS") & """>" & e.Row.FCLabel("LtlDescripcion").Text & "</a>"
e.Row.FCLabel("LtlUsuarioRecibio").Text = "<a class=""Texto"" href=""/OS/OrdenesServicios.aspx?CveOS=" & e.Row.DBCampo("CveOS") & """>" & e.Row.FCLabel("LtlUsuarioRecibio").Text & "</a>" 'e.Row.FCLabel("LtlUsuarioRecibio").Text = "<a class=""Texto"" href=""/OS/OrdenesServicios.aspx?CveOS=" & e.Row.DBCampo("CveOS") & """>" & e.Row.FCLabel("LtlUsuarioRecibio").Text & "</a>"
e.Row.FCLiteral("LtlEstatusOrdenServicio").Text = "<a class=""Texto"" href=""/OS/OrdenesServicios.aspx?CveOS=" & e.Row.DBCampo("CveOS") & """>" & e.Row.FCLiteral("LtlEstatusOrdenServicio").Text & "</a>" 'e.Row.FCLiteral("LtlEstatusOrdenServicio").Text = "<a class=""Texto"" href=""/OS/OrdenesServicios.aspx?CveOS=" & e.Row.DBCampo("CveOS") & """>" & e.Row.FCLiteral("LtlEstatusOrdenServicio").Text & "</a>"
End If End If
End Sub End Sub
Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click 'Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click
GvDatos.ExportToExcel("RepOrdenesServicio_" & Now.ToShortDateString) ' GvDatos.ExportToExcel("RepOrdenesServicio_" & Now.ToShortDateString)
End Sub 'End Sub
#Region "O R D E N A M I E N T O" #Region "O R D E N A M I E N T O"
Private Sub OrdenaDatos() Private Sub OrdenaDatos()
@@ -119,4 +120,22 @@ Partial Class OS_RepOrdenesServicios
CargaDatos() CargaDatos()
UpDatos.Update() UpDatos.Update()
End Sub End Sub
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
End Sub
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
Imprimir("Excel")
End Sub
Private Sub Imprimir(Optional reporte As String = "PDF")
If GvDatos.Rows.Count > 0 Then
Dim StrFiltro As New StringBuilder
If txtFechaF.Text <> "" Then StrFiltro.AppendFormat(" Fecha Fin: {0}", txtFechaF.Text)
ExportToExcelG(GvDatos, "OrdenesServicio .xlsx", "Ordenes de Servicio ", UsuarioActual, StrFiltro.ToString, 100, 150)
Else
Alert("Debe consultar para generar un excel", TipoMensaje.MsgAdvertencia)
End If
End Sub
End Class End Class

View File

@@ -180,7 +180,7 @@
Orden de Servicio: Orden de Servicio:
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<asp:DropDownList runat="server" ID="DdlOrdenesSinAsignar" CssClass="select2me" DataValueField="CveOSDetalle" DataTextField="ConceptoDdl" Width="100%"></asp:DropDownList> <asp:DropDownList runat="server" ID="DdlOrdenesSinAsignar" CssClass="select2me" DataValueField="CveOSDetalle" DataTextField="ConceptoAsignacionDdl" Width="100%"></asp:DropDownList>
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
<asp:LinkButton runat="server" ID="LnkOrdenesSinAsignarMostarModal" CssClass="Texto" OnClick="LnkOrdenesSinAsignarMostarModal_Click">Asignar</asp:LinkButton> <asp:LinkButton runat="server" ID="LnkOrdenesSinAsignarMostarModal" CssClass="Texto" OnClick="LnkOrdenesSinAsignarMostarModal_Click">Asignar</asp:LinkButton>

View File

@@ -321,28 +321,28 @@ Partial Class OS_RepServicioDomicilio
Private Sub CargaTecnicosAsignar() Private Sub CargaTecnicosAsignar()
Dim ObjOS As New ClsOS 'Dim ObjOS As New ClsOS
Dim TecnicosSubProyectos As New DataTable 'Dim TecnicosSubProyectos As New DataTable
Dim TecnicosResultado As New DataTable 'Dim TecnicosResultado As New DataTable
If ObjOS.GetSubProyectosEstatusInicial(-1, 3, UsuarioActual.CveEmpresa) Then 'If ObjOS.GetSubProyectosEstatusInicial(-1, 3, UsuarioActual.CveEmpresa) Then
TecnicosSubProyectos = ObjOS.DtResultados ' TecnicosSubProyectos = ObjOS.DtResultados
End If 'End If
For Each SubProyecto As DataRow In DT_OSSubProyectos.Rows 'For Each SubProyecto As DataRow In DT_OSSubProyectos.Rows
Dim TecnicosSubProyectoAux As DataTable = TecnicosSubProyectos.FiltraParametros(String.Format("SubProyecto = '{0}'", SubProyecto.Item("SubProyecto"))) ' Dim TecnicosSubProyectoAux As DataTable = TecnicosSubProyectos.FiltraParametros(String.Format("SubProyecto = '{0}'", SubProyecto.Item("SubProyecto")))
If TecnicosSubProyectoAux.Rows.Count > 0 Then ' If TecnicosSubProyectoAux.Rows.Count > 0 Then
Dim EstatusDeTipoProcesoMenor As Integer = TecnicosSubProyectoAux.Rows(0).Item("CveEstatusOrdenServicio").ToString.ToEntero ' Dim EstatusDeTipoProcesoMenor As Integer = TecnicosSubProyectoAux.Rows(0).Item("CveEstatusOrdenServicio").ToString.ToEntero
Dim dtAuxiliar As New DataTable ' Dim dtAuxiliar As New DataTable
dtAuxiliar = TecnicosSubProyectos.FiltraParametros(String.Format("SubProyecto = '{0}' AND CveEstatusOrdenServicio = {1}", SubProyecto.Item("SubProyecto"), EstatusDeTipoProcesoMenor), "", {"CveUsuario", "Nombre"}) ' dtAuxiliar = TecnicosSubProyectos.FiltraParametros(String.Format("SubProyecto = '{0}' AND CveEstatusOrdenServicio = {1}", SubProyecto.Item("SubProyecto"), EstatusDeTipoProcesoMenor), "", {"CveUsuario", "Nombre"})
TecnicosResultado.Merge(dtAuxiliar) ' TecnicosResultado.Merge(dtAuxiliar)
End If ' End If
Next 'Next
'DtTecnicosSubProyectos = TecnicosResultado ''DtTecnicosSubProyectos = TecnicosResultado
ObjOS.Dispose() 'ObjOS.Dispose()
DdlTecnicoAsignar.DataSource = TecnicosResultado DdlTecnicoAsignar.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True'")
DdlTecnicoAsignar.DataBind() DdlTecnicoAsignar.DataBind()
DdlTecnicoAsignar.Items.Insert(0, New ListItem("Seleccione uno", "-1")) DdlTecnicoAsignar.Items.Insert(0, New ListItem("Seleccione uno", "-1"))

View File

@@ -254,10 +254,26 @@ Partial Class CatPS
Dim lista = New List(Of CrystalParametro) Dim lista = New List(Of CrystalParametro)
lista.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa)) lista.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa))
lista.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Usuario)) lista.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Usuario))
lista.Add(New CrystalParametro("AplicaVenta", AplicaVenta.ToString)) lista.Add(New CrystalParametro("AplicaVenta", AplicaVenta.ToString))
lista.Add(New CrystalParametro("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) 'lista.Add(New CrystalParametro("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
If Imagen.Exists Then
lista.Add(New CrystalParametro("LogoPath", $"file://{Imagen.FullName}"))
Else
lista.Add(New CrystalParametro("LogoPath", ""))
End If
If Archivo.Exists Then
ImprimirbytesPDF(ImprimirPDFCrystal(Archivo.FullName, DtDatos, lista, "Productos y Servicios", Formato), "Productos y Servicios", Formato)
Else
Dim Ruta As String = ModExtensiones.DirectorioBaseEmpresas + $"Empresas\Grales\Formatos\CatPS.rpt"
ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, DtDatos, lista, "Productos y Servicios", Formato), "Productos y Servicios", Formato)
End If
ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/CatPS.rpt"), DtDatos, lista, "Productos y Servicios", Formato), "Productos y Servicios", Formato)
End Sub End Sub

View File

@@ -16362,75 +16362,89 @@ Partial Class Ventas
If importeMovimiento <> 0 Then If importeMovimiento <> 0 Then
Dim Pago As New VentaPago Dim Pago As New VentaPago
Pago.ImportePagoVenta = importeMovimiento
Pago.ImportePago = importeMovimiento Pago.ImportePago = importeMovimiento
Pago.CveIE = CveIEAnticipo Pago.CveIE = CveIEAnticipo
Pago.CveMonedaPago = gvr.DataKey("CveMoneda").ToEntero() Pago.CveMonedaPago = gvr.DataKey("CveMoneda").ToEntero()
Pago.TipoPago = "A" Pago.TCPago = gvr.DataKey("TipoCambio").ToDecimal
Pago.TipoPago = "I"
Pago.FechaDocumentoRelacionado = gvr.DataKey("Fecha").ToDate
Pago.CveVentaAmortizacion = gvr.DataKey("CveVenta").ToEntero() Pago.CveVentaAmortizacion = gvr.DataKey("CveVenta").ToEntero()
Pago.AplicaTraslado = gvr.DataKey("RegresarImpuesto") = "1" Pago.AplicaTraslado = gvr.DataKey("RegresarImpuesto") = "1"
Pago.Referencia = gvr.DataKey("Folio") Pago.Referencia = gvr.DataKey("Folio")
ErrorConta = AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjConta) ErrorConta = AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjConta)
' Agregamos el 2 'Dim Pago As New VentaPago
If tipoCambioPago = 1 Then 'Pago.ImportePagoVenta = importeMovimiento
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Concepto, 2, Concepto, Now, IdCtaContClientes, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento, CveSubProyecto:=CveSubProyectoVenta) Then 'Pago.ImportePago = importeMovimiento
ErrorConta = True 'Pago.CveIE = CveIEAnticipo
End If 'Pago.CveMonedaPago = gvr.DataKey("CveMoneda").ToEntero()
Else 'Cuando son dolares 'Pago.TCPago = gvr.DataKey("TipoCambio").ToDecimal
If importeMovimiento <> 0 Then 'Pago.TipoPago = "I"
If IdCtaContComplementaria > 0 Or 0 > 0 Then 'Pago.FechaDocumentoRelacionado = gvr.DataKey("Fecha").ToDate
'Agregamos la Complementaria 'Pago.CveVentaAmortizacion = gvr.DataKey("CveVenta").ToEntero()
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, 0, Concepto, 207, Concepto, Now, IdCtaContComplementaria, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=Math.Round(importeMovimiento * tipoCambioVenta - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=importeMovimiento, CveCuenta:=0, TipoCambio:=tipoCambioVenta, CveSubProyecto:=CveSubProyectoVenta) Then 'Pago.Referencia = gvr.DataKey("Folio")
ErrorConta = True
End If
'Agregamos la Extranjera
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Concepto, 2, Concepto, Now, IdCtaContMonedaExtranjera, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=0, TipoCambio:=tipoCambioVenta, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True
End If
Else
'Agregamos la Extranjera
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Concepto, 2, Concepto, Now, IdCtaContMonedaExtranjera, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=Math.Round(importeMovimiento * tipoCambioVenta, 2, MidpointRounding.AwayFromZero), ImporteME:=importeMovimiento, CveCuenta:=0, TipoCambio:=tipoCambioVenta, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True
End If
End If
End If
End If
importeMovimiento = ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / TxtTotal.Text.ToDecimal) * TxtIVA.Text.ToDecimal) '' Agregamos el 2
importeMN = Math.Round(importeMovimiento * tipoCambioPago, 2, MidpointRounding.AwayFromZero) 'If tipoCambioPago = 1 Then
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Concepto, 2, Concepto, Now, IdCtaContClientes, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento, CveSubProyecto:=CveSubProyectoVenta) Then
' ErrorConta = True
' End If
'Else 'Cuando son dolares
' If importeMovimiento <> 0 Then
' If IdCtaContComplementaria > 0 Or 0 > 0 Then
' 'Agregamos la Complementaria
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, 0, Concepto, 207, Concepto, Now, IdCtaContComplementaria, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=Math.Round(importeMovimiento * tipoCambioVenta - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=importeMovimiento, CveCuenta:=0, TipoCambio:=tipoCambioVenta, CveSubProyecto:=CveSubProyectoVenta) Then
' ErrorConta = True
' End If
' 'Agregamos la Extranjera
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Concepto, 2, Concepto, Now, IdCtaContMonedaExtranjera, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=0, TipoCambio:=tipoCambioVenta, CveSubProyecto:=CveSubProyectoVenta) Then
' ErrorConta = True
' End If
' Else
' 'Agregamos la Extranjera
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Concepto, 2, Concepto, Now, IdCtaContMonedaExtranjera, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=Math.Round(importeMovimiento * tipoCambioVenta, 2, MidpointRounding.AwayFromZero), ImporteME:=importeMovimiento, CveCuenta:=0, TipoCambio:=tipoCambioVenta, CveSubProyecto:=CveSubProyectoVenta) Then
' ErrorConta = True
' End If
' End If
' End If
'End If
'importeMovimiento = ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / TxtTotal.Text.ToDecimal) * TxtIVA.Text.ToDecimal)
'importeMN = Math.Round(importeMovimiento * tipoCambioPago, 2, MidpointRounding.AwayFromZero)
'Agregamos el 92 ''Agregamos el 92
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal 'gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal - ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("TotalAnticipo" & gvr.RowIndex).ToDecimal) * gvr.DataKey("IVAAnticipo").ToDecimal) 'importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal 'gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal - ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("TotalAnticipo" & gvr.RowIndex).ToDecimal) * gvr.DataKey("IVAAnticipo").ToDecimal)
importeMN = Math.Round(importeMovimiento * tipoCambioPago, 2, MidpointRounding.AwayFromZero) 'importeMN = Math.Round(importeMovimiento * tipoCambioPago, 2, MidpointRounding.AwayFromZero)
IdCtaContable = IdCtaContAnticipos 'IdCtaContable = IdCtaContAnticipos
If ObjCliente.GetClientes(gvr.DataKey("CveCliente").ToEntero(), "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then 'If ObjCliente.GetClientes(gvr.DataKey("CveCliente").ToEntero(), "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then ' If ObjCliente.DtResultados.Rows.Count > 0 Then
If Not tipoCambioPago = 1 Then ' If Not tipoCambioPago = 1 Then
IdCtaContable = ObjCliente.IdCtaMonedaExtranjeraAnticipos ' IdCtaContable = ObjCliente.IdCtaMonedaExtranjeraAnticipos
Else ' Else
IdCtaContable = ObjCliente.IdCtaContAnticipos ' IdCtaContable = ObjCliente.IdCtaContAnticipos
End If ' End If
End If ' End If
End If 'End If
If UsuarioActual.CveEmpresa.Contiene(119) Then 'If UsuarioActual.CveEmpresa.Contiene(119) Then
If gvr.DataKey("Fecha").ToDate.Year <= 2017 AndAlso TxtFechaAnticipoCliente.Text.ToDate.Year >= 2018 Then ' If gvr.DataKey("Fecha").ToDate.Year <= 2017 AndAlso TxtFechaAnticipoCliente.Text.ToDate.Year >= 2018 Then
If ObjCliente.DtResultados.Rows.Count > 0 Then ' If ObjCliente.DtResultados.Rows.Count > 0 Then
If Not tipoCambioPago = 1 Then ' If Not tipoCambioPago = 1 Then
IdCtaContable = ObjCliente.IdCtaContMonedaExtranjera ' IdCtaContable = ObjCliente.IdCtaContMonedaExtranjera
Else ' Else
IdCtaContable = ObjCliente.IdCtaContClientes ' IdCtaContable = ObjCliente.IdCtaContClientes
End If ' End If
End If ' End If
End If ' End If
End If 'End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, 555, Concepto, Now, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMN, CveCuenta:=-1, TipoCambio:=tipoCambioPago, CveSubProyecto:=CveSubProyectoVenta) Then 'If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, 555, Concepto, Now, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMN, CveCuenta:=-1, TipoCambio:=tipoCambioPago, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True ' ErrorConta = True
End If 'End If
End If End If
End If End If