rdlc 4.0 emp 38,137 , Compras redondedo concepto 68, RegPrepolizas tipo de gasto
This commit is contained in:
@@ -1401,8 +1401,11 @@ Partial Class Bancos_Creditos
|
|||||||
Next
|
Next
|
||||||
TotalAnticipoVinculado += RowIE("Importe").ToString.ToDouble
|
TotalAnticipoVinculado += RowIE("Importe").ToString.ToDouble
|
||||||
|
|
||||||
If TotalAnticipoVinculado > TotalAnticipo Then
|
|
||||||
Alert("El anticipo vinculado no puede exceder el anticipo especificado.", TipoMensaje.MsgAdvertencia)
|
Dim TotalAnticipoMasTolerancia As Decimal = TotalAnticipo.ToDecimal + (TotalAnticipo * 0.16).ToDecimal
|
||||||
|
|
||||||
|
If TotalAnticipoVinculado > TotalAnticipoMasTolerancia Then
|
||||||
|
Alert($"El anticipo vinculado ({TotalAnticipoVinculado.ToString("###,###,###.00")}) no puede exceder el anticipo especificado ({TotalAnticipoMasTolerancia.ToString("###,###,###.00")} tolerancia de 16% incluida).", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -6494,13 +6494,13 @@ Partial Class Compras_Compras
|
|||||||
If importeMN <> 0 Then
|
If importeMN <> 0 Then
|
||||||
|
|
||||||
'SI ES GASTO CON ALMACEN NO DEBE CONTABILIZAR CONCEPTO 68
|
'SI ES GASTO CON ALMACEN NO DEBE CONTABILIZAR CONCEPTO 68
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=If(DdlTipoCompra.SelectedValue = "10", False, SeContabiliza)) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN.RoundSQL(2), Referencia, 68, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN.RoundSQL(2), ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=If(DdlTipoCompra.SelectedValue = "10", False, SeContabiliza)) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'SI ES GASTO CON ALMACEN REGISTRA EL CONCEPTO 95
|
'SI ES GASTO CON ALMACEN REGISTRA EL CONCEPTO 95
|
||||||
If DdlTipoCompra.SelectedValue = "10" Then
|
If DdlTipoCompra.SelectedValue = "10" Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMN, Referencia, 95, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=False) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMN.RoundSQL(2), Referencia, 95, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN.RoundSQL(2), ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=False) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -1174,7 +1174,18 @@ Partial Class PopUpVerFactura
|
|||||||
'IMPRIME REPORTE DE ENTRADA DE ALMACEN
|
'IMPRIME REPORTE DE ENTRADA DE ALMACEN
|
||||||
If UrlParametros("OP").ToString = "Alm" Then
|
If UrlParametros("OP").ToString = "Alm" Then
|
||||||
If UrlParametros("CVEMOVIMIENTO") IsNot Nothing AndAlso UrlParametros("CVEMOVIMIENTO").ToString.ToEntero > 0 Then
|
If UrlParametros("CVEMOVIMIENTO") IsNot Nothing AndAlso UrlParametros("CVEMOVIMIENTO").ToString.ToEntero > 0 Then
|
||||||
CargaMovimientosAlmacen(UrlParametros("CVEMOVIMIENTO").ToString.ToEntero)
|
|
||||||
|
'Optional EsTransitorio As Boolean = False, Optional CveAlmacenRecepcion As Integer = -1, Optional CveAlmacenTransitorioRecepcion As Integer = -1, Optional FolioBusquedaTrasitorio As Integer = -1
|
||||||
|
|
||||||
|
Dim EsTransitorio As Boolean = If(UrlParametros("ESTRANSITORIO") Is Nothing, False, Boolean.Parse((UrlParametros("ESTRANSITORIO").ToString)))
|
||||||
|
Dim CveAlmacenRecepcion As Integer = If(UrlParametros("CVEALMACENRECEPCION") Is Nothing, -1, (UrlParametros("CVEALMACENRECEPCION").ToString.ToEntero))
|
||||||
|
Dim CveAlmacenTransitorioRecepcion As Integer = If(UrlParametros("CVEALMACENTRANSITORIORECEPCION") Is Nothing, -1, (UrlParametros("CVEALMACENTRANSITORIORECEPCION").ToString.ToEntero))
|
||||||
|
Dim FolioBusquedaTrasitorio As Integer = If(UrlParametros("FOLIOBUSQUEDATRASITORIO") Is Nothing, -1, (UrlParametros("FOLIOBUSQUEDATRASITORIO").ToString.ToEntero))
|
||||||
|
|
||||||
|
|
||||||
|
CargaMovimientosAlmacen(UrlParametros("CVEMOVIMIENTO").ToString.ToEntero, Resumen:=False, EsTransitorio:=EsTransitorio, CveAlmacenRecepcion:=CveAlmacenRecepcion, CveAlmacenTransitorioRecepcion:=CveAlmacenTransitorioRecepcion,
|
||||||
|
FolioBusquedaTrasitorio:=FolioBusquedaTrasitorio)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -3286,9 +3297,14 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
#Region " - OP = 'Alm' - REPORTE ENTRADAS ALMACEN "
|
#Region " - OP = 'Alm' - REPORTE ENTRADAS ALMACEN "
|
||||||
|
|
||||||
Private Sub CargaMovimientosAlmacen(CveMovimiento As Integer, Optional Resumen As Boolean = False)
|
Private Sub CargaMovimientosAlmacen(CveMovimiento As Integer, Optional Resumen As Boolean = False,
|
||||||
|
Optional EsTransitorio As Boolean = False, Optional CveAlmacenRecepcion As Integer = -1, Optional CveAlmacenTransitorioRecepcion As Integer = -1, Optional FolioBusquedaTrasitorio As Integer = -1)
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ObjInventarios.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa)
|
ObjInventarios.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
Dim CveConcepto As Integer = ObjInventarios.CveConcepto
|
Dim CveConcepto As Integer = ObjInventarios.CveConcepto
|
||||||
@@ -3330,6 +3346,7 @@ Partial Class PopUpVerFactura
|
|||||||
Dim ResponsableRecibio As String = ObjInventarios.ResponsableRecibio
|
Dim ResponsableRecibio As String = ObjInventarios.ResponsableRecibio
|
||||||
Dim UsuarioCapturo As String = ObjInventarios.DtResultados.FiltroPrimeroValor("UsuarioCapturo")
|
Dim UsuarioCapturo As String = ObjInventarios.DtResultados.FiltroPrimeroValor("UsuarioCapturo")
|
||||||
|
|
||||||
|
|
||||||
If String.IsNullOrEmpty(Recibio) Then
|
If String.IsNullOrEmpty(Recibio) Then
|
||||||
Dim ObjRH As New ClsRH
|
Dim ObjRH As New ClsRH
|
||||||
If ObjRH.GetPersonal(ObjInventarios.CvePersonal, UsuarioActual.CveEmpresa) AndAlso ObjRH.DtResultados.Rows.Count > 0 Then
|
If ObjRH.GetPersonal(ObjInventarios.CvePersonal, UsuarioActual.CveEmpresa) AndAlso ObjRH.DtResultados.Rows.Count > 0 Then
|
||||||
@@ -3416,39 +3433,64 @@ Partial Class PopUpVerFactura
|
|||||||
DtMovimientos.PrimaryKey = keys
|
DtMovimientos.PrimaryKey = keys
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa, Resumen:=Resumen) Then
|
|
||||||
DtMovimientos = ObjInventarios.DtResultados.Copy()
|
|
||||||
CantidadProductos = DtMovimientos.SUM("Cantidad").ToDecimal()
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveMovimientoRelacionado > 0 Then
|
|
||||||
If ObjInventarios.GetMovimientos(CveMovimientoRelacionado, -1, -1, UsuarioActual.CveEmpresa) Then
|
|
||||||
Dim CveAlmacenRelacionado As Integer = ObjInventarios.CveAlmacen
|
|
||||||
Dim CveTipoAlmacenRelacionado As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacenRelacionado}").ToString.ToEntero
|
|
||||||
|
|
||||||
'SI TIENE RELACIONADO UN MOVIMIENTO VIRTUAL DEBE AGREGAR ESTE MOVIMIENTO A LA IMPRESION
|
If EsTransitorio Then
|
||||||
If CveTipoAlmacenRelacionado.Contiene(24, 25) Then
|
|
||||||
If ObjInventarios.GetMovimientosDetalle(CveMovimientoRelacionado, UsuarioActual.CveEmpresa) Then
|
|
||||||
Dim DtUsados As DataTable = ObjInventarios.DtResultados.Copy()
|
|
||||||
CantidadUsados = DtUsados.SUM("Cantidad").ToDecimal()
|
|
||||||
Dim IndexInicialUsados As Integer = DtMovimientos.Rows.Count + 1
|
|
||||||
|
|
||||||
For Each Dr As DataRow In DtUsados.Rows
|
If ObjInventarios.GetMovimientosTransitorios(CveAlmacenRecepcion, -1, CveAlmacenTransitorioRecepcion, -1, FolioBusquedaTrasitorio, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||||
Dr("No") = IndexInicialUsados
|
DtMovimientos = ObjInventarios.DtResultados.FiltraParametros(String.Format("CveTipoAlmacenDestino <> 4 AND CvePS > 0"))
|
||||||
IndexInicialUsados += 1
|
CantidadProductos = DtMovimientos.SUM("Cantidad").ToDecimal()
|
||||||
Next
|
|
||||||
|
|
||||||
DtMovimientos.Merge(DtUsados)
|
If Not DtMovimientos.Columns.Contains("No") Then
|
||||||
|
DtMovimientos.Columns.Add("No", GetType(Integer))
|
||||||
|
DtMovimientos.Columns("No").AutoIncrement = True
|
||||||
|
DtMovimientos.Columns("No").AutoIncrementSeed = DtMovimientos.Rows.Count + 1
|
||||||
|
DtMovimientos.Columns("No").AutoIncrementStep = 1
|
||||||
|
Dim keys(1) As DataColumn
|
||||||
|
keys(0) = DtMovimientos.Columns("No")
|
||||||
|
DtMovimientos.PrimaryKey = keys
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa, Resumen:=Resumen) Then
|
||||||
|
DtMovimientos = ObjInventarios.DtResultados.Copy()
|
||||||
|
CantidadProductos = DtMovimientos.SUM("Cantidad").ToDecimal()
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveMovimientoRelacionado > 0 Then
|
||||||
|
If ObjInventarios.GetMovimientos(CveMovimientoRelacionado, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||||
|
Dim CveAlmacenRelacionado As Integer = ObjInventarios.CveAlmacen
|
||||||
|
Dim CveTipoAlmacenRelacionado As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacenRelacionado}").ToString.ToEntero
|
||||||
|
|
||||||
|
'SI TIENE RELACIONADO UN MOVIMIENTO VIRTUAL DEBE AGREGAR ESTE MOVIMIENTO A LA IMPRESION
|
||||||
|
If CveTipoAlmacenRelacionado.Contiene(24, 25) Then
|
||||||
|
If ObjInventarios.GetMovimientosDetalle(CveMovimientoRelacionado, UsuarioActual.CveEmpresa) Then
|
||||||
|
Dim DtUsados As DataTable = ObjInventarios.DtResultados.Copy()
|
||||||
|
CantidadUsados = DtUsados.SUM("Cantidad").ToDecimal()
|
||||||
|
Dim IndexInicialUsados As Integer = DtMovimientos.Rows.Count + 1
|
||||||
|
|
||||||
|
For Each Dr As DataRow In DtUsados.Rows
|
||||||
|
Dr("No") = IndexInicialUsados
|
||||||
|
IndexInicialUsados += 1
|
||||||
|
Next
|
||||||
|
|
||||||
|
DtMovimientos.Merge(DtUsados)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
DtMovimientos.Columns("No").AutoIncrement = True
|
||||||
|
DtMovimientos.Columns("No").AutoIncrementSeed = DtMovimientos.Rows.Count + 1
|
||||||
|
DtMovimientos.Columns("No").AutoIncrementStep = 1
|
||||||
|
Dim keys(1) As DataColumn
|
||||||
|
keys(0) = DtMovimientos.Columns("No")
|
||||||
|
DtMovimientos.PrimaryKey = keys
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DtMovimientos.Columns("No").AutoIncrement = True
|
|
||||||
DtMovimientos.Columns("No").AutoIncrementSeed = DtMovimientos.Rows.Count + 1
|
|
||||||
DtMovimientos.Columns("No").AutoIncrementStep = 1
|
|
||||||
Dim keys(1) As DataColumn
|
|
||||||
keys(0) = DtMovimientos.Columns("No")
|
|
||||||
DtMovimientos.PrimaryKey = keys
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveCompra > 0 Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveCompra > 0 Then
|
||||||
@@ -3481,6 +3523,12 @@ Partial Class PopUpVerFactura
|
|||||||
ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
If RazonSocial = "" AndAlso NombreCliente <> "" Then RazonSocial = NombreCliente
|
If RazonSocial = "" AndAlso NombreCliente <> "" Then RazonSocial = NombreCliente
|
||||||
|
|
||||||
|
If EsTransitorio Then
|
||||||
|
|
||||||
|
Observaciones = If(Observaciones.Trim.Length = 0, "Impresión con cantidades pendientes de recibir", $"Impresión con cantidades pendientes de recibir - {Observaciones}")
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
ImprimePDFAlmacen(CveConcepto, CveCompra, Folio.ToString, Fecha, Almacen, SubProyecto, Observaciones, Recibio,
|
ImprimePDFAlmacen(CveConcepto, CveCompra, Folio.ToString, Fecha, Almacen, SubProyecto, Observaciones, Recibio,
|
||||||
Personal, Capturo, AlmacenDestino, CveConsignacion, CveMoneda, Moneda, FolioVenta, FolioOC,
|
Personal, Capturo, AlmacenDestino, CveConsignacion, CveMoneda, Moneda, FolioVenta, FolioOC,
|
||||||
FolioInterno, FechaHora, ObservacionesSolicitud, DepartamentoEntrega, RazonSocialOC,
|
FolioInterno, FechaHora, ObservacionesSolicitud, DepartamentoEntrega, RazonSocialOC,
|
||||||
@@ -4214,7 +4262,7 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
Dim CveContrato As Integer = 0
|
Dim CveContrato As Integer = 0
|
||||||
If DtMovimientos IsNot Nothing AndAlso DtMovimientos.Rows.Count > 0 Then
|
If DtMovimientos IsNot Nothing AndAlso DtMovimientos.Rows.Count > 0 Then
|
||||||
CveContrato = DtMovimientos(0)("CveContrato").ToString.ToEntero
|
CveContrato = DtMovimientos.FiltroPrimeroValor("CveContrato").ToEntero
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveContrato > 0 Then
|
If CveContrato > 0 Then
|
||||||
|
|||||||
@@ -529,7 +529,8 @@
|
|||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>TipoGasto</HeaderTemplate>
|
<HeaderTemplate>TipoGasto</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="DdlTipoGasto" runat="server" Text='<%# Eval("TipoGasto") %>'></asp:Literal><br />
|
<asp:Literal ID="LtlTipoGasto" runat="server" Text='<%# Eval("TipoGasto") %>'></asp:Literal><br />
|
||||||
|
<%--<asp:DropDownList ID="DdlTipoGasto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="150px"></asp:DropDownList>--%>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle />
|
<ItemStyle />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|||||||
@@ -2143,9 +2143,23 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
Protected Sub DdlTipoGasto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlTipoGasto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
If UpPrePoliza.Visible Then
|
If UpPrePoliza.Visible Then
|
||||||
For Each Gvr As GridViewRow In GvPrePoliza.Rows
|
|
||||||
Gvr.FCDropDownList("DdlTipoGasto").SelectedValueExist(DdlTipoGasto.SelectedValue)
|
|
||||||
|
For Each dRow As DataRow In DtMovimientos.Rows
|
||||||
|
dRow("CveTipoGasto") = DdlTipoGasto.SelectedValue
|
||||||
|
dRow("TipoGasto") = DdlTipoGasto.SelectedItem.Text
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
DtMovimientos.AcceptChanges()
|
||||||
|
GvPrePoliza.DataSource = DtMovimientos
|
||||||
|
GvPrePoliza.DataBind()
|
||||||
|
|
||||||
|
For Each Gvr As GridViewRow In GvPrePoliza.Rows
|
||||||
|
'Gvr.FCDropDownList("DdlTipoGasto").SelectedValueExist(DdlTipoGasto.SelectedValue)
|
||||||
|
Gvr.FCCheckBox("chkModificado").Checked = True
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
UpPrePoliza.Update()
|
UpPrePoliza.Update()
|
||||||
End If
|
End If
|
||||||
If divMovtos.Visible Then
|
If divMovtos.Visible Then
|
||||||
|
|||||||
@@ -5286,7 +5286,6 @@
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox35</rd:DefaultName>
|
<rd:DefaultName>Textbox35</rd:DefaultName>
|
||||||
<Top>0cm</Top>
|
|
||||||
<Left>17.09769cm</Left>
|
<Left>17.09769cm</Left>
|
||||||
<Height>0.41981cm</Height>
|
<Height>0.41981cm</Height>
|
||||||
<Width>2.94979cm</Width>
|
<Width>2.94979cm</Width>
|
||||||
@@ -5382,7 +5381,6 @@
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox31</rd:DefaultName>
|
<rd:DefaultName>Textbox31</rd:DefaultName>
|
||||||
<Top>0cm</Top>
|
|
||||||
<Left>9.1611cm</Left>
|
<Left>9.1611cm</Left>
|
||||||
<Height>0.41981cm</Height>
|
<Height>0.41981cm</Height>
|
||||||
<Width>6.02198cm</Width>
|
<Width>6.02198cm</Width>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -573,6 +573,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
|
<asp:HyperLink ID="HplImprimirRecepcion" runat="server" Visible="false" class="Texto" style="font-size:12px"> PDF <i class="fa fa-file-pdf-o"></i></asp:HyperLink>
|
||||||
<a href="javascript:;" class="collapse"></a>
|
<a href="javascript:;" class="collapse"></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -615,17 +616,30 @@
|
|||||||
<asp:CheckBox ID="ChkRealizarDevolucion" runat="server" Checked="false" />
|
<asp:CheckBox ID="ChkRealizarDevolucion" runat="server" Checked="false" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
|
||||||
<div style="text-align: center;" class="col-sm-12">
|
|
||||||
<asp:UpdatePanel runat="server">
|
<asp:UpdatePanel runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:Button ID="BtnRecibir" runat="server" Text="Recibir Traspaso" OnClick="BtnRecibir_Click" class="btn btn-primary" ValidationGroup="GrpRecibir" />
|
|
||||||
|
|
||||||
<asp:Button ID="BtnCancelarTraspaso" runat="server" Text="Cancelar Traspaso" OnClick="BtnCancelarTraspaso_Click" class="btn btn-danger" Visible="false" ValidationGroup="GrpRecibir" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el traspaso?" data-btn-ok-label="si" />
|
<div class="row">
|
||||||
|
|
||||||
|
<div style="text-align: center;" class="col-sm-12">
|
||||||
|
<asp:Button ID="BtnRecibir" runat="server" Text="Recibir Traspaso" OnClick="BtnRecibir_Click" class="btn btn-primary" ValidationGroup="GrpRecibir" />
|
||||||
|
<asp:Button ID="BtnCancelarTraspaso" runat="server" Text="Cancelar Traspaso" OnClick="BtnCancelarTraspaso_Click" class="btn btn-danger" Visible="false" ValidationGroup="GrpRecibir" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el traspaso?" data-btn-ok-label="si" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
|||||||
@@ -1465,6 +1465,8 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
DivRealizarDevolucion.Visible = False
|
DivRealizarDevolucion.Visible = False
|
||||||
ChkRealizarDevolucion.Checked = False
|
ChkRealizarDevolucion.Checked = False
|
||||||
|
|
||||||
|
Dim CveMovimientoTraspaso As Integer = -1
|
||||||
|
|
||||||
Dim Dtt As DataTable = Nothing
|
Dim Dtt As DataTable = Nothing
|
||||||
|
|
||||||
FolioBusqueda = If(TxtFolioRecepcion.Text = "", -1, TxtFolioRecepcion.Text.ToEntero)
|
FolioBusqueda = If(TxtFolioRecepcion.Text = "", -1, TxtFolioRecepcion.Text.ToEntero)
|
||||||
@@ -1472,6 +1474,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
If ObjInventarios.GetMovimientosTransitorios(DdlAlmacenRecepcion.SelectedValue.ToEntero, -1, DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero, -1, FolioBusqueda, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
If ObjInventarios.GetMovimientosTransitorios(DdlAlmacenRecepcion.SelectedValue.ToEntero, -1, DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero, -1, FolioBusqueda, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||||
Dtt = ObjInventarios.DtResultados.FiltraParametros(String.Format("CveTipoAlmacenDestino <> 4"))
|
Dtt = ObjInventarios.DtResultados.FiltraParametros(String.Format("CveTipoAlmacenDestino <> 4"))
|
||||||
|
CveMovimientoTraspaso = Dtt.FiltroPrimeroValor("CveMovimiento").ToEntero
|
||||||
Else
|
Else
|
||||||
Alert("Ocurrió un error al consultar los movimientos transitorios. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
Alert("Ocurrió un error al consultar los movimientos transitorios. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||||
Dtt = Nothing
|
Dtt = Nothing
|
||||||
@@ -1493,8 +1496,6 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
GvDatosRecepcion.DataSource = Dtt
|
GvDatosRecepcion.DataSource = Dtt
|
||||||
GvDatosRecepcion.DataBind()
|
GvDatosRecepcion.DataBind()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'GvDatosRecepcion.Columns(6).Visible = Dtt.MAX("Serie") <> ""
|
'GvDatosRecepcion.Columns(6).Visible = Dtt.MAX("Serie") <> ""
|
||||||
GvDatosRecepcion.Columns(6).Visible = Dtt.MAX("AplicaSerie") = "True"
|
GvDatosRecepcion.Columns(6).Visible = Dtt.MAX("AplicaSerie") = "True"
|
||||||
GvDatosRecepcion.Columns(7).Visible = Dtt.MAX("AplicaLote").ToEntero > 0 'Dtt.MAX("Lote") <> ""
|
GvDatosRecepcion.Columns(7).Visible = Dtt.MAX("AplicaLote").ToEntero > 0 'Dtt.MAX("Lote") <> ""
|
||||||
@@ -1515,6 +1516,13 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
If UsuarioActual.TienePermisoProceso(347) Then
|
If UsuarioActual.TienePermisoProceso(347) Then
|
||||||
DivRealizarDevolucion.Visible = True
|
DivRealizarDevolucion.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||||
|
HplImprimirRecepcion.Visible = True
|
||||||
|
HplImprimirRecepcion.NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=Alm&CveMovimiento={CveMovimientoTraspaso}&EsTransitorio=True&CveAlmacenRecepcion={DdlAlmacenRecepcion.SelectedValue.ToEntero}&CveAlmacenTransitorioRecepcion={DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero}&FolioBusquedaTrasitorio={FolioBusqueda}")}"
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2078,9 +2078,10 @@
|
|||||||
<label class="col-md-2">Importe:</label>
|
<label class="col-md-2">Importe:</label>
|
||||||
<div class="col-md-4 form-group">
|
<div class="col-md-4 form-group">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<asp:TextBox ID="TxtSAImPorcentaje" min="0" max="100" step="any" CssClass="form-control input-sm" type="number" runat="server"></asp:TextBox>
|
<asp:TextBox ID="TxtSAImPorcentaje" min="0" max="100" CssClass="form-control input-sm" runat="server"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVSAImPorcentaje" runat="server" ControlToValidate="TxtSAImPorcentaje" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Porcentaje''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalSolicitarAnticipo"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVSAImPorcentaje" runat="server" ControlToValidate="TxtSAImPorcentaje" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Porcentaje''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalSolicitarAnticipo"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCESAImPorcentaje" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVSAImPorcentaje" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCESAImPorcentaje" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVSAImPorcentaje" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtSAImPorcentaje" ValidChars="1234567890." />
|
||||||
<span class="input-group-addon">
|
<span class="input-group-addon">
|
||||||
<i style="font-weight: 700;">%</i>
|
<i style="font-weight: 700;">%</i>
|
||||||
</span>
|
</span>
|
||||||
@@ -2091,9 +2092,10 @@
|
|||||||
<span class="input-group-addon">
|
<span class="input-group-addon">
|
||||||
<i class="fa fa-dollar"></i>
|
<i class="fa fa-dollar"></i>
|
||||||
</span>
|
</span>
|
||||||
<asp:TextBox ID="TxtSAImporte" min="0" max='<%=LblTotal.Text.ToString()%>' CssClass="form-control input-sm" type="number" step="any" pattern="(\d{3})([\.])(\d{2})" runat="server"></asp:TextBox>
|
<asp:TextBox ID="TxtSAImporte" min="0" max='<%=LblTotal.Text.ToString()%>' CssClass="form-control input-sm" runat="server"></asp:TextBox>
|
||||||
<asp:RangeValidator ID="RVSAImprote" CssClass="form-control" runat="server" ControlToValidate="TxtSAImporte" Display="None" Type="Double" MinimumValue="1.00" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> debe ser mayor a cero." ValidationGroup="GrpModalSolicitarAnticipo"></asp:RangeValidator>
|
<asp:RangeValidator ID="RVSAImprote" CssClass="form-control" runat="server" ControlToValidate="TxtSAImporte" Display="None" Type="Double" MinimumValue="1.00" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> debe ser mayor a cero." ValidationGroup="GrpModalSolicitarAnticipo"></asp:RangeValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCESAImporte" runat="server" HighlightCssClass="vco" TargetControlID="RVSAImprote" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCESAImporte" runat="server" HighlightCssClass="vco" TargetControlID="RVSAImprote" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtSAImporte" ValidChars="1234567890." />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="input-group" style="text-align:right!important">
|
<div class="input-group" style="text-align:right!important">
|
||||||
@@ -2855,7 +2857,7 @@
|
|||||||
$('#<%= TxtSAImPorcentaje.ClientID%>').keyup(function () {
|
$('#<%= TxtSAImPorcentaje.ClientID%>').keyup(function () {
|
||||||
console.log($(this).val());
|
console.log($(this).val());
|
||||||
var importe = (ToDouble($(this).val()) / 100) * ToDouble($get("LblTotal").value.replace(/,/g, ''));
|
var importe = (ToDouble($(this).val()) / 100) * ToDouble($get("LblTotal").value.replace(/,/g, ''));
|
||||||
$('#<%= TxtSAImporte.ClientID%>').val(FormatoNumero(importe, 2).replace(/,/g, ""));
|
$('#<%= TxtSAImporte.ClientID%>').val( FormatoNumero(importe, 2).replace(/,/g, "") );
|
||||||
});
|
});
|
||||||
$('#<%= TxtSAImporte.ClientID%>').keyup(function () {
|
$('#<%= TxtSAImporte.ClientID%>').keyup(function () {
|
||||||
var importe = (100 * ToDouble($(this).val())) / ToDouble($get("LblTotal").value.replace(/,/g, ""));
|
var importe = (100 * ToDouble($(this).val())) / ToDouble($get("LblTotal").value.replace(/,/g, ""));
|
||||||
|
|||||||
@@ -272,21 +272,73 @@ public partial class RH_SolicitudViaticos : ClsPaginas
|
|||||||
{
|
{
|
||||||
int CveSubProyectoPersonal = GetCveSubproyecto();
|
int CveSubProyectoPersonal = GetCveSubproyecto();
|
||||||
|
|
||||||
if (CveSubProyectoPersonal > 0)
|
//if (CveSubProyectoPersonal > 0)
|
||||||
{
|
//{
|
||||||
ClsBancos ObjBancos = new ClsBancos();
|
// ClsBancos ObjBancos = new ClsBancos();
|
||||||
|
|
||||||
String Serie = get_GlobalDTSubProyectos(-1, CveSubProyectoPersonal, UsuarioActual.CveEmpresa).FiltroPrimeroValor("Serie");
|
// String Serie = get_GlobalDTSubProyectos(-1, CveSubProyectoPersonal, UsuarioActual.CveEmpresa).FiltroPrimeroValor("Serie");
|
||||||
|
|
||||||
if (ObjBancos.GetNextFolioSolicitudViaticos(UsuarioActual.CveEmpresa, String.Format("{0}-", Serie)))
|
// if (ObjBancos.GetNextFolioSolicitudViaticos(UsuarioActual.CveEmpresa, String.Format("{0}-", Serie)))
|
||||||
|
// {
|
||||||
|
// TxtFolio.Text = ObjBancos.DtResultados.FiltroPrimeroValor("Folio");
|
||||||
|
// TxtFolio.Enabled = false;
|
||||||
|
// }
|
||||||
|
// ObjBancos.Dispose();
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
ClsGralFolios ObjFolios = new ClsGralFolios();
|
||||||
|
|
||||||
|
if(ObjFolios.GetFolios("VIA", UsuarioActual.CveEmpresa, CveSubProyectoPersonal))
|
||||||
|
{ //VTCO
|
||||||
|
|
||||||
|
DataTable DT = ObjFolios.DtResultados.FiltraParametros("Estado = 'Activo'");
|
||||||
|
|
||||||
|
if (DT.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
TxtFolio.Text = ObjBancos.DtResultados.FiltroPrimeroValor("Folio");
|
TxtFolio.Text = DT.Rows[0]["FActual"].ToString();
|
||||||
TxtFolio.Enabled = false;
|
TxtFolio.Enabled = false;
|
||||||
}
|
}
|
||||||
ObjBancos.Dispose();
|
else
|
||||||
|
{
|
||||||
|
TxtFolio.Text = "";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ObjFolios.Dispose();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//private void CargaFolios()
|
||||||
|
//{
|
||||||
|
// ClsGralFolios ObjFolios = new ClsGralFolios();
|
||||||
|
// TipoOC = TipoOS ? "OS" : TipoOC;
|
||||||
|
// if (ObjFolios.GetFolios(TipoOC == "REQ" ? "Req" : TipoOC, CveEmpresaActual))
|
||||||
|
// {
|
||||||
|
// DataTable DT = ObjFolios.DtResultados.FiltraParametros("Estado = 'Activo'");
|
||||||
|
// // Verificar primero en la sucursal del usuario
|
||||||
|
// if (DT.FiltraParametros("CveSubProyecto = " + UsuarioActual.CveSubProyecto.ToString).Rows.Count > 0)
|
||||||
|
// {
|
||||||
|
// ViewState("CveFolio") = DT.FiltraParametros("CveSubProyecto = " + UsuarioActual.CveSubProyecto.ToString).Rows(0)("CveFolio").ToString.ToEntero;
|
||||||
|
// ViewState("FolioActual") = DT.FiltraParametros("CveSubProyecto = " + UsuarioActual.CveSubProyecto.ToString).Rows(0)("FActual").ToString;
|
||||||
|
// lblFolio.Text = TipoOC + " " + DT.Rows(0)("FActual").ToString;
|
||||||
|
// }
|
||||||
|
// else if (DT.Rows.Count > 0)
|
||||||
|
// {
|
||||||
|
// ViewState("CveFolio") = DT.Rows(0)("CveFolio").ToString.ToEntero;
|
||||||
|
// ViewState("FolioActual") = DT.Rows(0)("FActual").ToString;
|
||||||
|
// lblFolio.Text = TipoOC + " " + DT.Rows(0)("FActual").ToString;
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// Alert("No tiene registrados Folios en esta sucursal.", TipoMensaje.MsgAdvertencia);
|
||||||
|
|
||||||
|
// DT.Dispose();
|
||||||
|
// }
|
||||||
|
// ObjFolios.Dispose();
|
||||||
|
//}
|
||||||
|
|
||||||
protected int GetCveSubproyecto()
|
protected int GetCveSubproyecto()
|
||||||
{
|
{
|
||||||
ClsRH ObjRH = new ClsRH();
|
ClsRH ObjRH = new ClsRH();
|
||||||
@@ -725,13 +777,30 @@ public partial class RH_SolicitudViaticos : ClsPaginas
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
string RutaRdlc = $@"{UsuarioActual.Empresa.Ruta}Formatos/SolicitudViaticos.rdlc";
|
||||||
|
|
||||||
|
if (!System.IO.File.Exists(RutaRdlc))
|
||||||
|
{
|
||||||
|
RutaRdlc = $@"{ModExtensiones.DirectorioEmpresas}Grales/Formatos/SolicitudViaticos.rdlc";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//if (DesgargaArchivo)
|
||||||
|
//{
|
||||||
|
// ImprimirPDF(string.Format("Empresas/{0}/Formatos/SolicitudViaticos.rdlc",UsuarioActual.CveEmpresa), DTConceptosDetalles, @params, String.Format("Solicitud de Viáticos - {0} - {1}", TxtFolio.Text, DdlPersonal.SelectedItem), Formato);
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// retorno = StreamPDF(string.Format("Empresas/{0}/Formatos/SolicitudViaticos.rdlc", UsuarioActual.CveEmpresa), DTConceptosDetalles, @params, String.Format("Solicitud de Viáticos - {0} - {1}", TxtFolio.Text, DdlPersonal.SelectedItem), Formato);
|
||||||
|
//}
|
||||||
|
|
||||||
if (DesgargaArchivo)
|
if (DesgargaArchivo)
|
||||||
{
|
{
|
||||||
ImprimirPDF(string.Format("Empresas/{0}/Formatos/SolicitudViaticos.rdlc",UsuarioActual.CveEmpresa), DTConceptosDetalles, @params, String.Format("Solicitud de Viáticos - {0} - {1}", TxtFolio.Text, DdlPersonal.SelectedItem), Formato);
|
ImprimirPDF(RutaRdlc, DTConceptosDetalles, @params, String.Format("Solicitud de Viáticos - {0} - {1}", TxtFolio.Text, DdlPersonal.SelectedItem), Formato);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
retorno = StreamPDF(string.Format("Empresas/{0}/Formatos/SolicitudViaticos.rdlc", UsuarioActual.CveEmpresa), DTConceptosDetalles, @params, String.Format("Solicitud de Viáticos - {0} - {1}", TxtFolio.Text, DdlPersonal.SelectedItem), Formato);
|
retorno = StreamPDF(RutaRdlc, DTConceptosDetalles, @params, String.Format("Solicitud de Viáticos - {0} - {1}", TxtFolio.Text, DdlPersonal.SelectedItem), Formato);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user