Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -93,12 +93,23 @@
|
||||
<table><tr><td>ISPT</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtISPT" runat="server" Width="75px"></asp:TextBox></td>
|
||||
|
||||
<td>Servicio Médico:</td><td><asp:TextBox ID="TxtServicioMedico" runat="server" Width="75px"></asp:TextBox></td>
|
||||
<td>Fonacot:</td><td><asp:TextBox ID="TxtFonacot" runat="server" Width="75px"></asp:TextBox></td>
|
||||
</tr><tr> <td>Crédito al Salario</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCredSalario" runat="server" Width="75px"></asp:TextBox></td>
|
||||
<td>Pensión:</td><td><asp:TextBox ID="TxtPension" runat="server" Width="75px"></asp:TextBox></td>
|
||||
<td>P. Infonavit:</td><td><asp:TextBox ID="TxtInfonavit" runat="server" Width="75px"></asp:TextBox></td>
|
||||
</tr>
|
||||
</tr><tr>
|
||||
<td>ISR Asimilados</td><td> <asp:TextBox ID="TxtISRAsimilados" runat="server" Width="75px"></asp:TextBox></td>
|
||||
<td>C. Sindical</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtSindical" runat="server" Width="75px"></asp:TextBox></td>
|
||||
|
||||
</tr></table>
|
||||
<td> </td><td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Panel>
|
||||
<asp:Panel ID="PnlFiniquito" runat="server" Visible="true">
|
||||
<table border="0" id="TbIEPersonal" runat="server" Visible="false" >
|
||||
|
||||
@@ -373,6 +373,12 @@ Partial Class AC_RegNomina
|
||||
Dim IdCtaCreditoSalario As Integer = 635
|
||||
Dim IdCtaDevolucionISPT As Integer = 1745
|
||||
Dim IdCtaMatriz As Integer
|
||||
Dim IdCtaCuotaSindical As Integer = 644
|
||||
Dim IdCtaInfonavit As Integer = 2018
|
||||
Dim IdCtaFonacot As Integer = 646
|
||||
Dim IdCtaServicioMedico As Integer = 643
|
||||
Dim IdCtaPension As Integer = 643
|
||||
Dim IdCtaISRAsimilados As Integer = 4442
|
||||
|
||||
Dim Importe As Double
|
||||
Dim MsgError As String = ""
|
||||
@@ -564,6 +570,7 @@ Partial Class AC_RegNomina
|
||||
|
||||
ObjIE.UpdateIEPrePoliza(Fecha, objAC.Folio.ToString, IDPoliza, CvePrePoliza, CveIE, -1)
|
||||
Else
|
||||
MsgError = "no se pudo agregar el movimiento bancario"
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
@@ -586,9 +593,34 @@ Partial Class AC_RegNomina
|
||||
If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaCreditoSalario, False, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
|
||||
'Registro del Mov Devolución
|
||||
Importe = TxtISPT.Text.ToDouble - TxtCredSalario.Text.ToDouble
|
||||
If Importe <> 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaDevolucionISPT, If(Importe > 0, False, True), Math.Abs(Importe), "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
'Registro Cuotas Sindicales
|
||||
Importe = TxtSindical.Text.ToDouble
|
||||
If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaCuotaSindical, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
'Registro Prestamo infonavit
|
||||
Importe = txtInfonavit.Text.ToDouble
|
||||
If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaInfonavit, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
'Registro Fonacot
|
||||
Importe = txtFonacot.Text.ToDouble
|
||||
If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaFonacot, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
'Registro Servicio Medico
|
||||
Importe = txtServicioMedico.Text.ToDouble
|
||||
If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaServicioMedico, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
'Registro Pensión
|
||||
Importe = txtPension.Text.ToDouble
|
||||
If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaPension, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
'Registro ISR Asimilados
|
||||
Importe = TxtISRAsimilados.Text.ToDouble
|
||||
If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaISRAsimilados, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
|
||||
''Registro del Mov Devolución
|
||||
'Importe = TxtISPT.Text.ToDouble - TxtCredSalario.Text.ToDouble
|
||||
'If Importe <> 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaDevolucionISPT, If(Importe > 0, False, True), Math.Abs(Importe), "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
|
||||
@@ -458,7 +458,8 @@ Partial Class AF_CatAF
|
||||
Dim params As New List(Of ReportParameter)
|
||||
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 Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\CatAF.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim Ruta As String = ""
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
@@ -468,7 +469,13 @@ Partial Class AF_CatAF
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
ImprimirPDF(String.Format("{0}Formatos\CatAF.rdlc", UsuarioActual.Empresa.Ruta), DtActivosFijos, params, "CatalogoActivosFijos", Formato:=Formato)
|
||||
|
||||
If Archivo.Exists Then
|
||||
Ruta = UsuarioActual.Empresa.Ruta & "Formatos/CatAF.rdlc"
|
||||
Else
|
||||
Ruta = "Empresas/Grales/Formatos/CatAF.rdlc"
|
||||
End If
|
||||
ImprimirPDF(Ruta, DtActivosFijos, params, "CatalogoActivosFijos", Formato:=Formato)
|
||||
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnDescargaSabana" OnClick="BtnDescargaSabana_Click" data-toggle="tooltip" data-placement="left" title="Descargar Sabana de Venta" Text="<i class='fa fa-download'></i> Descargar Sabana de Venta"></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="BtnDescargaSabana" OnClick="BtnDescargaSabana_Click" data-toggle="tooltip" data-placement="left" title="Descargar Sábana de Venta" Text="<i class='fa fa-download'></i> Descargar Sábana de Venta"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnImprimir" OnClick="BtnImprimir_Click" data-toggle="tooltip" data-placement="left" title="PDF" Text="<i class='fa fa-file-pdf-o'></i> PDF"></asp:LinkButton>
|
||||
@@ -107,7 +107,7 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="Literal1" Text="Sabana de venta" runat="server"> </asp:Literal></h4>
|
||||
<asp:Literal ID="Literal1" Text="Sábana de venta" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row" style="width:100%">
|
||||
@@ -116,7 +116,7 @@
|
||||
<ContentTemplate>
|
||||
<div runat="server" id="DivImprimir" class="row" visible="True">
|
||||
<div class="col-md-4" style="text-align:center">
|
||||
<label>Opcion:</label>
|
||||
<label>OPCIÓN:</label>
|
||||
</div>
|
||||
<div class="col-md-4" style="text-align:center">
|
||||
<label>MES:</label>
|
||||
@@ -165,7 +165,7 @@
|
||||
<div class="col-md-6" style="text-align: center">
|
||||
<asp:UpdatePanel ID="UpDescargar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnDescargarSabana" runat="server" CssClass="btn btn-primary" Text="Descargar" />
|
||||
<asp:Button ID="BtnDescargarSábana" runat="server" CssClass="btn btn-primary" Text="Descargar" />
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="BtnDescargarSabana" />
|
||||
|
||||
@@ -66,7 +66,10 @@
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate v-center" style="text-align: right!important">Cliente:</div>
|
||||
<div class="col-md-2 v-center">
|
||||
<ADS:Dropdownlost ID="DdlNombre" runat="server" CssStyle="width: 195px;" DataTextField="NombreComercial" DataValueField="CveCliente"></ADS:Dropdownlost>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -124,9 +127,10 @@
|
||||
<asp:GridView ID="GvVentas" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados"
|
||||
CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:HyperLinkField HeaderText="Folio" DataTextField="SerieFolio" Target="_blank" ItemStyle-Width="20%" ItemStyle-CssClass="Texto Izquierda" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||
<asp:HyperLinkField HeaderText="Folio" DataTextField="SerieFolio" Target="_blank" ItemStyle-Width="15%" ItemStyle-CssClass="Texto Izquierda" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||
<asp:HyperLinkField HeaderText="Mov. Almacen" DataTextField="Folio" Target="_blank" ItemStyle-Width="15%" ItemStyle-CssClass="Texto" DataNavigateUrlFields="CveMovimiento" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" />
|
||||
<asp:HyperLinkField HeaderText="Fecha" DataTextField="Fecha" Target="_blank" ItemStyle-Width="10%" ItemStyle-CssClass="Texto" DataTextFormatString="{0:d}" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||
<asp:HyperLinkField HeaderText="Sucursal" DataTextField="SubProyecto" Target="_blank" ItemStyle-Width="15%" ItemStyle-CssClass="Texto Izquierda" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||
<asp:HyperLinkField HeaderText="Sucursal" DataTextField="SubProyecto" Target="_blank" ItemStyle-Width="20%" ItemStyle-CssClass="Texto Izquierda" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||
<asp:HyperLinkField HeaderText="Cantidad" DataTextField="Cantidad" Target="_blank" ItemStyle-Width="5%" ItemStyle-CssClass="Derecha" DataTextFormatString="{0:###,##0.00##}" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||
<asp:HyperLinkField HeaderText="Total" DataTextField="Total" Target="_blank" ItemStyle-Width="20%" ItemStyle-CssClass="Derecha" DataTextFormatString="{0:###,###,##0.00##}" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}"/>
|
||||
</Columns>
|
||||
|
||||
@@ -19,6 +19,7 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
CargaCombos()
|
||||
CargaNombreClientes()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -27,7 +28,10 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
|
||||
CargaDatos()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaNombreClientes()
|
||||
DdlNombre.setEsWebService(True)
|
||||
DdlNombre.Attributes.Add("data-metodo", "getcliente")
|
||||
End Sub
|
||||
Public Sub CargaCombos()
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 22)
|
||||
DdlAlmacen.DataBind()
|
||||
@@ -44,11 +48,11 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
|
||||
FechaI = If(IsDate(TxtFechaI.Text.Trim()), TxtFechaI.Text.Trim.todate, minfecha)
|
||||
FechaF = If(IsDate(TxtFechaF.Text.Trim()), TxtFechaF.Text.Trim.todate, maxfecha)
|
||||
|
||||
Dim CveAlmacen As Integer = If(DdlAlmacen.SelectedValue = "", "-1", DdlAlmacen.SelectedValue).ToString.toentero
|
||||
|
||||
Dim CveAlmacen As Integer = If(DdlAlmacen.SelectedValue = "", "-1", DdlAlmacen.SelectedValue).ToString.ToEntero
|
||||
Dim CveCliente As Integer = If(DdlNombre.SelectedValue = "", "-1", DdlNombre.SelectedValue).ToString.ToEntero
|
||||
Dim Acum As New ClsAcumuladores
|
||||
|
||||
If Acum.EntradasUsadosClientesRep(CveAlmacen, FechaI, FechaF, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
If Acum.EntradasUsadosClientesRep(CveAlmacen, FechaI, FechaF, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCliente) Then
|
||||
GvDatos.DataSource = Acum.DtResultados.FiltraParametros("Codigo_Clientes <> 'Total:'") 'los renglones generados con esta caracteriztica son con un grouping set en la consulta, se pueden quitar
|
||||
DatosEntradasUsadosClientes = Acum.DtResultados.FiltraParametros("Codigo_Clientes <> 'Total:'")
|
||||
End If
|
||||
|
||||
@@ -2604,7 +2604,7 @@ Public Class ClsAF
|
||||
.Add("@FechaVF", SqlDbType.DateTime).Value = FechaVF
|
||||
.Add("@CveDispositivo", SqlDbType.Int).Value = CveDispositivo
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = Estatus
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -1076,7 +1076,7 @@ Public Class ClsAcumuladores
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function EntradasUsadosClientesRep(CveAlmacen As Integer, FechaI As Date, FechaF As Date, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function EntradasUsadosClientesRep(CveAlmacen As Integer, FechaI As Date, FechaF As Date, CveUsuario As Integer, CveEmpresa As Integer, Optional CveCliente As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
'Data = New DataTable
|
||||
|
||||
@@ -1088,6 +1088,8 @@ Public Class ClsAcumuladores
|
||||
.Add("@FechaFin", SqlDbType.Date).Value = FechaF
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -7290,12 +7290,11 @@ Public Class ClsContPAQi
|
||||
StrSQL.Append(" FROM [dbo].[Polizas] P ")
|
||||
StrSQL.Append(" LEFT JOIN TiposPolizas T ON T.Id = P.TipoPol ")
|
||||
StrSQL.Append(" LEFT JOIN MovimientosPoliza M ON M.IdPoliza = P.Id ")
|
||||
StrSQL.Append(" LEFT JOIN [SERVIDOR].[Ventas].dbo.Conta_PrePolizas PP on P.Id = PP.IdPoliza")
|
||||
StrSQL.Append(" LEFT JOIN [SERVIDOR].[Ventas].dbo.Conta_PrePolizas PP on P.Id = PP.IdPoliza AND YEAR(PP.Fecha) = @Ejercicio AND MONTH(PP.Fecha) = @Periodo AND PP.CveEmpresa = @CveEmpresa")
|
||||
StrSQL.Append(" WHERE P.Ejercicio = @Ejercicio ")
|
||||
StrSQL.Append(" AND P.Periodo = @Periodo ")
|
||||
StrSQL.Append(" AND (@TipoPoliza = -1 OR P.TipoPol = @TipoPoliza) ")
|
||||
StrSQL.Append(" AND (@SegmentoNegocio = -1 OR M.IdSegNeg = @SegmentoNegocio) ")
|
||||
StrSQL.Append(" AND (PP.CveEmpresa = @CveEmpresa) ")
|
||||
StrSQL.Append(" GROUP BY P.Id, P.Fecha, T.Nombre, P.Concepto, P.Cargos, P.Abonos, P.Folio, PP.CvePrepoliza ")
|
||||
StrSQL.Append(" ORDER BY P.Folio ")
|
||||
|
||||
|
||||
@@ -2445,7 +2445,7 @@ Public Class ClsContabilidad
|
||||
End Function
|
||||
Public Function UpdateConta_PlantillasPolizasDetalle(CveConcepto As Integer, TipoMovto As Integer, IdCtaContable As Integer, Orden As Integer,
|
||||
CvePlantillaPolizaDetalle As Integer, CveSubProyecto As Integer, CveProveedor As Integer,
|
||||
Optional CvePersonal As Integer = -1, Optional PorcentajeImpuesto As Decimal = 0) As Boolean
|
||||
Optional CvePersonal As Integer = -1, Optional PorcentajeImpuesto As Decimal = 0, Optional CveCuenta As Integer = -1) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Conta_PlantillasPolizasDetalleUpdate")
|
||||
@@ -2460,6 +2460,8 @@ Public Class ClsContabilidad
|
||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||
.Add("@PorcentajeImpuesto", SqlDbType.SmallMoney).Value = PorcentajeImpuesto
|
||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -241,7 +241,7 @@ Public Class ClsMovimientos
|
||||
Gpo As Integer, CveResponsable As Integer,
|
||||
TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1",
|
||||
Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional FechaCorte As Date = Nothing, Optional EstatusCliente As Integer = -1, Optional CveUsuarioConsulta As Integer = -1,
|
||||
Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional TipoCliente As Integer = -1) As Boolean
|
||||
Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional TipoCliente As Integer = -1, Optional AplicaAnticiposPagados As Integer = 1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
'Data = New DataTable
|
||||
@@ -274,6 +274,7 @@ Public Class ClsMovimientos
|
||||
.Add("@CveCobranzaEstatus", SqlDbType.Int).Value = CveCobranzaEstatus
|
||||
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
|
||||
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
|
||||
.Add("@AplicaAnticiposPagados", SqlDbType.Int).Value = AplicaAnticiposPagados
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -324,7 +325,7 @@ Public Class ClsMovimientos
|
||||
CveResponsable As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1",
|
||||
Optional FechaVI As String = "-1", Optional FechaVF As String = "1", Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1,
|
||||
Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional LimiteCredito As Decimal = -1,
|
||||
Optional TipoCliente As Integer = -1, Optional CveMoneda As Integer = -1, Optional EstatusCliente As Integer = -1) As Boolean
|
||||
Optional TipoCliente As Integer = -1, Optional CveMoneda As Integer = -1, Optional EstatusCliente As Integer = -1, Optional AplicaAnticiposPagados As Integer = 1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
'Data = New DataTable
|
||||
@@ -365,7 +366,7 @@ Public Class ClsMovimientos
|
||||
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
|
||||
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||
.Add("@EstatusCliente", SqlDbType.Int).Value = EstatusCliente
|
||||
|
||||
.Add("@AplicaAnticiposPagados", SqlDbType.Int).Value = AplicaAnticiposPagados
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -4802,7 +4802,6 @@ Public Class ClsPaginas
|
||||
#End Region
|
||||
#Region "Planeacion"
|
||||
'PLANEACIÓN
|
||||
PaginaDict.Add("/Planeacion/CatSucursales.aspx".ToUpper(), 17)
|
||||
PaginaDict.Add("/Planeacion/Sucursal.aspx".ToUpper(), 17)
|
||||
PaginaDict.Add("/Planeacion/CatProyectos.aspx".ToUpper(), 34)
|
||||
PaginaDict.Add("/Planeacion/CatSubProyectos.aspx".ToUpper(), 35)
|
||||
|
||||
383
App_Code/ClsSucursales.vb
Normal file
383
App_Code/ClsSucursales.vb
Normal file
@@ -0,0 +1,383 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports Extensiones
|
||||
Imports System
|
||||
Imports System.Configuration
|
||||
|
||||
Public Class ClsSucursales
|
||||
Implements IDisposable
|
||||
|
||||
#Region "Campos"
|
||||
|
||||
'SQL
|
||||
Private SqlConexion As SqlConnection
|
||||
Private SqlAdapter As SqlDataAdapter
|
||||
Private SqlTransacc As SqlTransaction
|
||||
Private SqlCommand As SqlCommand
|
||||
Private Data As DataTable
|
||||
|
||||
Private disposedValue As Boolean = False
|
||||
|
||||
'Atributos de la clase
|
||||
Private _Calle As String
|
||||
Private _NoExt As String
|
||||
Private _NoInt As String
|
||||
Private _Colonia As String
|
||||
Private _Localidad As String
|
||||
Private _Municipio As String
|
||||
Private _Estado As String
|
||||
Private _Pais As String
|
||||
Private _CP As Integer
|
||||
'PARA REGISTRAR CONEXION
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
Public ReadOnly Property Calle As String
|
||||
Get
|
||||
Return _Calle
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property NoExt As String
|
||||
Get
|
||||
Return _NoExt
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property NoInt As String
|
||||
Get
|
||||
Return _NoInt
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Colonia As String
|
||||
Get
|
||||
Return _Colonia
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Localidad As String
|
||||
Get
|
||||
Return _Localidad
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Municipio As String
|
||||
Get
|
||||
Return _Municipio
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Estado As String
|
||||
Get
|
||||
Return _Estado
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Pais As String
|
||||
Get
|
||||
Return _Pais
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CP As Integer
|
||||
Get
|
||||
Return _CP
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property DtResultados() As DataTable
|
||||
Get
|
||||
DtResultados = Data
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
|
||||
|
||||
If TransaccionCompartida Is Nothing Then
|
||||
SqlConexion = New SqlConnection
|
||||
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
|
||||
Try
|
||||
SqlConexion.Open()
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||
End Try
|
||||
Else
|
||||
SqlConexion = TransaccionCompartida.Connection
|
||||
SqlTransacc = TransaccionCompartida
|
||||
End If
|
||||
|
||||
SqlCommand = New SqlCommand("", SqlConexion)
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
.Parameters.Clear()
|
||||
.CommandText = StrSQL
|
||||
.CommandType = TipoComando
|
||||
End With
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
|
||||
Try
|
||||
'DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsRH','{0}')", "RH/CatMotivosBaja"), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
|
||||
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
SqlAdapter.Fill(Data)
|
||||
CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ConexionClose()
|
||||
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
|
||||
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
CveConexion = 0
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlCommand
|
||||
.Parameters.Clear()
|
||||
.CommandText = pStrSQL
|
||||
.CommandType = TipoComando
|
||||
End With
|
||||
|
||||
If Not SqlTransacc Is Nothing Then SqlCommand.Transaction = SqlTransacc
|
||||
|
||||
End Sub
|
||||
Public Function IniciaTransacSQL() As SqlTransaction
|
||||
If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction()
|
||||
Return SqlTransacc
|
||||
End Function
|
||||
|
||||
Public Sub RollBack()
|
||||
If SqlTransacc IsNot Nothing Then SqlTransacc.Rollback()
|
||||
SqlTransacc = Nothing
|
||||
End Sub
|
||||
Public Sub Commit()
|
||||
If SqlTransacc IsNot Nothing Then SqlTransacc.Commit()
|
||||
SqlTransacc = Nothing
|
||||
End Sub
|
||||
|
||||
'Public Function GetSucursalesEmpresa(CveEmpresa As Integer) As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
' Data = New DataTable
|
||||
' SqlAdapter = New SqlDataAdapter("PA_GetSucursalesEmpresa", SqlConexion)
|
||||
' SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
' End With
|
||||
|
||||
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
' Retorno = True
|
||||
' Catch ex As SqlException
|
||||
' OnError("Ocurrió un error al consultar las Sucursales.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
' End Try
|
||||
' SqlAdapter.Dispose()
|
||||
' Return Retorno
|
||||
'End Function
|
||||
|
||||
|
||||
|
||||
|
||||
Public Function GetSucursales(Optional CveEmpresa As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
Data = New DataTable
|
||||
SqlAdapter = New SqlDataAdapter("PA_SucursalesGet", SqlConexion)
|
||||
SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As SqlException
|
||||
OnError("Ocurrió un error al consultar las Sucursales.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
SqlAdapter.Dispose()
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
Public Function AddSucursal(Sucursal As String, Serie As String, IVA As Double, FormatoFactura As String, CveUsuario As Integer, CveEmpresa As Integer,
|
||||
Calle As String, NoExt As String, NoInt As String, Colonia As String, Localidad As String, Municipio As String, Estado As String, Pais As String, CP As String, TipoSucursal As Integer) As Integer
|
||||
Dim Retorno = -1
|
||||
|
||||
DataAdapter("PA_SucursalAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Sucursal", SqlDbType.VarChar).Value = Sucursal
|
||||
.Add("@Serie", SqlDbType.VarChar).Value = Serie
|
||||
.Add("@IVA", SqlDbType.Float).Value = IVA
|
||||
.Add("@FormatoFactura", SqlDbType.VarChar).Value = FormatoFactura
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
|
||||
.Add("@Calle", SqlDbType.VarChar).Value = Calle
|
||||
.Add("@NoExt", SqlDbType.VarChar).Value = NoExt
|
||||
.Add("@NoInt", SqlDbType.VarChar).Value = NoInt
|
||||
.Add("@Colonia", SqlDbType.VarChar).Value = Colonia
|
||||
.Add("@Localidad", SqlDbType.VarChar).Value = Localidad
|
||||
.Add("@Municipio", SqlDbType.VarChar).Value = Municipio
|
||||
.Add("@Estado", SqlDbType.VarChar).Value = Estado
|
||||
.Add("@Pais", SqlDbType.VarChar).Value = Pais
|
||||
.Add("@CP", SqlDbType.VarChar).Value = CP
|
||||
.Add("@TipoSucursal", SqlDbType.Int).Value = TipoSucursal
|
||||
.Add("@pCveSucursal", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = SqlAdapter.SelectCommand.Parameters("@pCveSucursal").Value.ToString.ToEntero
|
||||
Catch Ex1 As SqlException
|
||||
If Ex1.Message.Contains("Número: 2627;") Then
|
||||
Alert("Ya existe una Sucursal con el mismo nombre: " & Sucursal & ".", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al Guardar la Sucursal.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al Guardar la Sucursal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
SqlAdapter.Dispose()
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateSucursal(Sucursal As String, Serie As String, IVA As Double, FormatoFactura As String, Estatus As Boolean, CveUsuario As Integer, CveSucursal As Integer,
|
||||
Calle As String, NoExt As String, NoInt As String, Colonia As String, Localidad As String, Municipio As String, Estado As String, Pais As String, CP As String, TipoSucursal As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
Data = New DataTable
|
||||
SqlAdapter = New SqlDataAdapter("PA_SucursalUpdate", SqlConexion)
|
||||
SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Sucursal", SqlDbType.VarChar).Value = Sucursal
|
||||
.Add("@Serie", SqlDbType.VarChar).Value = Serie
|
||||
.Add("@IVA", SqlDbType.Float).Value = IVA
|
||||
.Add("@FormatoFactura", SqlDbType.VarChar).Value = FormatoFactura
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = If(Estatus, 1, 0)
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveSucursal", SqlDbType.Int).Value = CveSucursal
|
||||
.Add("@Calle", SqlDbType.VarChar).Value = Calle
|
||||
.Add("@NoExt", SqlDbType.VarChar).Value = NoExt
|
||||
.Add("@NoInt", SqlDbType.VarChar).Value = NoInt
|
||||
.Add("@Colonia", SqlDbType.VarChar).Value = Colonia
|
||||
.Add("@Localidad", SqlDbType.VarChar).Value = Localidad
|
||||
.Add("@Municipio", SqlDbType.VarChar).Value = Municipio
|
||||
.Add("@Estado", SqlDbType.VarChar).Value = Estado
|
||||
.Add("@Pais", SqlDbType.VarChar).Value = Pais
|
||||
.Add("@CP", SqlDbType.VarChar).Value = CP
|
||||
.Add("@TipoSucursal", SqlDbType.Int).Value = TipoSucursal
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
If Ex1.Message.Contains("Número: 2627;") Then
|
||||
Alert("Ya existe una Sucursal con el mismo nombre: " & Sucursal & ".", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al guardar los cambios en la Sucursal", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar los cambios en la Sucursal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
SqlAdapter.Dispose()
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function RemoveSucursal(CveSucursal As Integer) As Boolean
|
||||
Dim OnError As Boolean = False
|
||||
SqlAdapter = New SqlDataAdapter("PA_SucursalRemove", SqlConexion)
|
||||
SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveSucursal", SqlDbType.Int).Value = CveSucursal
|
||||
End With
|
||||
Data = New DataTable()
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
OnError = True
|
||||
Catch Ex1 As SqlException
|
||||
If Ex1.Message.Contains("Número: 547;") Then
|
||||
Alert("La Sucursal no se pudo eliminar por que esta siendo usada por un registro.", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al eliminar la Sucursal.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al eliminar la Sucursal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
SqlAdapter.Dispose()
|
||||
Return OnError
|
||||
End Function
|
||||
|
||||
#Region "IDisposable Support"
|
||||
|
||||
|
||||
' IDisposable
|
||||
Protected Overridable Sub Dispose(disposing As Boolean)
|
||||
If Not Me.disposedValue Then
|
||||
If disposing Then
|
||||
' TODO: dispose managed state (managed objects).
|
||||
If Not Data Is Nothing Then Data.Dispose()
|
||||
If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose()
|
||||
If Not SqlCommand Is Nothing Then SqlCommand.Dispose()
|
||||
If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close()
|
||||
If Not SqlConexion Is Nothing Then SqlConexion.Dispose()
|
||||
End If
|
||||
|
||||
' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below.
|
||||
' TODO: set large fields to null.
|
||||
End If
|
||||
Me.disposedValue = True
|
||||
End Sub
|
||||
|
||||
' TODO: override Finalize() only if Dispose(disposing As Boolean) above has code to free unmanaged resources.
|
||||
'Protected Overrides Sub Finalize()
|
||||
' ' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||
' Dispose(False)
|
||||
' MyBase.Finalize()
|
||||
'End Sub
|
||||
|
||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
@@ -979,13 +979,13 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
End If
|
||||
|
||||
If DTUM.Count > 0 Then
|
||||
DtPSRetorno = New DataView(DTUM.OrderBy(Function(a) a!Nombre).CopyToDataTable).ToTable(True, {"CveSATUnidadMedida", "ClaveNombre"})
|
||||
DtPSRetorno = New DataView(DTUM.OrderBy(Function(a) a!Nombre).CopyToDataTable).ToTable(True, {"CveUnidadMedidaSAT", "ClaveNombre"})
|
||||
Else
|
||||
DtPSRetorno = Nothing
|
||||
End If
|
||||
|
||||
If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0 Then
|
||||
DtPSRetorno.Columns("CveSATUnidadMedida").ColumnName = "id"
|
||||
DtPSRetorno.Columns("CveUnidadMedidaSAT").ColumnName = "id"
|
||||
DtPSRetorno.Columns("ClaveNombre").ColumnName = "text"
|
||||
retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString
|
||||
context.Response.Write(retorno)
|
||||
|
||||
@@ -194,12 +194,52 @@ Partial Class Bancos_CuentasBancariasDetalle
|
||||
DdlTipoCuenta.SelectedValue = ObjCuentasBancariasDetalle.CveTipoCuenta.ToString
|
||||
|
||||
DdlTipoCuenta_SelectedIndexChanged(DdlTipoCuenta, EventArgs.Empty)
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
|
||||
DDlCuentaContable.SelectedValueExist(ObjCuentasBancariasDetalle.CveCuentaConta.ToString)
|
||||
DdlCuentaContableComplementaria.SelectedValueExist(ObjCuentasBancariasDetalle.CveCuentaContaComplementaria.ToString)
|
||||
Else
|
||||
DDlCuentaContable.SelectedValueExist(ObjCuentasBancariasDetalle.IdCtaContable.ToString)
|
||||
|
||||
Dim ExisteEnIntems As Boolean = False
|
||||
|
||||
For Each li As ListItem In DDlCuentaContable.Items
|
||||
If li.Value.ToEntero = ObjCuentasBancariasDetalle.IdCtaContable Then
|
||||
ExisteEnIntems = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
If ExisteEnIntems Then
|
||||
DDlCuentaContable.SelectedValueExist(ObjCuentasBancariasDetalle.IdCtaContable.ToString)
|
||||
Else
|
||||
|
||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||
Dim objCont As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
|
||||
If objCont.GetCuentas(ObjCuentasBancariasDetalle.IdCtaContable, "-1", -1) Then
|
||||
If objCont.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
DDlCuentaContable.Items.Add(New ListItem(objCont.DtResultados.Rows(0)("CtaCodigo").ToString, objCont.DtResultados.Rows(0)("id").ToString))
|
||||
DDlCuentaContable.SelectedValueExist(ObjCuentasBancariasDetalle.IdCtaContable.ToString)
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
objCont.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
DdlCuentaContableComplementaria.SelectedValueExist(ObjCuentasBancariasDetalle.IdCtaContableComplementaria.ToString)
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
<label class="col-md-1 truncate" style="width: 40px;">F.I.:</label>
|
||||
<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;">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding-top: 0px;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="80px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
<label class="col-md-1 truncate" style="width: 40px;">F.F.:</label>
|
||||
<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;">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 140px !important; padding-top: 0px;">
|
||||
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="80px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
@@ -110,7 +110,7 @@
|
||||
</div>
|
||||
<div class="col-md-3" runat="server" style="text-align: left;">
|
||||
<div class="col-md-1" >
|
||||
<label style="width:70px;">Fecha:</label>
|
||||
<label style="width:70px; padding-top:5px;">Fecha:</label>
|
||||
</div>
|
||||
<div class="col-md-1" >
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="padding-top: 0; width: 140px !important;">
|
||||
@@ -137,65 +137,87 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2" runat="server" id="DivFaltante">
|
||||
<asp:CheckBox ID="ChkFaltante" runat="server" Text="Faltante/Sobrante"/>
|
||||
<div class="col-md-1 truncate" runat="server" id="DivFaltante" style ="width: 145px;" >
|
||||
<asp:CheckBox ID="ChkFaltante" runat="server" Text="Faltante/Sobrante" />
|
||||
</div>
|
||||
<div class="col-md-2" id="DivComision" style="display: none">
|
||||
<label>Importe:</label>
|
||||
<asp:TextBox runat="server" ID="TxtComision" Class=" input-sm " Width="75px"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-md-1" id="DivIVA" style="display: none">
|
||||
<label>IVA:</label>
|
||||
<asp:TextBox runat="server" ID="TxtIVA" Class=" input-sm " Width="75px"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-md-3" style="display: none" id="divSubProyecto">
|
||||
<label class="col-md-1 truncate" style="width: 110px; display: none" id="LblSubproyecto" >SubProyecto:</label>
|
||||
|
||||
<asp:DropDownList ID="DdlSubProyectoDeposito" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
<div class="col-md-10" id="DivComision" style="display: none;">
|
||||
<div class="col-md-3" >
|
||||
<label>Importe:</label>
|
||||
<asp:TextBox runat="server" ID="TxtComision" Class=" input-sm " Width="75px"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4" style="display: none" id="divClasificacion">
|
||||
<div class="col-md-4">
|
||||
<label>SubProyecto:</label>
|
||||
<asp:DropDownList ID="DdlSubProyectoDeposito" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" style="width: 110px;" id="LblClasificacion">Clasificación:</label>
|
||||
|
||||
<asp:DropDownList ID="DdlClasificacion" AutoPostBack="false" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
|
||||
</asp:DropDownList>
|
||||
<div class="col-md-4">
|
||||
<label>Clasificación:</label>
|
||||
<asp:DropDownList ID="DdlClasificacion" AutoPostBack="false" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2" runat="server" id="Div1">
|
||||
<div class="row" >
|
||||
<div class="col-md-1" runat="server" id="Div1" style ="width: 145px">
|
||||
<asp:CheckBox ID="ChkDescuento" runat="server" Text="Descuento"/>
|
||||
</div>
|
||||
<div class="col-md-3" id="DivDescuento" style="display: none">
|
||||
<label>Importe:</label>
|
||||
<asp:TextBox runat="server" ID="TxtDescuento" Class=" input-sm " Width="75px"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-md-10" id="DivDescuento" style="display: none">
|
||||
|
||||
<div class="col-md-3" style="display: none" id="divSubProyectoDescuento">
|
||||
<label class="col-md-1 truncate" style="width: 110px; display: none" id="LblSubproyectoDescuento" >SubProyecto:</label>
|
||||
|
||||
<asp:DropDownList ID="DdlSubProyectoDescuento" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
<div class="col-md-2">
|
||||
<label>Importe:</label>
|
||||
<asp:TextBox runat="server" ID="TxtDescuento" Class=" input-sm " Width="75px"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4" style="display: none" id="divClasificacionDescuento">
|
||||
<div class="col-md-3" >
|
||||
<label>SubProyecto:</label>
|
||||
<asp:DropDownList ID="DdlSubProyectoDescuento" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" style="width: 110px;" id="LblClasificacionDescuento">Clasificación:</label>
|
||||
|
||||
<asp:DropDownList ID="DdlClasificacionDescuento" AutoPostBack="false" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
|
||||
</asp:DropDownList>
|
||||
<div class="col-md-5">
|
||||
<label>Clasificación:</label>
|
||||
<asp:DropDownList ID="DdlClasificacionDescuento" AutoPostBack="false" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1" runat="server" id="Div2" style ="width: 145px">
|
||||
<asp:CheckBox ID="ChkIntermediario" runat="server" Text="Intermediario"/>
|
||||
</div>
|
||||
<div class="col-md-10" id="DivInter" style="display: none">
|
||||
<div class="col-md-2" id="dd">
|
||||
<asp:Dropdownlist ID="DdlProveedorIntermediario" CssClassDdl="select2me" Width="100px" CssStyle="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" runat="server"></asp:Dropdownlist>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" id="DivinterImporte" >
|
||||
<label>Importe:</label>
|
||||
<asp:TextBox runat="server" ID="TxtComisionIntermediario" Class=" input-sm " Width="75px"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-md-2" id="DivIVA" >
|
||||
<label>IVA:</label>
|
||||
<asp:TextBox runat="server" ID="TxtIVA" Class=" input-sm " Width="75px"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-md-3" id="dd2">
|
||||
<label id="LblClasificacion3">Gasto:</label>
|
||||
<asp:DropDownList ID="DdlClasificacionIntermediario" AutoPostBack="false" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-3" id="divSubProyectoIntermediario">
|
||||
<label id="LblSubproyectoIntermediario">SubProyecto:</label>
|
||||
|
||||
|
||||
|
||||
<asp:DropDownList ID="DdlSubProyectoIntermediario" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
@@ -272,7 +294,8 @@
|
||||
var comision = 0;
|
||||
var descuento = 0;
|
||||
var saldo = 0;
|
||||
var IVA = 0
|
||||
var IVA = 0;
|
||||
var ComisionIntermediario = 0;
|
||||
|
||||
function FnSuma(chk, cantidad) {
|
||||
var saldoInicial = ToDouble($('#C_lblValorTotal').text());
|
||||
@@ -318,26 +341,7 @@
|
||||
//debugger;
|
||||
}
|
||||
}
|
||||
var txtcomision = ToDouble($('#C_TxtIVA').val());
|
||||
if (txtcomision != 0) {
|
||||
var comisionNegativa = 0;
|
||||
if (txtcomision < 0) {
|
||||
comisionNegativa = txtcomision * -1;
|
||||
}
|
||||
if (comisionNegativa > saldo) {
|
||||
$('#C_TxtIVA').val(0);
|
||||
comision = 0;
|
||||
descuento = 0;
|
||||
txtcomision = 0;
|
||||
alert("No es posible poner un importe IVA superior a lo seleccionado");
|
||||
saldo = 0;
|
||||
$('#C_lblValorTotal').text(FormatoNumero(ValorTotalSeleccionado, 2));
|
||||
debugger;
|
||||
} else {
|
||||
|
||||
//debugger;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($('#C_ChkDescuento').attr('checked')) {
|
||||
var txtdescuento = ToDouble($('#C_TxtDescuento').val());
|
||||
@@ -363,6 +367,54 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($('#C_ChkIntermediario').attr('checked')) {
|
||||
var txtimporte= ToDouble($('#C_TxtComisionIntermediario').val());
|
||||
if (txtimporte != 0) {
|
||||
var DescuentoNegativa = 0;
|
||||
if (txtimporte > 0) {
|
||||
DescuentoNegativa = txtimporte * -1;
|
||||
}
|
||||
if (DescuentoNegativa > saldo) {
|
||||
$('#C_TxtDescuento').val(0);
|
||||
comision = 0;
|
||||
descuento = 0;
|
||||
IVA = 0;
|
||||
txtimporte = 0;
|
||||
alert("No es posible poner un descuento superior a lo seleccionado");
|
||||
saldo = 0;
|
||||
$('#C_lblValorTotal').text(FormatoNumero(ValorTotalSeleccionado, 2));
|
||||
debugger;
|
||||
} else {
|
||||
//saldo = ValorTotalSeleccionado + txtdescuento + comision;
|
||||
//$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||
//descuento = ToDouble($('#C_TxtDescuento').val())
|
||||
//debugger;
|
||||
}
|
||||
}
|
||||
|
||||
var txtcomision = ToDouble($('#C_TxtIVA').val());
|
||||
if (txtcomision != 0) {
|
||||
var comisionNegativa = 0;
|
||||
if (txtcomision < 0) {
|
||||
comisionNegativa = txtcomision * -1;
|
||||
}
|
||||
if (comisionNegativa > saldo) {
|
||||
$('#C_TxtIVA').val(0);
|
||||
comision = 0;
|
||||
descuento = 0;
|
||||
IVA = 0;
|
||||
ComisionIntermediario = 0;
|
||||
txtcomision = 0;
|
||||
alert("No es posible poner un importe IVA superior a lo seleccionado");
|
||||
saldo = 0;
|
||||
$('#C_lblValorTotal').text(FormatoNumero(ValorTotalSeleccionado, 2));
|
||||
debugger;
|
||||
} else {
|
||||
|
||||
//debugger;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -376,7 +428,7 @@
|
||||
$('#C_TxtComision').val(0)
|
||||
alert("No es posible poner una comision superior a lo seleccionado")
|
||||
} else {
|
||||
saldo = ValorTotalSeleccionado + comision2 + descuento + IVA;
|
||||
saldo = ValorTotalSeleccionado + comision2 + descuento - IVA - ComisionIntermediario;
|
||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||
comision = ToDouble($('#C_TxtComision').val())
|
||||
}
|
||||
@@ -393,7 +445,7 @@
|
||||
$('#C_TxtDescuento').val(descuento)
|
||||
alert("No es posible poner un descuento superior a lo seleccionado")
|
||||
} else {
|
||||
saldo = ValorTotalSeleccionado + comision2 + comision + IVA;
|
||||
saldo = ValorTotalSeleccionado + comision2 + comision - IVA - ComisionIntermediario;
|
||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||
descuento = ToDouble($('#C_TxtDescuento').val())
|
||||
}
|
||||
@@ -403,55 +455,52 @@
|
||||
|
||||
function txtSumaIVA(txt) {
|
||||
var comision2 = ToDouble($('#C_TxtIVA').val());
|
||||
var comisionNegativa = 0;
|
||||
if (comision2 < 0) {
|
||||
comisionNegativa = comision2 * -1;
|
||||
}
|
||||
if (comisionNegativa > ValorTotalSeleccionado) {
|
||||
if (comision2 > ValorTotalSeleccionado) {
|
||||
$('#C_TxtIVA').val(descuento)
|
||||
alert("No es posible poner un IVA superior a lo seleccionado")
|
||||
} else {
|
||||
saldo = ValorTotalSeleccionado + descuento + comision + comision2;
|
||||
saldo = ValorTotalSeleccionado + descuento + comision - comision2 - ComisionIntermediario;
|
||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||
IVA = ToDouble($('#C_TxtIVA').val())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function txtSumaTntermediario(txt) {
|
||||
var comision2 = ToDouble($('#C_TxtComisionIntermediario').val());
|
||||
if (comision2 > ValorTotalSeleccionado) {
|
||||
$('#C_TxtComisionIntermediario').val(descuento)
|
||||
alert("No es posible poner un importe superior a lo seleccionado")
|
||||
} else {
|
||||
saldo = ValorTotalSeleccionado + descuento + comision - comision2 - IVA;
|
||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||
ComisionIntermediario = ToDouble($('#C_TxtComisionIntermediario').val())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function CheckFaltante(chk) {
|
||||
if (chk.checked == true) {
|
||||
$('#DivComision').css("display", "block");
|
||||
$('#LblSubproyecto').css("display", "block");
|
||||
$('#divSubProyecto').css("display", "block");
|
||||
$('#LblClasificacion').css("display", "block");
|
||||
$('#divClasificacion').css("display", "block");
|
||||
$('#DivIVA').css("display", "block");
|
||||
|
||||
} else {
|
||||
$('#DivComision').css("display", "none");
|
||||
$('#LblSubproyecto').css("display", "none");
|
||||
$('#divSubProyecto').css("display", "none");
|
||||
$('#LblClasificacion').css("display", "none");
|
||||
$('#divClasificacion').css("display", "none");
|
||||
$('#DivIVA').css("display", "none");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function CheckDescuento(chk) {
|
||||
if (chk.checked == true) {
|
||||
$('#DivDescuento').css("display", "block");
|
||||
$('#LblSubproyectoDescuento').css("display", "block");
|
||||
$('#divSubProyectoDescuento').css("display", "block");
|
||||
$('#LblClasificacionDescuento').css("display", "block");
|
||||
$('#divClasificacionDescuento').css("display", "block");
|
||||
} else {
|
||||
|
||||
$('#DivDescuento').css("display", "none");
|
||||
$('#LblSubproyectoDescuento').css("display", "none");
|
||||
$('#divSubProyectoDescuento').css("display", "none");
|
||||
$('#LblClasificacionDescuento').css("display", "none");
|
||||
$('#divClasificacionDescuento').css("display", "none");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function CheckIntermediario(chk) {
|
||||
if (chk.checked == true) {
|
||||
$('#DivInter').css("display", "block");
|
||||
} else {
|
||||
$('#DivInter').css("display", "none");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -24,11 +24,14 @@ Partial Class Bancos_DepositosCaja
|
||||
TxtComision.Attributes.Add("onKeyUp", "txtSuma(event);")
|
||||
TxtDescuento.Attributes.Add("onKeyUp", "txtSumaDescuento(event);")
|
||||
TxtIVA.Attributes.Add("onKeyUp", "txtSumaIVA(event);")
|
||||
TxtComisionIntermediario.Attributes.Add("onKeyUp", "txtSumaTntermediario(event);")
|
||||
|
||||
|
||||
CargaCuentas()
|
||||
ChkFaltante.Attributes.Add("onclick", "CheckFaltante(this);")
|
||||
ChkDescuento.Attributes.Add("onclick", "CheckDescuento(this);")
|
||||
ChkIntermediario.Attributes.Add("onclick", "CheckIntermediario(this);")
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
@@ -46,19 +49,30 @@ Partial Class Bancos_DepositosCaja
|
||||
|
||||
DdlSubProyectoDeposito.DataSource = DdlSubProyectos.DataSource
|
||||
DdlSubProyectoDeposito.DataBind()
|
||||
DdlSubProyectos.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlSubProyectoDeposito.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlSubProyectoDescuento.DataSource = DdlSubProyectos.DataSource
|
||||
DdlSubProyectoDescuento.DataBind()
|
||||
DdlSubProyectos.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlSubProyectoDescuento.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=2)
|
||||
DdlClasificacion.DataBind()
|
||||
DdlSubProyectos.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlClasificacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlClasificacionDescuento.DataSource = DdlClasificacion.DataSource
|
||||
DdlClasificacionDescuento.DataBind()
|
||||
DdlSubProyectos.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlClasificacionDescuento.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
'intermediario
|
||||
DdlProveedorIntermediario.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveProveedor in ({0})", 73343))
|
||||
DdlProveedorIntermediario.DataBind()
|
||||
|
||||
DdlClasificacionIntermediario.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=2)
|
||||
DdlClasificacionIntermediario.DataBind()
|
||||
|
||||
DdlSubProyectoIntermediario.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
|
||||
DdlSubProyectoIntermediario.DataBind()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -80,7 +94,7 @@ Partial Class Bancos_DepositosCaja
|
||||
UpGvFacturas.Update()
|
||||
GvFacturas.DataBind()
|
||||
lblValorTotal.Text = "0.00"
|
||||
TxtComision.text = ""
|
||||
TxtComision.Text = ""
|
||||
divLabelTotal.Visible = True
|
||||
End Sub
|
||||
|
||||
@@ -91,6 +105,7 @@ Partial Class Bancos_DepositosCaja
|
||||
Dim Comision As Decimal = TxtComision.Text.ToDecimal
|
||||
Dim Descuento As Decimal = TxtDescuento.Text.ToDecimal
|
||||
Dim IVA As Decimal = TxtIVA.Text.ToDecimal
|
||||
Dim ImporteInter As Decimal = TxtComisionIntermediario.Text.ToDecimal
|
||||
|
||||
|
||||
For Each Gvr As GridViewRow In GvFacturas.Rows
|
||||
@@ -104,7 +119,7 @@ Partial Class Bancos_DepositosCaja
|
||||
|
||||
TotalImportePrePoliza = TotalImporte
|
||||
If Comision <> 0 Then
|
||||
TotalImporte = TotalImporte + Comision + Descuento + IVA
|
||||
TotalImporte = TotalImporte + Comision + Descuento
|
||||
'Comision = -(Comision) ' se inverte el valor, va cargada
|
||||
'Descuento = -(Descuento) ' se inverte el valor, va cargada
|
||||
If DdlSubProyectoDeposito.SelectedValue.ToEntero = -1 Or DdlClasificacion.SelectedValue.ToEntero = -1 Then
|
||||
@@ -113,6 +128,10 @@ Partial Class Bancos_DepositosCaja
|
||||
End If
|
||||
End If
|
||||
|
||||
If TxtComisionIntermediario.Text.ToDecimal <> 0 Then
|
||||
TotalImporte = TotalImporte - TxtComisionIntermediario.Text.ToDecimal - IVA
|
||||
End If
|
||||
|
||||
Dim OcurrioError As Boolean = False
|
||||
Dim ObjContabilidad As New ClsContabilidad()
|
||||
Dim ObjBancos As New ClsBancos(ObjContabilidad.IniciaTransacSQL())
|
||||
@@ -134,8 +153,12 @@ Partial Class Bancos_DepositosCaja
|
||||
Dim CveSubProyectoDescuento As Integer = -1
|
||||
Dim CveClasificacion As Integer = -1
|
||||
Dim CveClasificacionDescuento As Integer = -1
|
||||
Dim documentos As String = "Los Depósitos se realizaron exitósamente<br/><br/>"
|
||||
Dim documentos As String = "Los Depósitos se realizaron exitosamente<br/><br/>"
|
||||
Dim imprimirFolios As String = ""
|
||||
Dim CveSubProyectoIntermediario As Integer = -1
|
||||
Dim CveClasificacionIntermediario As Integer = -1
|
||||
Dim CveProveedorIntermediario As Integer = -1
|
||||
|
||||
If drOrigen IsNot Nothing Then
|
||||
CveMoneda = drOrigen("CveMoneda").ToString.ToEntero
|
||||
IdCuentaBancariaOrigen = drOrigen("IdCtaContable").ToString.ToEntero
|
||||
@@ -148,47 +171,72 @@ Partial Class Bancos_DepositosCaja
|
||||
CveCuentaBancariaDestino = drDestino("IdCtaContableSIG").ToString.ToEntero
|
||||
End If
|
||||
|
||||
NuevaCvePrePoliza = ObjContabilidad.AddPrePolizas("Vta", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
NuevaCvePrePoliza = ObjContabilidad.AddPrePolizas("Vta", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=1)
|
||||
|
||||
|
||||
If ChkIntermediario.Checked Then
|
||||
|
||||
CveSubProyectoIntermediario = DdlSubProyectoIntermediario.SelectedValue.ToEntero
|
||||
CveClasificacionIntermediario = DdlClasificacionIntermediario.SelectedValue.ToEntero
|
||||
CveProveedorIntermediario = DdlProveedorIntermediario.SelectedValue.ToEntero
|
||||
|
||||
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, DdlClasificacionIntermediario.SelectedItem.Text, 95, DdlClasificacionIntermediario.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, ImporteMX:=TotalImporte, CveProveedor:=CveProveedorIntermediario, CveCuenta:=57619) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, DdlClasificacionIntermediario.SelectedItem.Text, 95, DdlClasificacionIntermediario.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, ImporteMX:=TotalImporte, CveProveedor:=CveProveedorIntermediario, CveCuenta:=57619) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, ImporteInter, DdlClasificacionIntermediario.SelectedItem.Text, 51, DdlClasificacionIntermediario.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, ImporteMX:=ImporteInter) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
If IVA <> 0 Then
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, IVA, DdlClasificacionIntermediario.SelectedItem.Text, 14, DdlClasificacionIntermediario.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, ImporteMX:=IVA, PorcentajeImpuesto:=0.16D) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'Entrada a bancos
|
||||
FolioIE = ObjBancos.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToEntero, 13)
|
||||
If Not FolioIE > 0 Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
CveIEOrigen = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, 13, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
CveIEOrigen = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, 13, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorIntermediario:=CveProveedorIntermediario)
|
||||
|
||||
documentos += String.Format("<a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>Depósito: {1}</a>     <br/> ", CveIEOrigen, FolioIE)
|
||||
|
||||
|
||||
If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
|
||||
If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio) Then
|
||||
|
||||
If ChkFaltante.Checked Then
|
||||
CveSubProyecto = DdlSubProyectoDeposito.SelectedValue.ToEntero
|
||||
CveClasificacion = DdlClasificacion.SelectedValue.ToEntero
|
||||
If Comision <> 0 Then
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, DdlClasificacion.SelectedItem.Text, 51, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, DdlClasificacion.SelectedItem.Text, 51, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If IVA <> 0 Then
|
||||
IVA = CDec(0.16)
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, IVA, DdlClasificacion.SelectedItem.Text, 14, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If ChkDescuento.Checked Then
|
||||
CveSubProyectoDescuento = DdlSubProyectoDescuento.SelectedValue.ToEntero
|
||||
CveClasificacionDescuento = DdlClasificacionDescuento.SelectedValue.ToEntero
|
||||
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Descuento, DdlClasificacionDescuento.SelectedItem.Text, 51, DdlClasificacionDescuento.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Descuento, DdlClasificacionDescuento.SelectedItem.Text, 51, DdlClasificacionDescuento.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
@@ -210,17 +258,20 @@ Partial Class Bancos_DepositosCaja
|
||||
FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, 2)
|
||||
If Not FolioIE > 0 Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
CveIEDestino = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, SerieFolio, 30, String.Format("Depósito Bancario: {0}", SerieFolio), Fecha, IdCuentaBancariaDestino, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEDestino, ImporteMX:=Importe * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'Asignamos la cuenta Deposito
|
||||
If Not ObjBancos.UpdateBancos_IECuentaDeposito(CveIEDestino, CveIE) Then
|
||||
If Not OcurrioError AndAlso Not ObjBancos.UpdateBancos_IECuentaDeposito(CveIEDestino, CveIE) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEDestino}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}")
|
||||
|
||||
@@ -243,7 +294,10 @@ Partial Class Bancos_DepositosCaja
|
||||
|
||||
|
||||
End If
|
||||
|
||||
TxtComision.Text = ""
|
||||
TxtDescuento.Text = ""
|
||||
TxtIVA.Text = ""
|
||||
TxtComisionIntermediario.Text = ""
|
||||
ObjContabilidad.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -1556,7 +1556,39 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="DModalDesconciliar" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpDesconciliar" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlDesconciliar" Text="Desconciliar" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-2" style="text-align: left">Fecha Desconciliado:</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDesconciliado" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaDesconciliado" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MeeFechaDesconciliado" runat="server" TargetControlID="TxtFechaDesconciliado" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CeFechaDesconciliado" TargetControlID="TxtFechaDesconciliado" PopupButtonID="LnkFechaDesconciliado" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RfvFechaDesconciliado" runat="server" ControlToValidate="TxtFechaDesconciliado" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Desconciliado''</b> es necesario, por favor ingréselo." ValidationGroup="VGMModalDesconciliado"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceFechaDesconciliado" runat="server" HighlightCssClass="vco" TargetControlID="RfvFechaDesconciliado"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnDesconciliar" OnClick="BtnDesconciliar_Click" runat="server" Text="Desconciliar" CssClass="btn btn-primary" ValidationGroup="VGMModalDesconciliado" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
@@ -179,10 +179,19 @@ Partial Class Bancos_IE
|
||||
ViewState("FechaCompra") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveIECancelacion As Integer
|
||||
Get
|
||||
If ViewState("CveIECancelacion") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveIECancelacion").ToString().ToEntero()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveIECancelacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property ImporteOriginalDevDin As Decimal
|
||||
Get
|
||||
@@ -1002,9 +1011,6 @@ Partial Class Bancos_IE
|
||||
Select Case ObjIE.CveEstatusIE
|
||||
Case 1
|
||||
If Not ObjIE.FueConciliado Then
|
||||
'If UsuarioActual.TienePermisoProceso(85) Then ImgCancelarMovimiento.Visible = True
|
||||
If UsuarioActual.TienePermisoProceso(85) Then LnkCancelar.Visible = True
|
||||
|
||||
'ELIMINAR IE SIN VALIDACIONES
|
||||
If UsuarioActual.TienePermisoProceso(80) AndAlso NumComplementos = 0 Then LnkEliminar.Visible = True
|
||||
|
||||
@@ -1014,6 +1020,8 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(85) Then LnkCancelar.Visible = True
|
||||
|
||||
''COMENTAR - solo para pruebas
|
||||
'If UsuarioActual.TienePermisoProceso(85) Then LnkCancelar.Visible = True
|
||||
'If UsuarioActual.TienePermisoProceso(80) Then LnkEliminar.Visible = True
|
||||
@@ -1134,6 +1142,7 @@ Partial Class Bancos_IE
|
||||
LbMovimientoCancelado.Text = "Movimiento de Cancelación:"
|
||||
HLIECancelacion.NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", ObjIE.CveIECancelacion)
|
||||
HLIECancelacion.Text = ObjIE.FolioIECancelacion
|
||||
CveIECancelacion = ObjIE.CveIECancelacion
|
||||
End If
|
||||
|
||||
'MOVIMIENTO CANCELADO
|
||||
@@ -1212,7 +1221,7 @@ Partial Class Bancos_IE
|
||||
Dim ExistenComplementosVigentes As Boolean = VerificaComplementos(True)
|
||||
'Dim ExistenComplementos As Boolean = VerificaComplementos(False)
|
||||
|
||||
If Not ChkConciliado.Checked And ObjIE.CveEstatusIE <> 2 Then
|
||||
If Not ChkConciliado.Checked And ObjIE.CveEstatusIE <> 2 And ObjIE.CveIECancelacion <= 0 Then
|
||||
|
||||
If (Not ExistenComplementosVigentes) Then
|
||||
|
||||
@@ -1233,7 +1242,7 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
|
||||
LnkEliminar.Visible = False
|
||||
LnkCancelar.Visible = False
|
||||
'LnkCancelar.Visible = False
|
||||
|
||||
LnkCancelarComplemento.Visible = True
|
||||
LnkCancelarComplementoImporte.Visible = True
|
||||
@@ -1243,7 +1252,6 @@ Partial Class Bancos_IE
|
||||
|
||||
Else
|
||||
BtnEditar.Visible = False
|
||||
LnkEliminar.Visible = False
|
||||
LnkCancelarComplemento.Visible = False
|
||||
LnkCancelarComplementoImporte.Visible = False
|
||||
DVGenerarComplementoModal.Visible = False
|
||||
@@ -4753,7 +4761,11 @@ Partial Class Bancos_IE
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEliminar_Click(sender As Object, e As EventArgs) Handles LnkEliminar.Click
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "divDescripcion"))
|
||||
If CveIECancelacion > 0 Then
|
||||
Alert("El Movimiento no se puede eliminar porque tiene una cancelación relacionada, se tiene que eliminar primero la cancelación", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "divDescripcion"))
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -5706,7 +5718,7 @@ Partial Class Bancos_IE
|
||||
|
||||
GvComplementoPagos.DataSource = ObjBancos.DtResultados
|
||||
|
||||
If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 0 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And CveEstatusIE <> 2 Then
|
||||
If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 0 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And CveEstatusIE <> 2 And ObjBancos.DtResultados.FiltraParametros(" CveIECancelacion > 0 ").Rows.Count = 0 Then
|
||||
DVGenerarComplementoModal.Visible = True
|
||||
End If
|
||||
Else
|
||||
@@ -5990,11 +6002,36 @@ Partial Class Bancos_IE
|
||||
|
||||
Protected Sub LnkCancelar_Click(sender As Object, e As EventArgs)
|
||||
If ChkConciliado.Checked Then
|
||||
Alert("El documento seleccionado no se puede eliminar porque se encuentra conciliado.", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
TxtFechaDesconciliado.Text = Now.ToShortDateString
|
||||
UpDesconciliar.Update()
|
||||
RegistraScript("$('#DModalDesconciliar').modal()")
|
||||
End If
|
||||
RegistraScript("ShowDivCancelarIE();")
|
||||
End Sub
|
||||
Protected Sub BtnDesconciliar_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjBancos As New ClsBancos
|
||||
Dim ObjOI As New ClsOIEventos(ObjBancos.IniciaTransacSQL())
|
||||
Dim ErrorTrans As Boolean = False
|
||||
|
||||
|
||||
If ObjBancos.DesconciliarIE(CveIE, TxtFechaDesconciliado.Text.ToDate(), UsuarioActual.CveUsuario) Then
|
||||
If Not ObjOI.AddEventoBitacora("El pago ha sido desconciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIE) Then
|
||||
ErrorTrans = True
|
||||
End If
|
||||
Else
|
||||
ErrorTrans = True
|
||||
End If
|
||||
|
||||
If Not ErrorTrans Then
|
||||
ObjBancos.Commit()
|
||||
Alert("Desconciliado correctamente")
|
||||
RegistraScript("$('#DModalDesconciliar').modal('hide')")
|
||||
Else
|
||||
ObjBancos.RollBack()
|
||||
End If
|
||||
ObjBancos.Dispose()
|
||||
ObjOI.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub LnkEmitirComplemento_Click(sender As Object, e As EventArgs) Handles LnkEmitirComplemento.Click
|
||||
GeneraTimbre()
|
||||
|
||||
@@ -2659,6 +2659,9 @@ Partial Class Bancos_PopIECompras
|
||||
If MovimientoPagar.IVANoDeducible > 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, If(ConceptoContable = 30, TxtFolio.Text.Trim, TxtObservaciones.Text), 280, ConceptoMovimiento, Fecha, IdCtaContableNoIVA, -1, CveIE, -1, CveCompra, -1, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMXNoDeducible, CveCuenta:=CveCuenta, TipoCambio:=TimpocambioGeneral, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Else
|
||||
ImporteMovimiento = 0
|
||||
ImporteMX = 0
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -2884,6 +2887,7 @@ Partial Class Bancos_PopIECompras
|
||||
If MovimientoPagar.IVANoDeducible > 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, If(ConceptoContable = 30, TxtFolio.Text.Trim, TxtObservaciones.Text), 280, ConceptoMovimiento, Fecha, IdCtaContableNoIVA, -1, CveIE, -1, CveCompra, -1, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMXNoDeducible, CveCuenta:=CveCuenta, TipoCambio:=TimpocambioGeneral, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
|
||||
End If
|
||||
End If
|
||||
'Case 280 'Iva Acreditable No Deducible
|
||||
|
||||
@@ -369,7 +369,7 @@
|
||||
<asp:UpdatePanel ID="UPCompras" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvCxP" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas X Pagar Pendientes"
|
||||
DataKeyNames="CveCompra,ImporteProgramo,Saldo,SubTotal,IVA,IVADeducible,IVANoDeducible,IEPS,RetIVA,RetISR,Original,UUID,RFC,CveFactura,SerieFolio,Descripcion,CvePrePoliza,Fecha,EstatusInventario,CveProveedor,TipoCambio, CveMoneda,CveRetIVAConcepto,IVAPorPagar,IVAPorPagarDeducible,IVAPorPagarNoDeducible,IEPSPorPagar,CveRetISRConcepto,PorcentajeIVA,CveTipoConcepto,CveSubProyecto,TotalOriginal"
|
||||
DataKeyNames="CveCompra,ImporteProgramo,Saldo,SubTotal,IVA,IVADeducible,IVANoDeducible,IEPS,RetIVA,RetISR,Original,UUID,RFC,CveFactura,SerieFolio,Descripcion,CvePrePoliza,Fecha,EstatusInventario,CveProveedor,TipoCambio, CveMoneda,CveRetIVAConcepto,IVAPorPagar,IVAPorPagarDeducible,IVAPorPagarNoDeducible,IEPSPorPagar,CveRetISRConcepto,PorcentajeIVA,CveTipoConcepto,CveSubProyecto,TotalOriginal,EsImportacion"
|
||||
Width="100%" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
|
||||
@@ -974,7 +974,6 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
Dim importeMX As Decimal
|
||||
Dim FechaMovimiento As Date = TxtFechaDocumento.Text.ToDate
|
||||
Dim IdCtaContable As Integer = 0
|
||||
Dim CveCuenta As Integer = 0
|
||||
Dim ConceptoMovimiento As String
|
||||
Dim Referencia As String
|
||||
Dim tipoCambioCompra As Decimal
|
||||
@@ -1003,6 +1002,14 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Dim DttPlantilla As DataTable = Nothing
|
||||
If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then
|
||||
DttPlantilla = ObjMov.DtResultados
|
||||
End If
|
||||
|
||||
Dim TipoContabilidad As Integer = UsuarioActual.Empresa.TipoContabilidad
|
||||
|
||||
'inserto las compras que voy a pagar
|
||||
For Each gvr As GridViewRow In GvCxP.Rows
|
||||
If gvr.FCCheckBox("Chk").Checked Then
|
||||
@@ -1031,37 +1038,17 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
End If
|
||||
CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero
|
||||
|
||||
If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then
|
||||
For Each Row As DataRow In ObjMov.DtResultados.Rows
|
||||
'If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then
|
||||
If DttPlantilla IsNot Nothing AndAlso DttPlantilla.Rows.Count > 0 Then
|
||||
For Each Row As DataRow In DttPlantilla.Rows
|
||||
ConceptoContable = Row("CveConcepto").ToString.ToEntero
|
||||
TipoMovimiento = If(Row("TipoMovto").ToString = "True", True, False)
|
||||
ImporteMovimiento = 0
|
||||
IdCtaContable = 0
|
||||
CveCuenta = 0
|
||||
ConceptoMovimiento = $"{HplProveedor.Text} F:{gvr.DataKey("SerieFolio")}"
|
||||
Referencia = gvr.DataKey("SerieFolio").ToString
|
||||
Dim PorcentajeImpuesto As Decimal = 0
|
||||
|
||||
If ConceptoContable.Contiene(14, 19) AndAlso gvr.DataKey("CveCompra").ToEntero > 0 Then
|
||||
Dim objcompras As New ClsCompras
|
||||
objcompras.GetCompras(gvr.DataKey("CveCompra").ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa)
|
||||
If objcompras.DtResultados IsNot Nothing AndAlso objcompras.DtResultados.Rows.Count > 0 Then
|
||||
Dim dr As DataRow = objcompras.DtResultados.Rows(0)
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
If dr("EsImportacion").ToString = "True" Then
|
||||
EsImportacion = True
|
||||
If ConceptoContable = 14 Then
|
||||
ConceptoContable = 287
|
||||
Else
|
||||
ConceptoContable = 288
|
||||
End If
|
||||
Else
|
||||
EsImportacion = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Select Case ConceptoContable
|
||||
Case 17 'Pago Proveedores
|
||||
@@ -1100,7 +1087,6 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
IdCtaContable = CtaAcreedor
|
||||
Else
|
||||
IdCtaContable = CtaProveedor
|
||||
CveCuenta = CveCuentaProveedor
|
||||
End If
|
||||
|
||||
Else
|
||||
@@ -1109,7 +1095,6 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
IdCtaContable = IdCtaContComplementaria
|
||||
CveCuenta = CveCuentaProveedorExtranjera
|
||||
If ImporteMovimiento <> 0 AndAlso (UsaComplementariaProveedores Or IdCtaContable > 0) Then 'Cuando tiene complementaria lo dividimos en dos
|
||||
importeMX = ImporteMovimiento
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0.00D, Referencia, CveConceptoComplementaria, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=Math.Round(ImporteMovimiento * tipoCambioCompraValuacion - ImporteMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioCompraValuacion, CveCuenta:=CveCuentaComplementaria) Then
|
||||
@@ -1117,7 +1102,6 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
End If
|
||||
End If
|
||||
IdCtaContable = IdCtaProveedorExtranjera
|
||||
CveCuenta = CveCuentaProveedorExtranjera
|
||||
End If
|
||||
Case 15 'Ret IVA X Acreditar Honorarios/Serv. Prof.
|
||||
If gvr.DataKey("CveRetIVAConcepto").ToEntero = 1 Then
|
||||
@@ -1149,23 +1133,13 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ElseIf UsuarioActual.Empresa.Funcionalidad(307).ToEntero > 0 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(307).ToEntero
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If CveCuentaRetIVA <> 0 Then
|
||||
CveCuenta = CveCuentaRetIVA
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Case 22 'Ret IVA Acreditable Honorarios/Serv. Prof.
|
||||
If gvr.DataKey("CveRetIVAConcepto").ToEntero = 1 Then
|
||||
@@ -1196,7 +1170,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ElseIf UsuarioActual.Empresa.Funcionalidad(308).ToEntero > 0 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(308).ToEntero
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
End If
|
||||
@@ -1232,23 +1206,13 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ElseIf UsuarioActual.Empresa.Funcionalidad(309).ToEntero > 0 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(309).ToEntero
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If CveCuentaRetIVA <> 0 Then
|
||||
CveCuenta = CveCuentaRetIVA
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Case 184 'Ret IVA Acreditable Fletes P.F.
|
||||
If gvr.DataKey("CveRetIVAConcepto").ToEntero = 2 Then
|
||||
@@ -1279,7 +1243,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ElseIf UsuarioActual.Empresa.Funcionalidad(310).ToEntero > 0 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(310).ToEntero
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
End If
|
||||
@@ -1315,23 +1279,13 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ElseIf UsuarioActual.Empresa.Funcionalidad(311).ToEntero > 0 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(311).ToEntero
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If CveCuentaRetIVA <> 0 Then
|
||||
CveCuenta = CveCuentaRetIVA
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Case 186 'Ret IVA Acreditable Fletes P.M.
|
||||
If gvr.DataKey("CveRetIVAConcepto").ToEntero = 3 Then
|
||||
@@ -1362,7 +1316,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ElseIf UsuarioActual.Empresa.Funcionalidad(312).ToEntero > 0 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(312).ToEntero
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
End If
|
||||
@@ -1398,7 +1352,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ElseIf UsuarioActual.Empresa.Funcionalidad(313).ToEntero > 0 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(313).ToEntero
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
End If
|
||||
@@ -1434,7 +1388,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ElseIf UsuarioActual.Empresa.Funcionalidad(314).ToEntero > 0 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(314).ToEntero
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
End If
|
||||
@@ -1469,7 +1423,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ElseIf UsuarioActual.Empresa.Funcionalidad(578).ToEntero > 0 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
End If
|
||||
@@ -1504,7 +1458,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ElseIf UsuarioActual.Empresa.Funcionalidad(582).ToEntero > 0 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(582).ToEntero
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
End If
|
||||
@@ -1545,16 +1499,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' 'Conta SIG
|
||||
' If CveCuentaRetISR <> 0 Then
|
||||
' CveCuenta = CveCuentaRetISR
|
||||
' Else
|
||||
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' End If
|
||||
'Case 23 'Ret ISR Acreditable
|
||||
' If gvr.DataKey("CveRetISRConcepto").ToEntero = 1 Then
|
||||
@@ -1590,16 +1535,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' 'Conta SIG
|
||||
' If CveCuentaRetISR <> 0 Then
|
||||
' CveCuenta = CveCuentaRetISR
|
||||
' Else
|
||||
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' End If
|
||||
'Case 243 'Ret ISR x Acreditar Terceros y Arrendamiento
|
||||
' If gvr.DataKey("CveRetISRConcepto").ToEntero = 2 Then
|
||||
@@ -1635,16 +1571,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' 'Conta SIG
|
||||
' If CveCuentaRetISR <> 0 Then
|
||||
' CveCuenta = CveCuentaRetISR
|
||||
' Else
|
||||
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' End If
|
||||
'Case 244 'Ret ISR Acreditable Terceros y Arrendamiento
|
||||
' If gvr.DataKey("CveRetISRConcepto").ToEntero = 2 Then
|
||||
@@ -1680,15 +1607,6 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' 'Conta SIG
|
||||
' If CveCuentaRetISR <> 0 Then
|
||||
' CveCuenta = CveCuentaRetISR
|
||||
' Else
|
||||
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
Case 14 'Iva X Acreditar
|
||||
@@ -1746,83 +1664,21 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
Dim IdCtaIVAXAcreditar As Integer = 0
|
||||
Dim IdCtaIVAAcreditable As Integer = 0
|
||||
|
||||
If gvr.DataKey("EsImportacion").ToString.contiene("1", "True") Then
|
||||
ConceptoContable = 287
|
||||
End If
|
||||
|
||||
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
|
||||
IdCtaIVAXAcreditar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
|
||||
IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
|
||||
End If
|
||||
IdCtaContable = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0)
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIVAxAcreditarSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
Case 287 'Iva X Acreditar Importacion
|
||||
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
||||
'funcionalidad que toma el 100% del pago para acreditamiento de iva
|
||||
|
||||
If TotalImporte = gvr.DataKey("Saldo").ToDecimal Then
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
importeMX = Math.Round(importeMX, 2)
|
||||
|
||||
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
Else
|
||||
ImporteMovimiento = 0
|
||||
importeMX = 0
|
||||
End If
|
||||
Else
|
||||
ImporteMovimiento = gvr.DataKey("IVAPorPagar").ToDecimal * PorcentajePago
|
||||
|
||||
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||
|
||||
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
End If
|
||||
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
|
||||
PorcentajeImpuesto = gvr.DataKey("PorcentajeIVA").ToDecimal
|
||||
Dim IdCtaIVAXAcreditar As Integer = 0
|
||||
Dim IdCtaIVAAcreditable As Integer = 0
|
||||
|
||||
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
|
||||
IdCtaIVAXAcreditar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
|
||||
IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
|
||||
End If
|
||||
IdCtaContable = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0)
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
Case 19 'Iva Acreditado
|
||||
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
||||
@@ -1852,7 +1708,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
importeMX = 0
|
||||
End If
|
||||
Else
|
||||
ImporteMovimiento = gvr.DataKey("IVAPorPagar").ToDecimal * PorcentajePago
|
||||
ImporteMovimiento = gvr.DataKey("IVAPorPagarDeducible").ToDecimal * PorcentajePago
|
||||
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
importeMX = ImporteMovimiento
|
||||
@@ -1873,7 +1729,9 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
End If
|
||||
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
|
||||
|
||||
If gvr.DataKey("EsImportacion").ToString.contiene("1", "True") Then
|
||||
ConceptoContable = 288
|
||||
End If
|
||||
|
||||
PorcentajeImpuesto = gvr.DataKey("PorcentajeIVA").ToDecimal
|
||||
Dim IdCtaIVAXAcreditar As Integer = 0
|
||||
@@ -1892,100 +1750,20 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
Dim ImporteNOIVA As Decimal = gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal * PorcentajePago
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, FechaMovimiento, IdCtaContableNoIVA, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=ImporteNOIVA, ImporteME:=If(TipoCambioPago = 1, 0, ImporteMovimiento), CveCuenta:=CveCuenta, TipoCambio:=TipoCambioGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, FechaMovimiento, IdCtaContableNoIVA, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=ImporteNOIVA, ImporteME:=If(TipoCambioPago = 1, 0, ImporteMovimiento), TipoCambio:=TipoCambioGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditableSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
Case 288 'Iva Acreditado
|
||||
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
||||
'funcionalidad que toma el 100% del pago para acreditamiento de iva
|
||||
If TotalImporte = gvr.DataKey("Saldo").ToDecimal Then
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
||||
importeMX = gvr.DataKey("IVADeducible").ToDecimal * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||
|
||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
Else
|
||||
ImporteMovimiento = 0
|
||||
importeMX = 0
|
||||
End If
|
||||
Else
|
||||
ImporteMovimiento = gvr.DataKey("IVAPorPagar").ToDecimal * PorcentajePago
|
||||
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||
|
||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
End If
|
||||
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
|
||||
|
||||
|
||||
PorcentajeImpuesto = gvr.DataKey("PorcentajeIVA").ToDecimal
|
||||
Dim IdCtaIVAXAcreditar As Integer = 0
|
||||
Dim IdCtaIVAAcreditable As Integer = 0
|
||||
Dim IdCtaContableNoIVA As Integer = 0
|
||||
|
||||
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
|
||||
IdCtaIVAXAcreditar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
|
||||
IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
|
||||
IdCtaContableNoIVA = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVANoAcreditable").ToString.ToEntero
|
||||
End If
|
||||
IdCtaContable = If(IdCtaIVAAcreditable > 0, IdCtaIVAAcreditable, 0)
|
||||
|
||||
'se registra el iva no acreditable
|
||||
If gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal > 0 Then
|
||||
|
||||
Dim ImporteNOIVA As Decimal = gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal * PorcentajePago
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, FechaMovimiento, IdCtaContableNoIVA, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=ImporteNOIVA, ImporteME:=If(TipoCambioPago = 1, 0, ImporteMovimiento), CveCuenta:=CveCuenta, TipoCambio:=TipoCambioGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
Case 25 'IEPS X Acreditar
|
||||
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||
ImporteMovimiento = gvr.DataKey("IEPSPorPagar").ToDecimal * PorcentajePago
|
||||
@@ -2005,10 +1783,9 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
TipoCambioGeneral = tipoCambioCompra
|
||||
|
||||
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditarSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
Case 26 'IEPS Acreditable
|
||||
@@ -2029,17 +1806,15 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditableSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
Case 64 'Ganancia
|
||||
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
|
||||
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
|
||||
'tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
|
||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
|
||||
@@ -2078,7 +1853,6 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
'Dim IEPS As Decimal = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago) 'If(TotalImporte = gvr.DataKey("Saldo").ToDecimal, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
||||
|
||||
'IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
||||
'CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
|
||||
'Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompraValuacion)
|
||||
'TipoCambioGeneral = TCImpuestos
|
||||
'''' si tiene funcionalidad de flucturación con ivas, tomar tipocambioCompra
|
||||
@@ -2098,7 +1872,6 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
|
||||
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
||||
'tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
|
||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
|
||||
@@ -2119,7 +1892,6 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
'Dim IEPS As Decimal = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago) 'If(TotalImporte = gvr.DataKey("Saldo").ToDecimal, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
||||
|
||||
'IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
||||
'CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
||||
'Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompraValuacion)
|
||||
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioCompra
|
||||
'If TipoCambioPago > tipoCambioCompra AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
@@ -2171,10 +1943,8 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ObjCreditos.GetTarjetasCreditos(DdlCuenta.SelectedValue.ToEntero, DdlTarjeta.SelectedValue.ToEntero)
|
||||
If ObjCreditos.DtResultados.Rows.Count > 0 AndAlso (ObjCreditos.DtResultados.Rows(0)("IdCtaContableTarjeta").ToString.ToEntero > 0 Or ObjCreditos.DtResultados.Rows(0)("IdCtaContableTarjetaSIG").ToString.ToEntero > 0) Then
|
||||
IdCtaContable = ObjCreditos.DtResultados.Rows(0)("IdCtaContableTarjeta").ToString.ToEntero
|
||||
CveCuenta = ObjCreditos.DtResultados.Rows(0)("IdCtaContableTarjetaSIG").ToString.ToEntero
|
||||
Else
|
||||
IdCtaContable = IdCuenta
|
||||
CveCuenta = CveCuentaB
|
||||
End If
|
||||
|
||||
ImporteMovimiento = TxtImporte.Text.ToDecimal
|
||||
@@ -2209,13 +1979,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If CveCuenta = 0 Then
|
||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimeroValor("ConceptoContable", String.Format("CveConceptoContable = {0}", ConceptoContable)))
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, CveSubProyecto:=CveSubProyecto, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=importeMX, ImporteME:=If(TipoCambioPago = 1, 0, ImporteMovimiento), CveCuenta:=CveCuenta, TipoCambio:=TipoCambioGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, CveSubProyecto:=CveSubProyecto, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=importeMX, ImporteME:=If(TipoCambioPago = 1, 0, ImporteMovimiento), TipoCambio:=TipoCambioGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
End If
|
||||
@@ -2656,10 +2420,12 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
'cuando es cheque
|
||||
If DdlTipoTransaccion.SelectedValue = "1" Then
|
||||
ChkAbonoCuenta.Visible = True
|
||||
|
||||
TxtPagueseA.Enabled = True
|
||||
|
||||
Else
|
||||
ChkAbonoCuenta.Visible = False
|
||||
TxtPagueseA.Enabled = False
|
||||
|
||||
End If
|
||||
|
||||
If DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(9, 17) Then
|
||||
@@ -3407,7 +3173,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
Dim IVA As Decimal = PorcentajePago * gr.DataKey("IVA").ToDecimal
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, gr.DataKey("SerieFolio").ToString, 14, ConceptoPartida, Now, IdCtaContable:=IdCtaIVAXAcreditar, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, IVA, IVA * If(FuncionalidadFluctuacionImpuestos, TCPago, TCCompra)), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, gr.DataKey("SerieFolio").ToString, 14, ConceptoPartida, Now, IdCtaContable:=IdCtaIVAXAcreditar, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, IVA, IVA * If(FuncionalidadFluctuacionImpuestos, TCPago, TCCompra)), PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
|
||||
@@ -3449,11 +3215,11 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
|
||||
If TCCompra > TCPago Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCCompra, TipoCambioPago:=TCPago) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCCompra, TipoCambioPago:=TCPago) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
Else
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCCompra, TipoCambioPago:=TCPago) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCCompra, TipoCambioPago:=TCPago) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -748,7 +748,7 @@
|
||||
<div class="btn-group">
|
||||
<asp:UpdatePanel ID="UpAddCotizacion" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:HyperLink ID="HplAgregarCotizacion" Visible="true" Target="_blank" runat="server" data-toggle="tooltip" title="Agregar Cotizacion" class="btn btn-circle btn-sm btn-default"><i class="fa fa-plus"></i></asp:HyperLink>
|
||||
<asp:HyperLink ID="HplAgregarCotizacion" Visible="true" Target="_blank" runat="server" data-toggle="tooltip" title="Agregar Cotización" class="btn btn-circle btn-sm btn-default"><i class="fa fa-plus"></i></asp:HyperLink>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
@@ -2207,7 +2207,7 @@
|
||||
<ItemTemplate>
|
||||
<%--<asp:Label runat="server" ID="LbCveAF" Text='<%# Eval("CodAF")%>'></asp:Label>--%>
|
||||
<asp:TextBox ID="LblCodigo" Text='<%# Eval("CodAF")%>' runat="server" Width="100px"></asp:TextBox>
|
||||
|
||||
<asp:Label runat="server" ID="LblValido" Style="display: none" Text="<i class='fa fa-check' style='color:green'></i>"></asp:Label>
|
||||
<asp:HyperLink runat="server" ID="HLBuscarAF"><i class="fa fa-search" aria-hidden="true"></i></asp:HyperLink>
|
||||
|
||||
<asp:HiddenField runat="server" ID="HdnCveConcepto" Value='<%# Eval("CveConcepto")%>' />
|
||||
@@ -6042,6 +6042,7 @@
|
||||
}
|
||||
|
||||
$get("BtnLimpiaAF").click();
|
||||
// $get("BtnVinculaAFEdit").click();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1358,7 +1358,7 @@ Partial Class Compras_Compras
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(128) = "1" And Not UsuarioActual.TienePermisoProceso(213) Then
|
||||
If TmpDT.MAX("CvePS").ToEntero > 0 Then
|
||||
BtnGuardar.Enabled = False
|
||||
'BtnGuardar.Enabled = False
|
||||
RegistraScript("$('#ImgBtnBuscarOC').click()")
|
||||
End If
|
||||
End If
|
||||
@@ -2120,6 +2120,10 @@ Partial Class Compras_Compras
|
||||
TxtSerie.Enabled = True
|
||||
End If
|
||||
|
||||
If LblMetodoPago.Text = "" Then
|
||||
Alert("El xml no contiene la etiqueta 'método de pago', favor de verificar la emisión con el proveedor.", TipoMensaje.MsgAdvertencia)
|
||||
BtnGuardar.Visible = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -4083,9 +4087,15 @@ Partial Class Compras_Compras
|
||||
|
||||
'Verifica funcionalidad 128 "Require orden de compra para factura de compra"
|
||||
|
||||
Dim EsViatico As Boolean = False
|
||||
|
||||
If RBLPago.SelectedValue.ToEntero = 3 AndAlso RBLContado.SelectedValue.ToEntero = 2 AndAlso TxtNumeroReembolso.Text.Length > 0 AndAlso DdlPersonalReembolso.SelectedValue.ToEntero > 0 Then
|
||||
EsViatico = True
|
||||
End If
|
||||
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(128) = "1" And Not UsuarioActual.TienePermisoProceso(213) Then
|
||||
If Not EstaAsociadoACajaChica And Not EstaAsociadoAPersonal Then
|
||||
If Not EstaAsociadoACajaChica And Not EstaAsociadoAPersonal And Not EsViatico Then
|
||||
If Not CompraEstaVinculadaOC Then
|
||||
Alert("Debe de vincular una orden de compra para registrar la factura")
|
||||
Exit Sub
|
||||
@@ -6564,7 +6574,7 @@ Partial Class Compras_Compras
|
||||
|
||||
If Not CveCompraRefacturacion > 0 OrElse (ChkRefacNC.Checked) Then
|
||||
'AF TipoAF 2 Es para las compras
|
||||
DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) = 2 And ISNULL(AplicaCostoIndirecto,0) <> 1")
|
||||
DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) = 2 And ISNULL(AplicaCostoIndirecto,0) <> 1 ")
|
||||
If DT.Rows.Count > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
||||
For Each Row2 As DataRow In DT.Rows
|
||||
importeMovimiento = If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, Row2("ImporteSinImpuestos").ToString.ToDecimal, Row2("Total").ToString.ToDecimal)
|
||||
@@ -10580,7 +10590,6 @@ Partial Class Compras_Compras
|
||||
If ObjConta.GetRetCuenta(49, Row2("CveActivoFijo").ToString.ToEntero) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContActivoFijo").ToString.ToEntero
|
||||
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCtaContActivoFijoSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -10620,7 +10629,6 @@ Partial Class Compras_Compras
|
||||
If ObjConta.GetRetCuenta(68, GvInv.HeaderRow.FCDropDownList("ddlAlmacen").SelectedValue.ToString.ToEntero) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
If importeMovimiento <> 0 Then
|
||||
@@ -10703,7 +10711,7 @@ Partial Class Compras_Compras
|
||||
DtAlmacenes.Dispose()
|
||||
|
||||
'QUITA 1-[MERCANCIA RECIBIDA POR ADELANTADO (OC) | MERCANCIA PENDIENTE POR RECIBIR (COMPRA)] 2-[NC CON PRODUCTOS]
|
||||
If UsuarioActual.CveEmpresa.Contiene(119) And UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen > 0 Then
|
||||
If UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen > 0 Then
|
||||
DT = DT.FiltraParametros("CveTipoPS <> 2")
|
||||
End If
|
||||
|
||||
@@ -10730,10 +10738,8 @@ Partial Class Compras_Compras
|
||||
If ObjConta.GetRetCuenta(6, Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 AndAlso ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero
|
||||
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaGastoSIG").ToString.ToEntero
|
||||
Else
|
||||
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero
|
||||
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -11170,7 +11176,7 @@ Partial Class Compras_Compras
|
||||
|
||||
'SI UM NO ESTA REGISTRADA
|
||||
If e.Row.DBCampo("CveUM").ToString.ToEntero <= 0 Then
|
||||
e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("onclick", $"FncUMEquivalencias(1,'{e.Row.DBCampo("UM").Replace("'", "")}',{e.Row.RowIndex},'{DtEquivalencias.FiltroPrimeroValor("UnidadMedida", "UnidadBase = 1")}','{e.Row.DBCampo("CveSATUnidadMedida")}','{e.Row.DBCampo("SATClaveUnidadMedida")}')")
|
||||
e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("onclick", $"FncUMEquivalencias(1,'{e.Row.DBCampo("UM").Replace("'", "")}',{e.Row.RowIndex},'{DtEquivalencias.FiltroPrimeroValor("UnidadMedida", "UnidadBase = 1")}','{e.Row.DBCampo("CveUnidadMedidaSAT")}','{e.Row.DBCampo("SATClaveUnidadMedida")}')")
|
||||
e.Row.FCLabel("LtlUnidadMedida").CssClass = "label label-danger manita centrarUM"
|
||||
e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("data-toggle", "tooltip")
|
||||
e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("title", "Unidad de medida SIN registrar")
|
||||
@@ -11191,7 +11197,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
Else
|
||||
'SIN EQUIVALENCIA
|
||||
e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("onclick", $"FncUMEquivalencias(3,'{e.Row.DBCampo("UM").Replace("'", "")}',{e.Row.RowIndex},'{DtEquivalencias.FiltroPrimeroValor("UnidadMedida", "UnidadBase = 1")}','{e.Row.DBCampo("CveSATUnidadMedida")}','{e.Row.DBCampo("SATClaveUnidadMedida")}')")
|
||||
e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("onclick", $"FncUMEquivalencias(3,'{e.Row.DBCampo("UM").Replace("'", "")}',{e.Row.RowIndex},'{DtEquivalencias.FiltroPrimeroValor("UnidadMedida", "UnidadBase = 1")}','{e.Row.DBCampo("CveUnidadMedidaSAT")}','{e.Row.DBCampo("SATClaveUnidadMedida")}')")
|
||||
e.Row.FCLabel("LtlUnidadMedida").CssClass = "label label-danger manita centrarUM"
|
||||
e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("data-toggle", "tooltip")
|
||||
e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("title", "Unidad de medida SIN equivalencia")
|
||||
@@ -11543,7 +11549,7 @@ Partial Class Compras_Compras
|
||||
'SAT
|
||||
TmpDT.Columns.Add("CveSATPS", GetType(Integer))
|
||||
TmpDT.Columns.Add("SATClaveProductoServicio", GetType(String))
|
||||
TmpDT.Columns.Add("CveSATUnidadMedida", GetType(Integer))
|
||||
TmpDT.Columns.Add("CveUnidadMedidaSAT", GetType(Integer))
|
||||
TmpDT.Columns.Add("SATClaveUnidadMedida", GetType(String))
|
||||
|
||||
'Tipo de Gasto
|
||||
@@ -11655,7 +11661,7 @@ Partial Class Compras_Compras
|
||||
'SAT
|
||||
TmpDTOriginal.Columns.Add("CveSATPS", GetType(Integer))
|
||||
TmpDTOriginal.Columns.Add("SATClaveProductoServicio", GetType(String))
|
||||
TmpDTOriginal.Columns.Add("CveSATUnidadMedida", GetType(Integer))
|
||||
TmpDTOriginal.Columns.Add("CveUnidadMedidaSAT", GetType(Integer))
|
||||
TmpDTOriginal.Columns.Add("SATClaveUnidadMedida", GetType(String))
|
||||
|
||||
'Tipo de Gasto
|
||||
@@ -12620,6 +12626,17 @@ Partial Class Compras_Compras
|
||||
|
||||
llenaDtsAF()
|
||||
CargaGVsAF()
|
||||
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
|
||||
If Row("CveActivoFijo").ToString.ToEntero = 0 Then
|
||||
Row("TipoAF") = DBNull.Value
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
TmpDT.AcceptChanges()
|
||||
|
||||
End Sub
|
||||
Protected Sub DivirInsumo(sender As Object, e As EventArgs)
|
||||
Dim index2 As Integer = 0
|
||||
@@ -12690,10 +12707,28 @@ Partial Class Compras_Compras
|
||||
GvAFInsumos.Rows(Index).FCHiddenField("HdnCveAF").Value = ObjAF.DtResultados.Rows(0)("CveActivoFijo").ToString
|
||||
GvAFInsumos.Rows(Index).FCHiddenField("HdnCodAF").Value = ObjAF.DtResultados.Rows(0)("Codigo").ToString
|
||||
RegistraScript(String.Format("MuestraCheckAF('{0}','');", GvAFInsumos.Rows(Index).FCLabel("LblValido").ClientID), "A2")
|
||||
|
||||
Try
|
||||
TmpDT.Rows(Index)("CveActivoFijo") = ObjAF.DtResultados.Rows(0)("CveActivoFijo").ToString
|
||||
TmpDT.AcceptChanges()
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
|
||||
ElseIf HdnTipoAF.Value.ToEntero = 2 Then
|
||||
GvAFCompras.Rows(Index).FCHiddenField("HdnCveAF").Value = ObjAF.DtResultados.Rows(0)("CveActivoFijo").ToString
|
||||
GvAFCompras.Rows(Index).FCHiddenField("HdnCodAF").Value = ObjAF.DtResultados.Rows(0)("Codigo").ToString
|
||||
RegistraScript(String.Format("MuestraCheckAF('{0}','');", GvAFCompras.Rows(Index).FCLabel("LblValido").ClientID), "A2")
|
||||
|
||||
Try
|
||||
TmpDT.Rows(Index)("CveActivoFijo") = ObjAF.DtResultados.Rows(0)("CveActivoFijo").ToString
|
||||
TmpDT.AcceptChanges()
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
|
||||
End If
|
||||
'COMENTADO IPP 15 JUNIO 2017
|
||||
'RegistraScript(String.Format("EnterAFEditOK('{0}','{1}');", ObjAF.DtResultados.Rows(0)("CveActivoFijo").ToString, ObjAF.DtResultados.Rows(0)("Codigo").ToString))
|
||||
@@ -12703,10 +12738,28 @@ Partial Class Compras_Compras
|
||||
GvAFInsumos.Rows(Index).FCHiddenField("HdnCveAF").Value = "-1"
|
||||
GvAFInsumos.Rows(Index).FCHiddenField("HdnCodAF").Value = "-1"
|
||||
RegistraScript(String.Format("MuestraCheckAF('{0}','none');", GvAFInsumos.Rows(Index).FCLabel("LblValido").ClientID), "A2")
|
||||
|
||||
|
||||
Try
|
||||
TmpDT.Rows(Index)("CveActivoFijo") = Nothing
|
||||
TmpDT.AcceptChanges()
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
|
||||
ElseIf HdnTipoAF.Value.ToEntero = 2 Then
|
||||
GvAFCompras.Rows(Index).FCHiddenField("HdnCveAF").Value = "-1"
|
||||
GvAFCompras.Rows(Index).FCHiddenField("HdnCodAF").Value = "-1"
|
||||
RegistraScript(String.Format("MuestraCheckAF('{0}','none');", GvAFCompras.Rows(Index).FCLabel("LblValido").ClientID), "A2")
|
||||
|
||||
Try
|
||||
TmpDT.Rows(Index)("CveActivoFijo") = Nothing
|
||||
TmpDT.AcceptChanges()
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
End If
|
||||
|
||||
Alert("No se encontró un Activo Fijo con el código proporcionado.", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
@@ -86,7 +86,6 @@ Partial Class Compras_RepComprasAFDetalle
|
||||
If Not IsPostBack Then
|
||||
CargaCombos()
|
||||
'ImgPersonalizar.Attributes.Add("onclick", "javascript:$('#DivPersonalizar').show(1000); PosicionaObjeto(this.id,'DivPersonalizar');")
|
||||
DdlPS.ddl.Visible = False
|
||||
|
||||
|
||||
|
||||
@@ -190,6 +189,17 @@ Partial Class Compras_RepComprasAFDetalle
|
||||
DdlActivoFijo.DataBind()
|
||||
DdlActivoFijo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
If DdlPS.UsaWebService Then
|
||||
DdlPS.ddlWS.Attributes.Add("data-Estatus", "-1")
|
||||
DdlPS.ddlWS.Attributes.Add("data-pagina", "Inventarios")
|
||||
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||
|
||||
'DdlClasificacion.AutoPostBack = False
|
||||
Else
|
||||
DdlPS.ddl.Items.Add(New ListItem("Seleccione", "-1"))
|
||||
DdlPS.ddl.Items.Add(New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2"))
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then
|
||||
DdlProyecto.Visible = False
|
||||
|
||||
@@ -17,6 +17,13 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server"><i class="fa fa-ad-excel"></i> Imprimir EXCEL</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPaqueteEgre" runat="server"><i class="fa fa-ad-pdf"></i> Paquete Egresos</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
@@ -133,7 +140,8 @@
|
||||
</div>
|
||||
|
||||
<div style="">
|
||||
<asp:GridView ID="Gv" runat="server" TShowHeader="true" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" GridLines="None" AutoGenerateColumns="false">
|
||||
<asp:GridView ID="Gv" runat="server" TShowHeader="true" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" GridLines="None"
|
||||
AutoGenerateColumns="false" DataKeyNames="CvePrePoliza, Folio, Id, TipoPol">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Fecha">
|
||||
<ItemTemplate>
|
||||
@@ -179,6 +187,13 @@
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkPoliza" runat="server"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos"></HeaderStyle>
|
||||
</asp:GridView>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports iTextSharp.text.pdf
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Contabilidad_FiltraPolizas
|
||||
@@ -13,6 +15,14 @@ Partial Class Contabilidad_FiltraPolizas
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Tick As String
|
||||
Get
|
||||
Return CType(ViewState("Tick"), String)
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Tick") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -215,5 +225,314 @@ Partial Class Contabilidad_FiltraPolizas
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub LnkPaqueteEgre_Click(sender As Object, e As EventArgs) Handles LnkPaqueteEgre.Click
|
||||
Dim filtro() As String = {"CveCompra", "CveIE", "CveConceptoContable"}
|
||||
Dim filtroComplemento() As String = {"CveIE"}
|
||||
Dim Pathpdf As New List(Of String)
|
||||
Dim pdfs = New List(Of Byte())
|
||||
Dim Path As String
|
||||
Dim ObjCompra As New ClsCompras
|
||||
Dim ObjIE As New ClsBancos()
|
||||
Dim pathPoliza As String = ""
|
||||
Dim TieneComprobante As String = ""
|
||||
Tick = DateTime.Now.Ticks.ToString
|
||||
Dim ObjContabilidad As New ClsContabilidad
|
||||
Dim CvePrePoliza As Integer
|
||||
Dim PolizasSinComprobante As String = "Polizas sin comprobante: <br/>"
|
||||
Dim SinComprobante As Boolean = False
|
||||
Dim contador As Integer = 0
|
||||
Try
|
||||
If Gv.Rows.Count > 0 Then
|
||||
|
||||
|
||||
For Each TempPolizas As GridViewRow In Gv.Rows
|
||||
If TempPolizas.FCCheckBox("ChkPoliza").Checked Then
|
||||
contador += 1
|
||||
CvePrePoliza = TempPolizas.DataKey("CvePrePoliza").ToString.ToEntero
|
||||
ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza)
|
||||
TieneComprobante = VerificarComprobante(ObjContabilidad.DtResultados)
|
||||
|
||||
If TieneComprobante = "" And Not SinComprobante Then
|
||||
|
||||
Path = ImprimirPolizaPDF(CvePrePoliza)
|
||||
pathPoliza = Path
|
||||
If File.Exists(Path) Then
|
||||
Pathpdf.Add(Path)
|
||||
End If
|
||||
Dim dt As DataTable = ObjContabilidad.DtResultados.FiltraParametros("", "", filtro)
|
||||
|
||||
For Each Row As DataRow In dt.Rows
|
||||
If Row("CveConceptoContable").ToString.ToEntero = 30 Then
|
||||
If Row("CveIE").ToString.ToEntero > 0 Then
|
||||
If ObjIE.GetBancosIE(Row("CveIE").ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
Path = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ObjIE.Comprobante.ToString)
|
||||
If File.Exists(Path) Then
|
||||
Dim formato As String = System.IO.Path.GetExtension(Path)
|
||||
If formato.ToLower.Contiene(".jpg", ".png", ".jpeg") Then
|
||||
Dim ComprobantePDF As String = String.Format("{0}\{1}\comprobante.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick)
|
||||
Using crea_archivo = New iTextSharp.text.Document(iTextSharp.text.PageSize.A4, 18, 18, 18, 18)
|
||||
PdfWriter.GetInstance(crea_archivo, New FileStream(ComprobantePDF, FileMode.Create))
|
||||
crea_archivo.Open()
|
||||
Dim image As iTextSharp.text.Image = iTextSharp.text.Image.GetInstance(Path)
|
||||
If image.Height > image.Width Then
|
||||
Dim percentage As Double = 0.0F
|
||||
percentage = 700 / image.Height
|
||||
image.ScalePercent(percentage * 100)
|
||||
Else
|
||||
Dim percentage As Double = 0.0F
|
||||
percentage = 540 / image.Width
|
||||
image.ScalePercent(percentage * 100)
|
||||
End If
|
||||
crea_archivo.Add(image)
|
||||
End Using
|
||||
Pathpdf.Add(ComprobantePDF)
|
||||
Else
|
||||
Pathpdf.Add(Path)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If Row("CveConceptoContable").ToString.ToEntero.Contiene(17, 309, 312, 308) Then
|
||||
If ObjCompra.GetCompras(Row("CveCompra").ToString.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjCompra.DtResultados IsNot Nothing AndAlso ObjCompra.DtResultados.Rows.Count > 0 Then
|
||||
Dim dr As DataRow = ObjCompra.DtResultados.Rows(0)
|
||||
Dim RFC As String = dr("RFC").ToString
|
||||
Dim CveFactura As String = dr("CveFactura").ToString
|
||||
Path = String.Format("{0}Compras\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, RFC, CveFactura)
|
||||
If File.Exists(Path) Then
|
||||
|
||||
Pathpdf.Add(Path)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
dt = ObjContabilidad.DtResultados.FiltraParametros("", "", filtroComplemento)
|
||||
For Each Row As DataRow In dt.Rows
|
||||
If ObjCompra.GetCompraComplementoPago(-1, UsuarioActual.CveEmpresa, Row("CveIE").ToString.ToEntero) Then
|
||||
If ObjCompra.DtResultados IsNot Nothing AndAlso ObjCompra.DtResultados.Rows.Count > 0 Then
|
||||
Dim dr As DataRow = ObjCompra.DtResultados.Rows(0)
|
||||
Dim RFC As String = dr("RFCde").ToString
|
||||
Dim CveFactura As String = dr("CveFactura").ToString
|
||||
Console.WriteLine(RFC & CveFactura)
|
||||
If CveFactura <> "" Then
|
||||
Path = String.Format("{0}Compras\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, RFC, CveFactura)
|
||||
Console.WriteLine(Path)
|
||||
If File.Exists(Path) Then
|
||||
Pathpdf.Add(Path)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
If TieneComprobante <> "" Then
|
||||
PolizasSinComprobante += String.Format("<a href='/Bancos/IE.aspx?CveIE={0}'>{1} {2}</a> <br/>", TieneComprobante, TempPolizas.DataKey("TipoPol").ToString, TempPolizas.DataKey("Folio").ToString)
|
||||
SinComprobante = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
If contador > 0 Then
|
||||
If SinComprobante Then
|
||||
Alert(PolizasSinComprobante, TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
MergePdfFiles(Pathpdf.ToArray)
|
||||
End If
|
||||
Else
|
||||
Alert("No hay polizas seleccionadas para imprimir", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("No hay informacion cargada", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
If File.Exists(pathPoliza) Then
|
||||
Directory.Delete(String.Format("{0}/{1}", AppDomain.CurrentDomain.BaseDirectory, Tick), True)
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
Alert("Error al descargar el paquete", TipoMensaje.MsgError)
|
||||
If File.Exists(pathPoliza) Then
|
||||
Directory.Delete(String.Format("{0}/{1}", AppDomain.CurrentDomain.BaseDirectory, Tick), True)
|
||||
End If
|
||||
End Try
|
||||
|
||||
ObjCompra.Dispose()
|
||||
ObjIE.Dispose()
|
||||
End Sub
|
||||
Private Function ImprimirPolizaPDF(CvePrePoliza As Integer) As String
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
'Dim ObjPoliza As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim params As New List(Of ReportParameter)
|
||||
Dim Bytes As Byte() = Nothing
|
||||
|
||||
|
||||
'If ObjPoliza.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjPoliza.DtResultados.Rows.Count > 0 Then
|
||||
If ObjConta.GetPrePolizasDetalle(CvePrePoliza) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
Dim dtVC As DataTable
|
||||
Dim dr As DataRow
|
||||
dtVC = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden")
|
||||
dr = dtVC.Rows(0)
|
||||
Dim ruta As String = ""
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("TipoPoliza", dr("TipoPoliza").ToString))
|
||||
params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||
params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||
'params.Add(New ReportParameter("Nombre", dr("Cuenta").ToString))
|
||||
'params.Add(New ReportParameter("Cuenta", dr("Codigo").ToString))
|
||||
params.Add(New ReportParameter("Numero", dr("FolioPoliza").ToString))
|
||||
params.Add(New ReportParameter("Moneda", ""))
|
||||
params.Add(New ReportParameter("CodigoPostal", ""))
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(dr("CveUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre")))
|
||||
End If
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
End If
|
||||
If Archivo.Exists Then
|
||||
ruta = UsuarioActual.Empresa.Ruta & "Formatos/Polizas.rdlc"
|
||||
Else
|
||||
ruta = "Empresas/Grales/Formatos/Polizas.rdlc"
|
||||
End If
|
||||
Bytes = StreamPDF(ruta, dtVC, params, "ppoliza")
|
||||
If Not File.Exists(String.Format("{0}{1}\{2}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, CvePrePoliza.ToString)) Then
|
||||
DirectoryExistsCreate(String.Format("{0}{1}", AppDomain.CurrentDomain.BaseDirectory, Tick))
|
||||
File.WriteAllBytes(String.Format("{0}\{1}\{2}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, CvePrePoliza.ToString), Bytes)
|
||||
End If
|
||||
End If
|
||||
Return String.Format("{0}\{1}\{2}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, CvePrePoliza.ToString)
|
||||
ObjConta.Dispose()
|
||||
|
||||
End Function
|
||||
Private Sub MergePdfFiles(ByVal pdfFiles() As String)
|
||||
Dim result As Boolean = False
|
||||
Dim pdfCount As Integer = 0
|
||||
Dim f As Integer = 0
|
||||
Dim fileName As String
|
||||
Dim reader As iTextSharp.text.pdf.PdfReader = Nothing
|
||||
Dim pageCount As Integer = 0
|
||||
Dim pdfDoc As iTextSharp.text.Document = Nothing
|
||||
Dim writer As PdfWriter = Nothing
|
||||
Dim cb As PdfContentByte = Nothing
|
||||
|
||||
Dim page As PdfImportedPage = Nothing
|
||||
Dim rotation As Integer = 0
|
||||
|
||||
|
||||
Try
|
||||
pdfCount = pdfFiles.Length
|
||||
If pdfCount > 0 Then
|
||||
fileName = pdfFiles(f)
|
||||
reader = New iTextSharp.text.pdf.PdfReader(fileName)
|
||||
pageCount = reader.NumberOfPages
|
||||
pdfDoc = New iTextSharp.text.Document(reader.GetPageSizeWithRotation(1), 18, 18, 18, 18)
|
||||
writer = PdfWriter.GetInstance(pdfDoc, New FileStream(String.Format("{0}\{1}\{2}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, "poliza"), FileMode.Create))
|
||||
|
||||
With pdfDoc
|
||||
.Open()
|
||||
End With
|
||||
cb = writer.DirectContent
|
||||
While f < pdfCount
|
||||
Dim i As Integer = 0
|
||||
While i < pageCount
|
||||
i += 1
|
||||
pdfDoc.SetPageSize(reader.GetPageSizeWithRotation(i))
|
||||
pdfDoc.NewPage()
|
||||
page = writer.GetImportedPage(reader, i)
|
||||
rotation = reader.GetPageRotation(i)
|
||||
If rotation = 90 Then
|
||||
cb.AddTemplate(page, 0, -1.0F, 1.0F, 0, 0, reader.GetPageSizeWithRotation(i).Height)
|
||||
ElseIf rotation = 270 Then
|
||||
cb.AddTemplate(page, 0, 1.0F, -1.0F, 0, reader.GetPageSizeWithRotation(i).Width + 60, -30)
|
||||
Else
|
||||
cb.AddTemplate(page, 1.0F, 0, 0, 1.0F, 0, 0)
|
||||
End If
|
||||
End While
|
||||
f += 1
|
||||
If f < pdfCount Then
|
||||
fileName = pdfFiles(f)
|
||||
reader = New iTextSharp.text.pdf.PdfReader(fileName)
|
||||
pageCount = reader.NumberOfPages
|
||||
End If
|
||||
End While
|
||||
|
||||
|
||||
pdfDoc.Close()
|
||||
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}\{1}\{2}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, "Poliza"))
|
||||
|
||||
If Archivo.Exists Then
|
||||
Response.Clear()
|
||||
Response.ContentType = Nothing
|
||||
Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name))
|
||||
Response.AddHeader("Content-Length", Archivo.Length.ToString())
|
||||
Response.TransmitFile(String.Format("{0}\{1}\{2}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, "Poliza"))
|
||||
Response.Flush() ' send it to the client to download
|
||||
HttpContext.Current.Response.SuppressContent = True
|
||||
HttpContext.Current.ApplicationInstance.CompleteRequest()
|
||||
|
||||
|
||||
End If
|
||||
result = True
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function VerificarComprobante(ByVal PrepolizaDetalle As DataTable) As String
|
||||
Dim filtro() As String = {"CveIE", "CveConceptoContable"}
|
||||
Dim Path As String
|
||||
Dim dt As DataTable = PrepolizaDetalle.FiltraParametros("", "", filtro)
|
||||
Dim ObjIE As New ClsBancos()
|
||||
Dim TieneComprobante As String = ""
|
||||
|
||||
For Each Row As DataRow In dt.FiltraParametros("CveConceptoContable = 30").Rows
|
||||
|
||||
If ObjIE.GetBancosIE(Row("CveIE").ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
Path = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ObjIE.Comprobante.ToString)
|
||||
If File.Exists(Path) Then
|
||||
TieneComprobante = ""
|
||||
Exit For
|
||||
Else
|
||||
TieneComprobante = Row("CveIE").ToString
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
TieneComprobante = Row("CveIE").ToString
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
ObjIE.Dispose()
|
||||
Return TieneComprobante
|
||||
|
||||
End Function
|
||||
|
||||
Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles Gv.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
'If e.Row.DataKey("Comprobante").ToString <> "" AndAlso e.Row.DataKey("Comprobante").ToString IsNot Nothing Then
|
||||
' e.Row.FCCheckBox("ChkPoliza").Enabled = True
|
||||
'Else
|
||||
' e.Row.FCCheckBox("ChkPoliza").ToolTip = "No se tiene cargado comprobante de pago"
|
||||
'End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePlantillaPolizaDetalle, TipoMovimiento, CveSubProyecto, CveProveedor, CvePersonal, CveConcepto, IdCtaContable, Orden,PorcentajeImpuesto" EmptyDataText="No se encontraron Plantilla de Pólizas Registradas" ToolTip="Listado de Plantilla de Pólizas" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePlantillaPolizaDetalle, TipoMovimiento, CveSubProyecto, CveProveedor, CvePersonal, CveConcepto, IdCtaContable, Orden,PorcentajeImpuesto, CveCuenta" EmptyDataText="No se encontraron Plantilla de Pólizas Registradas" ToolTip="Listado de Plantilla de Pólizas" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto Contable">
|
||||
<ItemTemplate>
|
||||
@@ -176,7 +176,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Cuenta Contable">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCtaContable" runat="server" Text='<%# Eval("NombreCuenta", "{0}") %>'>></asp:Literal>
|
||||
<asp:Literal ID="LtlCtaContable" runat="server" Text='<%# Eval("NombreCuenta") %>'>></asp:Literal>
|
||||
</ItemTemplate>
|
||||
|
||||
</asp:TemplateField>
|
||||
@@ -268,25 +268,24 @@
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label ID="LblCuenta" runat="server" Text=""></asp:Label>
|
||||
<asp:DropDownList ID="DdlCtaContable" CssClass="form-control input-sm select2me js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
|
||||
<label for="<%= DdlCtaContable.ClientID.ToString()%>">Cuenta Contable:</label>
|
||||
<asp:DropDownList ID="DdlCuentas" CssClass="form-control input-sm select2me js-cuenta-programmatic" runat="server" Visible="false" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
|
||||
<label for="<%= DdlCtaContable.ClientID.ToString()%>">Cuenta Contable:</label>
|
||||
<asp:DropDownList ID="DdlCuentas" CssClass="form-control input-sm select2me js-cuenta-programmatic" runat="server" Visible="false" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
|
||||
<label for="<%= DdlCtaContable.ClientID.ToString()%>">Cuenta Contable:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DDLSubProyecto" CssClass="form-control input-sm select2me js-subproyecto-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DDLSubProyecto" CssClass="form-control input-sm select2me js-subproyecto-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
|
||||
<label for="<%= DDLSubProyecto.ClientID.ToString()%>">SubProyecto:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DDLProveedor" CssClass="form-control input-sm select2me js-referencia-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DDLProveedor" CssClass="form-control input-sm select2me js-referencia-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
|
||||
<label ID="LblProveedor" runat="server" for="<%= DDLProveedor.ClientID.ToString()%>">Razón Social:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtOrden" CssClass="form-control " runat="server" MaxLength="4" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="TxtOrden" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Orden''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtOrden.ClientID.ToString()%>">Orden:</label>
|
||||
<label for="<%= TxtOrden.ClientID.ToString()%>">Orden:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
@@ -141,7 +141,7 @@ Partial Class Contabilidad_PlantillasPolizasDetalle
|
||||
|
||||
DdlCtaContable.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilizacion = 2 Then
|
||||
If UsuarioActual.Empresa.TipoContabilizacion = 2 Or UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
Dim Conta As New ClsContabilidad
|
||||
Dim dtt As New DataTable
|
||||
|
||||
@@ -248,12 +248,13 @@ Partial Class Contabilidad_PlantillasPolizasDetalle
|
||||
Dim Row As DataRow
|
||||
Dim ErrorActualizar = False
|
||||
Dim ErrorDetalle = False
|
||||
|
||||
Dim Cuenta As Integer = -1
|
||||
|
||||
If HdnModalidad.Value = "I" Then
|
||||
If CvePlantillaPoliza > 0 Then
|
||||
If ObjPlantillaPolizaDetalle.AddConta_PlantillasPolizasDetalles(CvePlantillaPoliza, DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, TxtOrden.Text.Trim.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlPorcentajeImpuesto.SelectedValue.ToDecimal,
|
||||
CveCuenta:=DdlCuentas.SelectedValue.ToEntero) Then
|
||||
If ObjPlantillaPolizaDetalle.AddConta_PlantillasPolizasDetalles(CvePlantillaPoliza, DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedItem.ToEntero, TxtOrden.Text.Trim.ToEntero,
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
|
||||
DdlPorcentajeImpuesto.SelectedValue.ToDecimal, CveCuenta:=DdlCuentas.SelectedValue.ToEntero) Then
|
||||
TxtOrden.Text = ""
|
||||
If Not ChkSeguirAgregando.Checked Then
|
||||
updatatos()
|
||||
@@ -289,8 +290,9 @@ CveCuenta:=DdlCuentas.SelectedValue.ToEntero) Then
|
||||
Else
|
||||
If HdnID.Value.ToEntero <> -1 Then
|
||||
If CvePlantillaPoliza > 0 Then
|
||||
If ObjPlantillaPolizaDetalle.UpdateConta_PlantillasPolizasDetalle(DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, TxtOrden.Text.Trim.ToEntero,
|
||||
HdnID.Value.ToEntero, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlPorcentajeImpuesto.SelectedValue.ToDecimal) Then
|
||||
If ObjPlantillaPolizaDetalle.UpdateConta_PlantillasPolizasDetalle(DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedItem.ToEntero, TxtOrden.Text.Trim.ToEntero,
|
||||
HdnID.Value.ToEntero, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
|
||||
DdlPorcentajeImpuesto.SelectedValue.ToDecimal, CveCuenta:=DdlCuentas.SelectedValue.ToEntero) Then
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
updatatos()
|
||||
Else
|
||||
@@ -328,8 +330,11 @@ CveCuenta:=DdlCuentas.SelectedValue.ToEntero) Then
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim Cuenta As Integer = e.Row.DataKey("IdCtaContable").ToString.ToEntero
|
||||
e.Row.FCLiteral("LtlCtaContable").Text = DTCuentasContables.FiltroPrimeroValor("Nombre", $"Id = {Cuenta}")
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad <> 1 Then
|
||||
Dim Cuenta As Integer = e.Row.DataKey("IdCtaContable").ToString.ToEntero
|
||||
e.Row.FCLiteral("LtlCtaContable").Text = DTCuentasContables.FiltroPrimeroValor("Nombre", $"Id = {Cuenta}")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -438,6 +443,7 @@ CveCuenta:=DdlCuentas.SelectedValue.ToEntero) Then
|
||||
DdlConcepto.SelectedValueExist(GvRow.DataKey("CveConcepto"))
|
||||
DdlTipoMovimiento.SelectedValueExist(IIf(GvRow.DataKey("TipoMovimiento") = "Abono", 1, 0).ToString)
|
||||
DdlCtaContable.SelectedValueExist(GvRow.DataKey("IdCtaContable"))
|
||||
DdlCuentas.SelectedValueExist(GvRow.DataKey("CveCuenta"))
|
||||
DDLSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto"))
|
||||
TxtOrden.Text = GvRow.DataKey("Orden")
|
||||
LbAgregar.Text = "Actualizar"
|
||||
|
||||
@@ -80,6 +80,9 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkComprobante" runat="server" Visible="false" data-toggle="modal" data-target="#ModalUpload" Style="color: #686868;"><i class="fa fa-upload" style="color:#686868;"></i> Cargar Comprobante</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimirPoliza" runat="server" Visible="true" OnClick="LnkImprimirPoliza_Click" Style="color: #686868;"><i class="fa fa-print" style="color:#686868;"></i> Imprimir Poliza</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -202,7 +202,6 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
Tick = DateTime.Now.Ticks.ToString
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilizacion = 1 OrElse UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
Response.Redirect(Request.Url.PathAndQuery.Replace("RegPrePoliza", "RegPrePolizaS"))
|
||||
@@ -251,14 +250,16 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
GvConcepto.Columns(4).Visible = False
|
||||
GvMov.Columns(5).Visible = False
|
||||
End If
|
||||
LnkExcel.Visible = False
|
||||
LnkImprimirPoliza.Visible = True
|
||||
|
||||
If IfNull(Request("Conta"), "").ToString = "1" Then
|
||||
Contabilizar()
|
||||
End If
|
||||
Exit Sub
|
||||
LnkExcel.Visible = False
|
||||
Else
|
||||
LnkExcel.Visible = True
|
||||
LnkImprimirPoliza.Visible = False
|
||||
CreaDT()
|
||||
BtnEliminar.Visible = False
|
||||
|
||||
@@ -518,13 +519,13 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
'Asignamos los Subproyectos
|
||||
e.Row.FCDropDownList("DdlSubProyecto").DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
e.Row.FCDropDownList("DdlSubProyecto").DataBind()
|
||||
'e.Row.FCDropDownList("DdlSubProyecto").Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
e.Row.FCDropDownList("DdlSubProyecto").Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
e.Row.FCDropDownList("DdlSubProyecto").SelectedValueExist(e.Row.DataKey("CveSubProyecto"))
|
||||
|
||||
'Asignamos los Tipos de Gasto
|
||||
e.Row.FCDropDownList("DdlTipoGasto").DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
|
||||
e.Row.FCDropDownList("DdlTipoGasto").DataBind()
|
||||
'e.Row.FCDropDownList("DdlTipoGasto").Items.Insert(0, New ListItem("Sin Asignar", "-1"))
|
||||
e.Row.FCDropDownList("DdlTipoGasto").Items.Insert(0, New ListItem("Sin Asignar", "-1"))
|
||||
e.Row.FCDropDownList("DdlTipoGasto").SelectedValueExist(e.Row.DataKey("CveTipoGasto"))
|
||||
|
||||
'ASignamos las CuentasContables
|
||||
@@ -849,7 +850,10 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
dr("MultipleSubProyecto") = drt("MultipleSubProyecto")
|
||||
dr("PorcentajeImpuesto") = drt("PorcentajeImpuesto")
|
||||
dr("CveCuenta") = drt("CveCuenta")
|
||||
dr("FolioPoliza") = drt("FolioPoliza")
|
||||
If CvePrePoliza > 0 Then
|
||||
dr("FolioPoliza") = drt("FolioPoliza")
|
||||
End If
|
||||
|
||||
|
||||
DtMovimientos.Rows.Add(dr)
|
||||
|
||||
@@ -1775,6 +1779,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
Dim ObjIE As New ClsBancos()
|
||||
Dim pathPoliza As String = ""
|
||||
Dim TieneComprobante As Boolean
|
||||
Tick = DateTime.Now.Ticks.ToString
|
||||
|
||||
Try
|
||||
TieneComprobante = VerificarComprobante()
|
||||
@@ -1837,38 +1842,36 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
Next
|
||||
|
||||
|
||||
dt = DtMovimientos.FiltraParametros("", "", filtroComplemento)
|
||||
For Each Row As DataRow In dt.Rows
|
||||
|
||||
For Each Row As DataRow In dt.FiltraParametros("CveConceptoContable = 30").Rows
|
||||
If ObjCompra.GetCompraComplementoPago(-1, UsuarioActual.CveEmpresa, Row("CveIE").ToString.ToEntero) Then
|
||||
Console.WriteLine(Row("CveIE").ToString)
|
||||
If ObjCompra.DtResultados IsNot Nothing AndAlso ObjCompra.DtResultados.Rows.Count > 0 Then
|
||||
Dim dr As DataRow = ObjCompra.DtResultados.Rows(0)
|
||||
Dim RFC As String = dr("RFCde").ToString
|
||||
Dim CveFactura As String = dr("CveFactura").ToString
|
||||
Console.WriteLine(RFC & CveFactura)
|
||||
If CveFactura <> "" Then
|
||||
Path = String.Format("{0}Compras\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, RFC, CveFactura)
|
||||
Console.WriteLine(Path)
|
||||
If File.Exists(Path) Then
|
||||
Pathpdf.Add(Path)
|
||||
For Each RowComple As DataRow In ObjCompra.DtResultados.FiltraParametros("", "", {"RFCde", "CveFactura"}).Rows
|
||||
Dim RFC As String = RowComple.Item("RFCde").ToString
|
||||
Dim CveFactura As String = RowComple.Item("CveFactura").ToString
|
||||
If CveFactura <> "" Then
|
||||
Path = String.Format("{0}Compras\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, RFC, CveFactura)
|
||||
If File.Exists(Path) Then
|
||||
Pathpdf.Add(Path)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
MergePdfFiles(Pathpdf.ToArray)
|
||||
If File.Exists(pathPoliza) Then
|
||||
Directory.Delete(String.Format("{0}{1}", AppDomain.CurrentDomain.BaseDirectory, Tick), True)
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("No se tiene cargado comprobante de pago", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
|
||||
If File.Exists(pathPoliza) Then
|
||||
Directory.Delete(String.Format("{0}/{1}", AppDomain.CurrentDomain.BaseDirectory, Tick), True)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Alert("Error al descargar el paquete", TipoMensaje.MsgError)
|
||||
If File.Exists(pathPoliza) Then
|
||||
Directory.Delete(String.Format("{0}/{1}", AppDomain.CurrentDomain.BaseDirectory, Tick), True)
|
||||
End If
|
||||
End Try
|
||||
ObjCompra.Dispose()
|
||||
ObjIE.Dispose()
|
||||
@@ -1886,7 +1889,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
If ObjConta.GetPrePolizasDetalle(CvePrePoliza) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
Dim dtVC As DataTable
|
||||
Dim dr As DataRow
|
||||
dtVC = ObjConta.DtResultados
|
||||
dtVC = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden")
|
||||
dr = dtVC.Rows(0)
|
||||
Dim ruta As String = ""
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
@@ -1902,6 +1905,9 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(dr("CveUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre")))
|
||||
End If
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
End If
|
||||
If Archivo.Exists Then
|
||||
ruta = UsuarioActual.Empresa.Ruta & "Formatos/Polizas.rdlc"
|
||||
Else
|
||||
@@ -1988,6 +1994,9 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
|
||||
End If
|
||||
result = True
|
||||
If Directory.Exists(String.Format("{0}/{1}", AppDomain.CurrentDomain.BaseDirectory, Tick)) Then
|
||||
Directory.Delete(String.Format("{0}/{1}", AppDomain.CurrentDomain.BaseDirectory, Tick), True)
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
@@ -2182,6 +2191,8 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
Dim YaExiste As Boolean = False
|
||||
Dim CveConceptoContable As Integer = Row("CveConceptoContable").ToString.ToEntero
|
||||
Dim IdCtaContable As Integer = Row("IdCtaContable").ToString.ToEntero
|
||||
'sino viene el cveconcepto, busca por le nombre del concepto
|
||||
If CveConceptoContable = 0 Then CveConceptoContable = GlobalDTContaConceptosContables(-1).FiltroPrimeroValor("CveConceptoContable", String.Format("ConceptoContable = '{0}'", Row("ConceptoContable"))).ToEntero
|
||||
|
||||
If ObjConta.GetCuentas(-1, Cuenta.Replace("-", ""), 1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
@@ -2332,20 +2343,20 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
For Each Row As DataRow In dt.FiltraParametros("CveConceptoContable = 30").Rows
|
||||
|
||||
If ObjIE.GetBancosIE(Row("CveIE").ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
Path = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ObjIE.Comprobante.ToString)
|
||||
If File.Exists(Path) Then
|
||||
TieneComprobante = True
|
||||
Exit For
|
||||
Else
|
||||
TieneComprobante = False
|
||||
Exit For
|
||||
End If
|
||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
Path = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ObjIE.Comprobante.ToString)
|
||||
If File.Exists(Path) Then
|
||||
TieneComprobante = True
|
||||
Exit For
|
||||
Else
|
||||
TieneComprobante = False
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
TieneComprobante = False
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
ObjIE.Dispose()
|
||||
@@ -2353,5 +2364,53 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
|
||||
End Function
|
||||
|
||||
Protected Sub LnkImprimirPoliza_Click(sender As Object, e As EventArgs)
|
||||
ImprimirPolizaPDFRunTime(IdPoliza)
|
||||
End Sub
|
||||
Private Function ImprimirPolizaPDFRunTime(IdPoliza As Integer) As String
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
'Dim ObjPoliza As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim params As New List(Of ReportParameter)
|
||||
Dim Bytes As Byte() = Nothing
|
||||
|
||||
|
||||
'If ObjPoliza.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjPoliza.DtResultados.Rows.Count > 0 Then
|
||||
If ObjConta.GetPrePolizasDetalle(CvePrePoliza) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
Dim dtVC As DataTable
|
||||
Dim dr As DataRow
|
||||
dtVC = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden")
|
||||
dr = dtVC.Rows(0)
|
||||
Dim ruta As String = ""
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("TipoPoliza", dr("TipoPoliza").ToString))
|
||||
params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||
params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||
'params.Add(New ReportParameter("Nombre", dr("Cuenta").ToString))
|
||||
'params.Add(New ReportParameter("Cuenta", dr("Codigo").ToString))
|
||||
params.Add(New ReportParameter("Numero", dr("FolioPoliza").ToString))
|
||||
params.Add(New ReportParameter("Moneda", ""))
|
||||
params.Add(New ReportParameter("CodigoPostal", ""))
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(dr("CveUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre")))
|
||||
End If
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
End If
|
||||
If Archivo.Exists Then
|
||||
ruta = UsuarioActual.Empresa.Ruta & "Formatos/Polizas.rdlc"
|
||||
Else
|
||||
ruta = "Empresas/Grales/Formatos/Polizas.rdlc"
|
||||
End If
|
||||
ImprimirbytesPDF(StreamPDF(ruta, dtVC, params, "ppoliza"), String.Format("{0}-{1}", TipoPoliza, dr("FolioPoliza").ToString), "PDF", True)
|
||||
|
||||
End If
|
||||
Return String.Format("{0}\{1}\{2}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, IdPoliza.ToString)
|
||||
ObjConta.Dispose()
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -69,20 +69,20 @@
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server" Visible="true" data-target="#DivCargaExcel"><i class="far fa-file-excel" style="font-weight:bold;"></i> Cargar Excel</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server" Visible="true" data-target="#DivCargaExcel"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Cargar Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkComplementoPago" runat="server" Visible="false" OnClick="LnkComplementoPago_Click" Style="color: #686868;"><i class="fa fa-money" style="color:#686868;"></i> Crear Complemento de Pago</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimirPDF" runat="server" Visible="false" OnClick="LnkImprimirPDF_Click" Style="color: #686868;"><i class="fa fa-file-pdf-o" style="color:#686868;"></i> Imprimir Poliza</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkImprimirPDF" runat="server" Visible="true" OnClick="LnkImprimirPDF_Click" Style="color: #686868;"><i class="fa fa-file-pdf-o" style="color:#686868;"></i> Imprimir Poliza</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAddConcepto" runat="server" OnClick="LnkAddConcepto_Click" Visible="false"><i class="fa fa-plus" ></i> Agregar Concepto</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkAddConcepto" runat="server" OnClick="LnkAddConcepto_Click" Visible="true"><i class="fa fa-plus" ></i> Agregar Concepto</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -406,7 +406,6 @@
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:ImageButton Visible="false" ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" ImageUrl="/Imagenes/Btn_Delete.png" OnClientClick="javascript:return C();" />
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -454,7 +453,7 @@
|
||||
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
||||
|
||||
<asp:GridView ID="GvPrePoliza" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-advance table-hover mysmallbtn GvPrePoliza" GridLines="None"
|
||||
DataKeyNames="CvePrePolizaDetalle, CveConceptoContable, IdCtaContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal" Width="100%" >
|
||||
DataKeyNames="CvePrePolizaDetalle, CveConceptoContable, IdCtaContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal, CveCuenta" Width="100%" >
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Movimiento</HeaderTemplate>
|
||||
@@ -559,6 +558,13 @@
|
||||
<ItemStyle HorizontalAlign="Right" Width="20px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkModificado" Checked="false" Visible="false"/>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="0px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
@@ -720,7 +726,7 @@
|
||||
Cuenta:
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:DropDownList ID="DdlCtaContableE" runat="server" CssClass="form-control input-sm select2me" DataValueField="Id" DataTextField="CtaCodigo"></asp:DropDownList><br />
|
||||
<asp:DropDownList ID="DdlCtaContableE" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveCuenta" DataTextField="CtaCodigo"></asp:DropDownList><br />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
@@ -232,10 +232,13 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DivTG.Visible = False
|
||||
GvMov.Columns(5).Visible = False
|
||||
End If
|
||||
|
||||
Exit Sub
|
||||
Else
|
||||
CreaDT()
|
||||
BtnEliminar.Visible = False
|
||||
LnkExcel.Visible = True
|
||||
LnkImprimirPDF.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
@@ -467,7 +470,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
' row.FCTextBox("TxtAbono").Enabled = False
|
||||
'Next
|
||||
End If
|
||||
|
||||
LnkExcel.Visible = False
|
||||
LnkImprimirPDF.Visible = True
|
||||
Else
|
||||
Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia)
|
||||
BtnEliminar.Visible = False
|
||||
@@ -518,11 +522,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen"))
|
||||
If CveConceptoContable.Contiene(30, 204) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
|
||||
|
||||
If CveConceptoContable.Contiene(30) Then
|
||||
LnkImprimirPDF.Visible = True
|
||||
CveIE = e.Row.DBCampo("CveIE").ToString.ToEntero
|
||||
End If
|
||||
|
||||
'e.Row.FCHyperLink("HlReferencia").NavigateUrl = CveConceptoContable
|
||||
|
||||
End If
|
||||
@@ -740,7 +739,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
dr("CvePersonal") = drt("CvePersonal")
|
||||
dr("CveClasificacion") = -1
|
||||
dr("MultipleSubProyecto") = drt("MultipleSubProyecto")
|
||||
dr("FolioPoliza") = drt("FolioPoliza")
|
||||
'dr("FolioPoliza") = 0 'drt("FolioPoliza")
|
||||
|
||||
DtMovimientos.Rows.Add(dr)
|
||||
Next
|
||||
@@ -1001,24 +1000,26 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
For Each row As GridViewRow In GvPrePoliza.Rows
|
||||
If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then
|
||||
If Not ObjContabilidad.UpdatePrepolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCLiteral("TxtConcepto").Text, row.DataKey("CveSubProyecto").ToEntero,
|
||||
row.DataKey("IdCtaContable").ToEntero, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
|
||||
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
|
||||
CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero,
|
||||
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
If row.FCCheckBox("chkModificado").Checked Then
|
||||
If Not ObjContabilidad.UpdatePrepolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCLiteral("TxtConcepto").Text, row.DataKey("CveSubProyecto").ToEntero,
|
||||
row.DataKey("IdCtaContable").ToEntero, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
|
||||
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
|
||||
CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero,
|
||||
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePoliza, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
|
||||
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), row.DataKey("Referencia").ToString,
|
||||
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), row.DataKey("Referencia").ToString,
|
||||
row.DataKey("CveConceptoContable").ToEntero, row.FCLiteral("TxtConcepto").Text, Now,
|
||||
row.DataKey("IdCtaContable").ToEntero, 0, CveSubProyecto:=row.DataKey("CveSubProyecto").ToEntero,
|
||||
CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
|
||||
ImporteMX:=If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
|
||||
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveProveedor:=row.DataKey("CveProveedor").ToEntero,
|
||||
CveCompra:=row.DataKey("CveCompra").ToEntero, CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero,
|
||||
CvePersonal:=row.DataKey("CvePersonal").ToEntero) Then
|
||||
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveProveedor:=row.DataKey("CveProveedor").ToEntero,
|
||||
CveCompra:=row.DataKey("CveCompra").ToEntero, CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero,
|
||||
CvePersonal:=row.DataKey("CvePersonal").ToEntero) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -1069,7 +1070,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Dim Referencia As String = GvPrePoliza.Rows(IndiceGrid).FCLiteral("TxtRef").Text
|
||||
Dim CveSubProyecto As Integer = GvPrePoliza.Rows(IndiceGrid).DataKey("CveSubProyecto").ToString.ToEntero
|
||||
Dim CveTipoGasto As Integer = GvPrePoliza.Rows(IndiceGrid).DataKey("CveTipoGasto").ToString.ToEntero
|
||||
Dim IdCtaContable As Integer = GvPrePoliza.Rows(IndiceGrid).DataKey("IdCtaContable").ToString.ToEntero
|
||||
Dim CveCuenta As Integer = GvPrePoliza.Rows(IndiceGrid).DataKey("CveCuenta").ToString.ToEntero
|
||||
Dim Cargo As Double = GvPrePoliza.Rows(IndiceGrid).FCLiteral("TxtCargo").Text.ToDouble
|
||||
Dim Abono As Double = GvPrePoliza.Rows(IndiceGrid).FCLiteral("TxtAbono").Text.ToDouble
|
||||
|
||||
@@ -1096,7 +1097,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
CargaTipoGastoE()
|
||||
DdlTipoGastoE.SelectedValueExist(CveTipoGasto)
|
||||
CargaCtaContableE()
|
||||
DdlCtaContableE.SelectedValueExist(IdCtaContable)
|
||||
DdlCtaContableE.SelectedValueExist(CveCuenta)
|
||||
|
||||
If Cargo <> 0 Then
|
||||
TxtCargoE.Text = Cargo
|
||||
@@ -1365,7 +1366,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
GvPrePoliza.DataBind()
|
||||
UpPrePoliza.Update()
|
||||
End If
|
||||
GvPrePoliza.Columns(11).Visible = True
|
||||
|
||||
GvPrePoliza.Rows(IndiceGrid).FCCheckBox("chkModificado").Checked = True
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -1877,7 +1880,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
' Conexion As Odbc.OdbcConnection = Nothing
|
||||
Dim ErrorArchivo = False
|
||||
Dim ErrorExcel = False
|
||||
|
||||
DdlPlantilla.SelectedValue = DdlPlantilla2.SelectedValue
|
||||
dt = ReadExcelFile(Ruta + FileName, True)
|
||||
|
||||
|
||||
@@ -1919,87 +1922,71 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
If Not ErrorArchivo Then
|
||||
|
||||
DtMovimientos.Clear()
|
||||
|
||||
Dim ObjConta As New ClsContabilidad()
|
||||
ObjConta.IniciaTransacSQL()
|
||||
Try
|
||||
Dim TieneError As Boolean = False
|
||||
Dim ContadorUpdate As Integer = 0
|
||||
Dim ContadorError As Integer = 0
|
||||
Dim NombreCuenta As String = ""
|
||||
Dim CvePrePoliza As Integer = 0
|
||||
Dim Cuenta As String = ""
|
||||
Dim Reporte As New StringBuilder
|
||||
Dim TotalCargos As Integer = 0
|
||||
Dim TotalAbonos As Integer = 0
|
||||
|
||||
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Contabilidad/RegPrePolizaExcel", DdlPlantilla2.SelectedValue.ToEntero, TotalCargos, TotalAbonos, 1, TxtFecha.Text.ToDate, DdlPlantilla2.SelectedItem.Text.ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=DdlTipoPolizaAdd.SelectedValue.ToEntero)
|
||||
|
||||
|
||||
For Each Row As DataRow In dt.Rows
|
||||
NombreCuenta = Row("NombreCuenta").ToString
|
||||
Cuenta = Row("Cuenta").ToString
|
||||
|
||||
Dim Importe As Decimal = If(Row("Cargo").ToString.ToDecimal <> 0, Row("Cargo").ToString.ToDecimal, Row("Abono").ToString.ToDecimal)
|
||||
Dim Concepto As String = Row("Concepto").ToString
|
||||
Dim Referencia As String = Row("Referencia").ToString
|
||||
Dim IdCuenta As Integer = -1
|
||||
Dim NombreCuenta As String = Row("NombreCuenta").ToString
|
||||
Dim Cuenta As String = Row("Cuenta").ToString
|
||||
Dim ConceptoAdministrativo As String = Row("ConceptoAdministrativo").ToString
|
||||
|
||||
Dim CveSubProyecto As Integer = Row("CveSubProyecto").ToString.ToEntero
|
||||
Dim TipoMovto As Boolean = If(Row("Cargo").ToString.ToDecimal <> 0, False, True)
|
||||
Dim YaExiste As Boolean = False
|
||||
Dim CveConceptoContable As Integer = Row("CveConceptoContable").ToString.ToEntero
|
||||
Dim IdCtaContable As Integer = Row("IdCtaContable").ToString.ToEntero
|
||||
Dim CveClasificacion As Integer = -1
|
||||
'sino viene el cveconcepto, busca por le nombre del concepto
|
||||
If CveConceptoContable = 0 Then CveConceptoContable = GlobalDTContaConceptosContables(-1).FiltroPrimeroValor("CveConceptoContable", String.Format("ConceptoContable = '{0}'", Row("ConceptoAdministrativo"))).ToEntero
|
||||
|
||||
|
||||
If Importe <> 0 Then
|
||||
|
||||
If ObjConta.GetCuentas(-1, Cuenta.Replace("-", ""), 1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCuenta = ObjConta.DtResultados().FiltroPrimeroValor("CveCuenta").ToEntero
|
||||
'TipoCuenta = ObjConta.DtResultados().FiltroPrimeroValor("Tipo")
|
||||
Else
|
||||
Reporte.AppendLine($"{Cuenta} - {NombreCuenta} - {Importe} </br>")
|
||||
TieneError = True
|
||||
YaExiste = True
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
|
||||
If YaExiste = False Then
|
||||
If IdCuenta > 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, "", CveConceptoContable, Concepto, Now.ToDate, IdCtaContable, -1, ImporteMX:=Importe, CveSubProyecto:=CveSubProyecto, CveCuenta:=IdCuenta) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
IdCuenta = -2
|
||||
End If
|
||||
End If
|
||||
|
||||
If CveConceptoContable = 69 Then
|
||||
CveClasificacion = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", "").ToEntero
|
||||
End If
|
||||
|
||||
If CveSubProyecto = 0 Then CveSubProyecto = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", String.Format("SubProyecto = '{0}'", Row("SubProyecto"))).ToEntero
|
||||
|
||||
Dim dr As DataRow = DtMovimientos.NewRow
|
||||
Dim CodigoCuenta As String = ""
|
||||
|
||||
dr("IdCuenta") = IdCtaContable
|
||||
dr("CodigoCuenta") = Cuenta & "<br>" & NombreCuenta
|
||||
dr("Cuenta") = ConceptoAdministrativo
|
||||
dr("Referencia") = Row("Referencia").ToString
|
||||
dr("Concepto") = Row("Concepto").ToString
|
||||
dr("TipoMovto") = TipoMovto
|
||||
dr("EsComodin") = 0
|
||||
dr("CveConcepto") = CveConceptoContable
|
||||
dr("CveConceptoContable") = CveConceptoContable
|
||||
dr("ConceptoContable") = ""
|
||||
dr("Cargo") = Row("Cargo").ToString.ToDecimal
|
||||
dr("Abono") = Row("Abono").ToString.ToDecimal
|
||||
dr("Descripcion") = ""
|
||||
dr("CveSubProyecto") = CveSubProyecto
|
||||
dr("CveProveedor") = -1
|
||||
dr("CveCompra") = -1
|
||||
dr("CvePersonal") = -1
|
||||
dr("CveClasificacion") = CveClasificacion
|
||||
dr("CveCliente") = -1
|
||||
dr("CveVenta") = -1
|
||||
|
||||
TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDouble + TxtAbono.Text.ToDouble).ToString.FormatoNumero
|
||||
TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDouble + TxtCargo.Text.ToDouble).ToString.FormatoNumero
|
||||
DtMovimientos.Rows.Add(dr)
|
||||
DtMovimientos.AcceptChanges()
|
||||
Next
|
||||
If Not TieneError Then
|
||||
ObjConta.Commit()
|
||||
Alert(String.Format("<br/><br/>Prepóliza: <b><a href = ""/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CvePrePoliza, "Ver"))
|
||||
|
||||
Alert($"Se agregó la póliza {ObjConta.ContaFolio}")
|
||||
|
||||
Else
|
||||
Alert($"No encontraron las siguientes cuentas: {Reporte.ToString} ", TipoMensaje.MsgError)
|
||||
ObjConta.RollBack()
|
||||
End If
|
||||
|
||||
GvMov.DataSource = DtMovimientos
|
||||
GvMov.DataBind()
|
||||
UPMovs.Update()
|
||||
|
||||
Catch ex As Exception
|
||||
ObjConta.RollBack()
|
||||
Alert("No se pudo cargar el excel")
|
||||
End Try
|
||||
|
||||
ObjConta.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
@@ -2021,7 +2008,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If ObjConta.GetPrePolizasDetalle(CvePrePoliza) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
Dim dtVC As DataTable
|
||||
Dim dr As DataRow
|
||||
dtVC = ObjConta.DtResultados
|
||||
dtVC = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden")
|
||||
dr = dtVC.Rows(0)
|
||||
Dim ruta As String = ""
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
@@ -2037,6 +2024,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(dr("CveUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre")))
|
||||
End If
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
End If
|
||||
If Archivo.Exists Then
|
||||
ruta = UsuarioActual.Empresa.Ruta & "Formatos/Polizas.rdlc"
|
||||
Else
|
||||
|
||||
@@ -55,6 +55,9 @@
|
||||
Catálogo de Cuentas Contables
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimirExcel" runat="server" OnClick="LnkImprimirExcel_Click" Style="color: #686868;"><i class="fa fa-file-excel-o" style="color:#686868;"></i> Imprimir Cuentas</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="upcuentas" runat="server" UpdateMode="Conditional">
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Contabilidad2_CatCuentas
|
||||
Inherits ClsPaginas
|
||||
@@ -673,5 +674,19 @@ Partial Class Contabilidad2_CatCuentas
|
||||
End Select
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub LnkImprimirExcel_Click(sender As Object, e As EventArgs)
|
||||
Imprime("Excel")
|
||||
End Sub
|
||||
Private Sub Imprime(Formato As String)
|
||||
If DtDatos IsNot Nothing Then
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Cuentas.rdlc", DtDatos, params, "Cuentas", Formato)
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
@@ -116,6 +116,10 @@ Partial Class AC_RepEstadoActividades
|
||||
DdlEjercicio.Items.Add(New ListItem(Now.Year.ToString, Now.Year.ToString))
|
||||
End If
|
||||
DdlPeriodo.SelectedValue = Now.Month.ToString
|
||||
|
||||
DdlSubproyecto.datasource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
|
||||
DdlSubproyecto.databind
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
@@ -1680,8 +1680,8 @@ Partial Class Contratos_ContratoObra
|
||||
' e.Row.FCCheckBox("CHKPEstimacion").Checked = True
|
||||
End If
|
||||
If Autorizado Then
|
||||
e.Row.FCLinkButton("imgE").Visible = False
|
||||
e.Row.FCLinkButton("imgD").Visible = False
|
||||
' e.Row.FCLinkButton("imgE").Visible = False
|
||||
'e.Row.FCLinkButton("imgD").Visible = False
|
||||
End If
|
||||
If CveTipoContrato = 25 Then
|
||||
e.Row.Cells(1).Width = Unit.Pixel(10)
|
||||
@@ -2044,8 +2044,8 @@ Partial Class Contratos_ContratoObra
|
||||
' e.Row.FCCheckBox("CHKPEstimacion").Checked = True
|
||||
End If
|
||||
If Autorizado Then
|
||||
e.Row.FCLinkButton("imgE").Visible = False
|
||||
e.Row.FCLinkButton("imgD").Visible = False
|
||||
'e.Row.FCLinkButton("imgE").Visible = False
|
||||
'e.Row.FCLinkButton("imgD").Visible = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -499,16 +499,21 @@ Partial Class Contratos_FacturacionMasiva
|
||||
DtR("Cantidad") = row("CantidadContratada")
|
||||
DtR("CveUM") = row("CveUM")
|
||||
DtR("UM") = row("UM")
|
||||
|
||||
DtR("SATClaveUM") = row("SATClaveUM")
|
||||
DtR("CveClasificacion") = row("CveClasificacion")
|
||||
DtR("Clasificacion") = row("Clasificacion")
|
||||
DtR("CvePS") = row("CvePS")
|
||||
DtR("PS") = row("PS")
|
||||
DtR("CodigoPS") = row("CodigoPS")
|
||||
|
||||
DtR("SATClaveProdServ") = row("SATClaveProdServ")
|
||||
|
||||
DtR("NoIdentificacion") = row("NoIdentificacion")
|
||||
|
||||
DtR("CveTipoPS") = drPS("CveTipoPS")
|
||||
DtR("CveTipoInvPS") = drPS("Inv_CveMetodoInventario")
|
||||
|
||||
DtR("Obs") = TxtObservaciones.Text + " " + row("Observacion").ToString
|
||||
DtR("PU") = row("PU")
|
||||
DtR("IVA") = row("PorcentajeIVA")
|
||||
|
||||
@@ -335,6 +335,9 @@
|
||||
<asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox ID="ChkAnticipos" runat="server" Text="Incluye Anticipos" TextAlign="Left" Visible="false" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -105,6 +105,7 @@ Partial Class RepCxC
|
||||
CargaCombos()
|
||||
CargaGvPersonalizarRaqngoColumnas()
|
||||
CargaDatos()
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then ChkAnticipos.visible = True
|
||||
ActivaEnviarEstadoCuenta()
|
||||
If UsuarioActual.CveRol = 1 Or UsuarioActual.TienePermisoProceso(243) Then LnkDescargarSegmentos.Visible = True
|
||||
CreaDataTableColor()
|
||||
@@ -195,12 +196,14 @@ Partial Class RepCxC
|
||||
CveCobranzaEstatus = DdlCobranzaEstatus.SelectedValue.ToEntero
|
||||
CveClienteClasificacion = DdlClienteClasificacion.SelectedValue.ToEntero
|
||||
Dim CveCliente = If(DdlClientesWS.SelectedValue.ToEntero > 0, DdlClientesWS.SelectedValue.ToEntero, -1)
|
||||
Dim AplicaAnticipos As Integer = If(ChkAnticipos.checked, 1, 0)
|
||||
|
||||
|
||||
If ObjMovtos.GetCxC(FechaI, FechaF, CveCliente, DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, -1,
|
||||
"-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico,
|
||||
If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM), FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero,
|
||||
CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveCobranzaEstatus:=CveCobranzaEstatus, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero,
|
||||
TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then
|
||||
TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, AplicaAnticiposPagados:=AplicaAnticipos) Then
|
||||
|
||||
GvDatos.DataSource = ObjMovtos.DtResultados
|
||||
DtDatos = ObjMovtos.DtResultados
|
||||
|
||||
@@ -434,13 +434,14 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--<asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ControlStyle-Width ="85px" DataTextField="SerieFolio" />--%>
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<asp:BoundField HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Descuento" DataField="Descuento" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Amortizacion" DataField="Amortizacion" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="RetIVA" DataField="RetIVA" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="RetISR" DataField="RetISR" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Saldo" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Mon" DataField="Moneda"/>
|
||||
<asp:BoundField HeaderText="Sucursal Venta" DataField="SubProyecto" DataFormatString="{0}" />
|
||||
@@ -506,8 +507,7 @@
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFolio" runat="server" Text=" Folio" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSubTotal" runat="server" Text=" SubTotal" /></td>
|
||||
|
||||
<asp:CheckBox ID="ChkFecha" runat="server" Text=" Fecha" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSeEnvioMail" runat="server" Text=" Se envió Mail" /></td>
|
||||
<td style="text-align: left;">
|
||||
@@ -515,7 +515,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkDescuento" runat="server" Text=" Descuento" /></td>
|
||||
<asp:CheckBox ID="ChkSubTotal" runat="server" Text=" SubTotal" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChlMotivoDescuento" runat="server" Text=" Motivo Descuento" /></td>
|
||||
<td style="text-align: left;">
|
||||
@@ -525,9 +525,10 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkAmortizacion" runat="server" Text=" Amortización" /></td>
|
||||
<asp:CheckBox ID="ChkDescuento" runat="server" Text=" Descuento" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkIVA" runat="server" Text=" IVA" Checked="true" /></td>
|
||||
<asp:CheckBox ID="ChkVendedor" runat="server" Text=" Vendedor" Checked="false" /></td>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSucursalEjecucion" runat="server" Text=" Sucursal Ejecucion" /></td>
|
||||
<td style="text-align: left;">
|
||||
@@ -535,9 +536,9 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkRetIVA" runat="server" Text=" Ret. IVA" /></td>
|
||||
<asp:CheckBox ID="ChkAmortizacion" runat="server" Text=" Amortización" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkRetISR" runat="server" Text=" Ret. ISR" /></td>
|
||||
<asp:CheckBox ID="ChkSucursal" runat="server" Text=" Sucursal" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkTelefono" runat="server" Text=" Telefono" /></td>
|
||||
<td style="text-align: left;">
|
||||
@@ -545,9 +546,9 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkTotal" runat="server" Text=" Total" Checked="true" /></td>
|
||||
<asp:CheckBox ID="ChkIVA" runat="server" Text=" IVA" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFecha" runat="server" Text=" Fecha" Checked="true" /></td>
|
||||
<asp:CheckBox ID="ChkCodigo" runat="server" Text=" Código Cliente" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkLimiteCredito" runat="server" Text=" Limite Credito" /></td>
|
||||
<td style="text-align: left;">
|
||||
@@ -555,57 +556,57 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSucursal" runat="server" Text=" Sucursal" /></td>
|
||||
<asp:CheckBox ID="ChkRetIVA" runat="server" Text=" Ret. IVA" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkCliente" runat="server" Text=" Cliente" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkCodigo" runat="server" Text=" Código Cliente" Checked="true" /></td>
|
||||
<td>
|
||||
<asp:CheckBox ID="ChkIEPS" runat="server" Text=" IEPS" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkEstatusCliente" runat="server" Text=" Estatus Cliente" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkCliente" runat="server" Text=" Cliente" Checked="true" /></td>
|
||||
<asp:CheckBox ID="ChkRetISR" runat="server" Text=" Ret. ISR" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSucursalCliente" runat="server" Text=" Sucursal Cliente" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkEstatusCobranza" runat="server" Text=" Estatus Cobranza" />
|
||||
</td>
|
||||
<asp:CheckBox ID="ChkEstatusCobranza" runat="server" Text=" Estatus Cobranza" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkTurnoCobranza" runat="server" Text=" TurnoCobranza" />
|
||||
</td>
|
||||
<asp:CheckBox ID="ChkTurnoCobranza" runat="server" Text=" TurnoCobranza" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkVendedor" runat="server" Text=" Vendedor" Checked="false" /></td>
|
||||
<asp:CheckBox ID="ChkTotal" runat="server" Text=" Total" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkEstatusFactura" runat="server" Text=" Estatus de Factura" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkObsCobranza" runat="server" Text=" Observación Cobranza" />
|
||||
</td>
|
||||
<asp:CheckBox ID="ChkObsCobranza" runat="server" Text=" Observación Cobranza" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkCuentaContableReferencia" runat="server" Text=" CuentaContableReferencia" Visible="False" /></td>
|
||||
<td></td>
|
||||
<td style="text-align: left;">
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMotivoCancelacion" runat="server" Text=" Motivo Cancelacion" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSeTimbro" runat="server" Text=" Se Timbró" /></td>
|
||||
<td>
|
||||
<asp:CheckBox ID="ChkFechaCobranza" runat="server" Text=" Fecha Cobranza" Checked="true" /></td>
|
||||
<td> <asp:CheckBox ID="ChkDiasTranscurridos" runat="server" Text=" Días Transcurridos" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFechaCobranza" runat="server" Text=" Fecha Cobranza" Checked="true" /> </td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkDiasTranscurridos" runat="server" Text=" Días Transcurridos" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkHorario" runat="server" Text=" Horario" Checked="false" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkDiasPago" runat="server" Text=" Dias Pago" /></td>
|
||||
<td style="text-align: left;">
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFechaEjecucion" runat="server" Text=" Fecha Ejecución" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkTC" runat="server" Text=" Tipo Cambio" /></td>
|
||||
|
||||
|
||||
<td> <asp:CheckBox ID="ChkTC" runat="server" Text=" Tipo Cambio" /></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -534,47 +534,47 @@ Partial Class RepCxCDetalle
|
||||
End If
|
||||
|
||||
If ChkTotal.Checked Then
|
||||
GvDatos.Columns(9).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(9).Visible = False
|
||||
End If
|
||||
|
||||
If ChkSubTotal.Checked Then
|
||||
GvDatos.Columns(3).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(3).Visible = False
|
||||
End If
|
||||
|
||||
If ChkSubTotal.Checked Then
|
||||
GvDatos.Columns(4).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(4).Visible = False
|
||||
End If
|
||||
|
||||
If ChkIVA.Checked Then
|
||||
GvDatos.Columns(5).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(5).Visible = False
|
||||
End If
|
||||
|
||||
If ChkDescuento.Checked Then
|
||||
GvDatos.Columns(6).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(6).Visible = False
|
||||
End If
|
||||
|
||||
If ChkDescuento.Checked Then
|
||||
GvDatos.Columns(4).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(4).Visible = False
|
||||
End If
|
||||
|
||||
If ChkAmortizacion.Checked Then
|
||||
GvDatos.Columns(5).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(5).Visible = False
|
||||
End If
|
||||
|
||||
If ChkRetIVA.Checked Then
|
||||
GvDatos.Columns(7).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(7).Visible = False
|
||||
End If
|
||||
|
||||
If ChkRetIVA.Checked Then
|
||||
GvDatos.Columns(8).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(8).Visible = False
|
||||
End If
|
||||
|
||||
If ChkRetISR.Checked Then
|
||||
GvDatos.Columns(9).Visible = True
|
||||
SePersonalizo = 1
|
||||
|
||||
2255
Empresas/140/Formatos/Polizas.rdlc
Normal file
2255
Empresas/140/Formatos/Polizas.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1348,7 +1348,7 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>="<b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & " <b>Próxima Alineacion: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate)</Value>
|
||||
<Value>="<br/><b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & "<br/<b>Próxima Alineación: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate)</Value>
|
||||
<MarkupType>HTML</MarkupType>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
@@ -2333,7 +2333,7 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!OrdenCompra.Value</Value>
|
||||
<Value>=IIf(Parameters!OrdenCompra.Value = "-1", "", Parameters!OrdenCompra.Value)</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>9pt</FontSize>
|
||||
@@ -2357,7 +2357,7 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox32</rd:DefaultName>
|
||||
<Top>3.92322cm</Top>
|
||||
<Left>17.09066cm</Left>
|
||||
<Left>17.11694cm</Left>
|
||||
<Height>0.64028cm</Height>
|
||||
<Width>3.90165cm</Width>
|
||||
<ZIndex>19</ZIndex>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2180,7 +2180,7 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!OrdenCompra.Value</Value>
|
||||
<Value>=IIf(Parameters!OrdenCompra.Value = "-1", "", Parameters!OrdenCompra.Value)</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>9pt</FontSize>
|
||||
@@ -2858,7 +2858,7 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>="<b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & " <b>Próxima Alineacion: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate)</Value>
|
||||
<Value>="<br/><b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & "<br/<b>Próxima Alineacion: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate)</Value>
|
||||
<MarkupType>HTML</MarkupType>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
@@ -2939,6 +2939,97 @@
|
||||
<PrintOnFirstPage>true</PrintOnFirstPage>
|
||||
<PrintOnLastPage>true</PrintOnLastPage>
|
||||
<ReportItems>
|
||||
<Textbox Name="Textbox74">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Fecha Impresión:</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value xml:space="preserve"> </Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Globals!ExecutionTime</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<Format>g</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox8</rd:DefaultName>
|
||||
<Top>0.00882cm</Top>
|
||||
<Left>0.12568cm</Left>
|
||||
<Height>0.46771cm</Height>
|
||||
<Width>6.86562cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox75">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Usuario Imprimio:</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value xml:space="preserve"> </Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!UsuarioImprimio.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<Format>g</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox8</rd:DefaultName>
|
||||
<Top>0.01927cm</Top>
|
||||
<Left>9.07541cm</Left>
|
||||
<Height>0.46771cm</Height>
|
||||
<Width>6.86562cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox48">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
@@ -2960,55 +3051,11 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox35</rd:DefaultName>
|
||||
<Top>0.01763cm</Top>
|
||||
<Left>18.52109cm</Left>
|
||||
<Top>0.00882cm</Top>
|
||||
<Left>18.54098cm</Left>
|
||||
<Height>0.50624cm</Height>
|
||||
<Width>2.5cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox74">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Fecha Impresión:</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value xml:space="preserve"> </Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Today</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox8</rd:DefaultName>
|
||||
<Top>0.01763cm</Top>
|
||||
<Left>0.1715cm</Left>
|
||||
<Height>0.46771cm</Height>
|
||||
<Width>6.86562cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
|
||||
@@ -3344,7 +3344,7 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>="<b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & " <b>Próxima Alineacion: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate)</Value>
|
||||
<Value>="<br/><b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & "<br/<b>Próxima Alineación: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate)</Value>
|
||||
<MarkupType>HTML</MarkupType>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
|
||||
@@ -3344,7 +3344,7 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>="<b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & " <b>Próxima Alineacion: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate)</Value>
|
||||
<Value>="<br/><b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & "<br/<b>Próxima Alineación: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate)</Value>
|
||||
<MarkupType>HTML</MarkupType>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
|
||||
@@ -3344,7 +3344,7 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>="<b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & " <b>Próxima Alineacion: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate)</Value>
|
||||
<Value>="<br/><b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & "<br/<b>Próxima Alineación: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate)</Value>
|
||||
<MarkupType>HTML</MarkupType>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
|
||||
@@ -3344,7 +3344,7 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>="<b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & " <b>Próxima Alineacion: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate)</Value>
|
||||
<Value>="<br/><b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & "<br/<b>Próxima Alineación: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate)</Value>
|
||||
<MarkupType>HTML</MarkupType>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
|
||||
@@ -3344,7 +3344,7 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>="<b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & " <b>Próxima Alineacion: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate)</Value>
|
||||
<Value>="<br/><b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & "<br/<b>Próxima Alineación: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate)</Value>
|
||||
<MarkupType>HTML</MarkupType>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
1024
Empresas/Grales/Formatos/Cuentas.rdlc
Normal file
1024
Empresas/Grales/Formatos/Cuentas.rdlc
Normal file
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
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
||||
<AutoRefresh>0</AutoRefresh>
|
||||
<DataSources>
|
||||
<DataSource Name="DataSet">
|
||||
@@ -37,6 +37,10 @@
|
||||
<DataField>SerieLote</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Serie">
|
||||
<DataField>Serie</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="FolioSalida">
|
||||
<DataField>FolioSalida</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
@@ -86,16 +90,19 @@
|
||||
<Width>1.69333cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.74675cm</Width>
|
||||
<Width>1.16467cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.51446cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>3.74919cm</Width>
|
||||
<Width>3.37414cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>6.22158cm</Width>
|
||||
<Width>5.82471cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.53921cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.57859cm</Width>
|
||||
@@ -235,7 +242,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Disponible</Value>
|
||||
<Value>Disp.</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
@@ -450,6 +457,62 @@
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox13">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Serie </Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox13</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<TopBorder>
|
||||
<Color>Black</Color>
|
||||
<Style>Solid</Style>
|
||||
<Width>1pt</Width>
|
||||
</TopBorder>
|
||||
<BottomBorder>
|
||||
<Color>Black</Color>
|
||||
<Style>Solid</Style>
|
||||
<Width>1pt</Width>
|
||||
</BottomBorder>
|
||||
<LeftBorder>
|
||||
<Color>Black</Color>
|
||||
<Style>Solid</Style>
|
||||
<Width>1pt</Width>
|
||||
</LeftBorder>
|
||||
<RightBorder>
|
||||
<Color>Black</Color>
|
||||
<Style>Solid</Style>
|
||||
<Width>1pt</Width>
|
||||
</RightBorder>
|
||||
<BackgroundColor>Silver</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox4">
|
||||
@@ -747,7 +810,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
@@ -888,6 +950,41 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Serie">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Serie.Value</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>=IIf(Fields!PS.Value = "", "Bold", "Default")</FontWeight>
|
||||
<Color>=IIf(Fields!PS.Value = "", "White", "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Serie</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=IIf(Fields!PS.Value = "", "#9cacc1", "NoColor")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
@@ -1050,6 +1147,7 @@
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
</TablixMembers>
|
||||
</TablixColumnHierarchy>
|
||||
<TablixRowHierarchy>
|
||||
@@ -1069,7 +1167,7 @@
|
||||
<DataSetName>DataSet1</DataSetName>
|
||||
<Top>0.17639cm</Top>
|
||||
<Height>1.0148cm</Height>
|
||||
<Width>24.37731cm</Width>
|
||||
<Width>24.56252cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -1080,7 +1178,7 @@
|
||||
<Height>0.67394in</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>9.69372in</Width>
|
||||
<Width>9.67028in</Width>
|
||||
<Page>
|
||||
<PageHeader>
|
||||
<Height>3.48078cm</Height>
|
||||
@@ -1108,7 +1206,7 @@
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>0.47625cm</Top>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>24.62205cm</Width>
|
||||
<Width>24.56252cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -1155,7 +1253,7 @@
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>1.07625cm</Top>
|
||||
<Height>0.52945cm</Height>
|
||||
<Width>24.62205cm</Width>
|
||||
<Width>24.56252cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -1173,7 +1271,7 @@
|
||||
<Sizing>FitProportional</Sizing>
|
||||
<Top>0.11458in</Top>
|
||||
<Height>2.09585cm</Height>
|
||||
<Width>24.37731cm</Width>
|
||||
<Width>24.56252cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -1201,7 +1299,7 @@
|
||||
<rd:DefaultName>Filtros</rd:DefaultName>
|
||||
<Top>2.56328cm</Top>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>24.37731cm</Width>
|
||||
<Width>24.56252cm</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -1216,7 +1314,7 @@
|
||||
<Line Name="Line1">
|
||||
<Top>3.30439cm</Top>
|
||||
<Height>0cm</Height>
|
||||
<Width>24.37731cm</Width>
|
||||
<Width>24.56252cm</Width>
|
||||
<ZIndex>4</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -1375,7 +1473,7 @@
|
||||
<Line Name="Line2">
|
||||
<Top>0.15875cm</Top>
|
||||
<Height>0cm</Height>
|
||||
<Width>24.37731cm</Width>
|
||||
<Width>24.56252cm</Width>
|
||||
<ZIndex>4</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -1513,6 +1611,49 @@
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<ReportParametersLayout>
|
||||
<GridLayoutDefinition>
|
||||
<NumberOfColumns>2</NumberOfColumns>
|
||||
<NumberOfRows>4</NumberOfRows>
|
||||
<CellDefinitions>
|
||||
<CellDefinition>
|
||||
<ColumnIndex>0</ColumnIndex>
|
||||
<RowIndex>0</RowIndex>
|
||||
<ParameterName>NombreEmpresa</ParameterName>
|
||||
</CellDefinition>
|
||||
<CellDefinition>
|
||||
<ColumnIndex>1</ColumnIndex>
|
||||
<RowIndex>0</RowIndex>
|
||||
<ParameterName>FechaInicio</ParameterName>
|
||||
</CellDefinition>
|
||||
<CellDefinition>
|
||||
<ColumnIndex>0</ColumnIndex>
|
||||
<RowIndex>1</RowIndex>
|
||||
<ParameterName>FechaFin</ParameterName>
|
||||
</CellDefinition>
|
||||
<CellDefinition>
|
||||
<ColumnIndex>1</ColumnIndex>
|
||||
<RowIndex>1</RowIndex>
|
||||
<ParameterName>UsuarioImprimio</ParameterName>
|
||||
</CellDefinition>
|
||||
<CellDefinition>
|
||||
<ColumnIndex>0</ColumnIndex>
|
||||
<RowIndex>2</RowIndex>
|
||||
<ParameterName>LogoPath</ParameterName>
|
||||
</CellDefinition>
|
||||
<CellDefinition>
|
||||
<ColumnIndex>1</ColumnIndex>
|
||||
<RowIndex>2</RowIndex>
|
||||
<ParameterName>Filtros</ParameterName>
|
||||
</CellDefinition>
|
||||
<CellDefinition>
|
||||
<ColumnIndex>0</ColumnIndex>
|
||||
<RowIndex>3</RowIndex>
|
||||
<ParameterName>FechaImprimio</ParameterName>
|
||||
</CellDefinition>
|
||||
</CellDefinitions>
|
||||
</GridLayoutDefinition>
|
||||
</ReportParametersLayout>
|
||||
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
||||
<rd:ReportID>40c94aad-a12a-44fb-ab0d-ea36a9656792</rd:ReportID>
|
||||
</Report>
|
||||
@@ -13,7 +13,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
Dim DtAlmacenes As DataTable = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen in (1,12,14,16, 26)")
|
||||
Dim DtAlmacenes As DataTable = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen in (1,2,12,14,16, 26)")
|
||||
|
||||
DdlAlmacen.DataSource = DtAlmacenes
|
||||
DdlAlmacen.DataBind()
|
||||
|
||||
@@ -3076,6 +3076,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
Dim ObjInventario As New ClsInventarios : ObjInventario.IniciaTransacSQL()
|
||||
Dim ObjGeneral As New ClsGenerales(ObjInventario.IniciaTransacSQL())
|
||||
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
|
||||
Dim CveMovimientoSalida As Integer
|
||||
Dim ConceptoMovimiento = 0
|
||||
Dim FolioSalida As Integer
|
||||
@@ -3223,34 +3224,35 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim ValorTraspaso As Decimal = 0
|
||||
'ENTRADA POR TRASPASO
|
||||
If Not ErrorMovInv Then
|
||||
'sino es transitorio, los transitorios, ya no se hace otro movimiento
|
||||
If Not ChkTransitorio.Checked Then
|
||||
ConceptoMovimiento = 27 ' If(ChkTransitorio.Checked, 2, 27)
|
||||
Almacen2 = If(ChkTransitorio.Checked, DdlAlmacenTransitorio.SelectedValue.ToEntero(), CveAlmacenTraspasoDestino)
|
||||
|
||||
ConceptoMovimiento = If(ChkTransitorio.Checked, 2, 27)
|
||||
Almacen2 = If(ChkTransitorio.Checked, DdlAlmacenTransitorio.SelectedValue.ToEntero(), CveAlmacenTraspasoDestino)
|
||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(Almacen2, ConceptoMovimiento, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim,
|
||||
Guia:="", CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimientoSalida, CveAlmacenDestino:=CveAlmacenTraspasoDestino,
|
||||
Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, ""), Modulo:="RE/GT1", CveOP:=CveOP)
|
||||
FolioEntrada = ObjInventario.Folio
|
||||
If CveMovimientoEntrada > 0 Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
Dim CveSeccionAlmacen As Integer = -1
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
FolioEntrada = ObjInventario.Folio
|
||||
If CveMovimientoEntrada > 0 Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
Dim CveSeccionAlmacen As Integer = -1
|
||||
ValorTraspaso = ObjInventario.DtResultados.SUMD("Total").RoundSQL
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
|
||||
CveSeccionAlmacen = -3
|
||||
CveSeccionAlmacen = -3
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString().ToDecimal, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), Dr("PU").ToString().ToDecimal, CveAF:=Dr("CveAF").ToString().ToEntero(), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Dr("Serie").ToString(), Lote:=Dr("Lote").ToString(), FechaCaducidad:=Dr("FechaCaducidad").ToString().ToDate, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al guardar los movimientos de entrada"
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Else
|
||||
TextoError = "Ocurrió un error al generar el movimiento de entrada"
|
||||
ErrorMovInv = True
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString().ToDecimal, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), Dr("PU").ToString().ToDecimal, CveAF:=Dr("CveAF").ToString().ToEntero(), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Dr("Serie").ToString(), Lote:=Dr("Lote").ToString(), FechaCaducidad:=Dr("FechaCaducidad").ToString().ToDate, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al guardar los movimientos de entrada"
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Else
|
||||
TextoError = "Ocurrió un error al generar el movimiento de entrada"
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -3263,16 +3265,16 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim Fecha As Date = TxtFecha.Text.ToDate
|
||||
'Paqueterias Guias
|
||||
If RbEntregaInterna.Checked AndAlso Not ErrorMovInv Then
|
||||
Dim CveEstatus As Integer = 0 ' DdlEstatus.SelectedValue.ToEntero()
|
||||
Dim Fecha As String = Now.ToString() 'TxtFechaPaqInterna.Text
|
||||
Dim FechaEstimada As String = "-1" 'If(TxtFechaEstimada.Text = "", "-1", TxtFechaEstimada.Text)
|
||||
Dim NoCajas As Integer = 0 'TxtNoCajas.Text.ToEntero()
|
||||
Dim Observaciones As String = "" 'TxtObservacionesPaqInterna.Text
|
||||
Dim CvePaqueteria As Integer = GlobalDTPaqueterias(UsuarioActual.CveEmpresa, 0).FiltroPrimeroValor("CvePaqueteria", "").ToEntero()
|
||||
|
||||
Dim CvePaqueteriaGuia As Integer = ObjGeneral.AddPaqueteriasGuias(CvePaqueteria, 9, CveEstatus, CveSubProyecto, Fecha, "-1", "-1", NoCajas, 0.00, "-1", FechaEstimada, Observaciones, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, EsEntregaInterna:=True)
|
||||
Dim CvePaqueteriaGuia As Integer = ObjGeneral.AddPaqueteriasGuias(CvePaqueteria, 9, CveEstatus, CveSubProyecto, Fecha.ToShortDateString, "-1", "-1", NoCajas, 0.00, "-1", FechaEstimada, Observaciones, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, EsEntregaInterna:=True)
|
||||
|
||||
If CvePaqueteriaGuia > 0 Then
|
||||
If CveVentaSurtir > 0 OrElse CveSubProyecto > 0 Then
|
||||
@@ -3288,6 +3290,24 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
End If
|
||||
|
||||
'AGREGAMOS PREPOLIZAS TRASPASO DIRECTO:
|
||||
|
||||
Dim CvePrePolizaTraspaso As Integer = ObjConta.AddPrePolizas("EA/GT", 53, 0, 0, 1, Fecha, "Traspaso", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If CvePrePolizaTraspaso > 0 Then
|
||||
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, True, ValorTraspaso, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, -1, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=False, ImporteMX:=ValorTraspaso) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, False, ValorTraspaso, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, -1, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=False, ImporteMX:=ValorTraspaso) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
ObjInventario.Commit()
|
||||
ObjGeneral.Dispose()
|
||||
|
||||
@@ -272,8 +272,11 @@ Partial Class Inventarios_Kardex
|
||||
|
||||
Dim FechaI As String = If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
|
||||
Dim FechaF As String = If(TxtFechaF.Text <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
|
||||
Dim CveAlmacen As Integer = -1
|
||||
Dim CveAlmacen As Integer = If(ddlAlmacen.SelectedValue.ToEntero = 0, -1, ddlAlmacen.SelectedValue.ToEntero)
|
||||
Dim CveAlmacenes As String = ddlAlmacen.GetSelectedValues()
|
||||
If CveAlmacenes.Contains(",") Then
|
||||
CveAlmacen = -1
|
||||
End If
|
||||
If CvePS > 0 Then
|
||||
Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||
If dr IsNot Nothing Then
|
||||
@@ -389,65 +392,80 @@ Partial Class Inventarios_Kardex
|
||||
GenerarPDF()
|
||||
End Sub
|
||||
Private Sub GenerarPDF(Optional Formato As String = "PDF")
|
||||
If ddlProducto2.SelectedValue.ToEntero > 0 Then
|
||||
Dim Movimientos As New ClsInventarios
|
||||
Dim CvePS As Integer = ddlProducto2.SelectedValue.ToEntero
|
||||
Dim Entrada As Boolean = cbEntrada.Checked
|
||||
Dim Salida As Boolean = cbSalida.Checked
|
||||
If GvM.Rows.Count > 0 Then
|
||||
If ddlProducto2.SelectedValue.ToEntero > 0 Then
|
||||
Dim Movimientos As New ClsInventarios
|
||||
Dim CvePS As Integer = ddlProducto2.SelectedValue.ToEntero
|
||||
Dim Entrada As Boolean = cbEntrada.Checked
|
||||
Dim Salida As Boolean = cbSalida.Checked
|
||||
|
||||
Dim FechaI As String = If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
|
||||
Dim FechaF As String = If(TxtFechaF.Text <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
|
||||
Dim CveAlmacen As Integer = ddlAlmacen.SelectedValue.ToEntero
|
||||
|
||||
|
||||
Dim Almacen = If(ddlAlmacen.SelectedValue = "-1", "", $" <b>Almacén:</b> {ddlAlmacen.SelectedItem.Text}")
|
||||
Dim UM = If(DdlUnidadMedida.SelectedValue = "-1", "", $" <b>Unidad de Medida:</b> {DdlUnidadMedida.SelectedItem.Text}")
|
||||
Dim FechaIn As String = If(TxtFechaI.Text = "", "", $" <b>Fecha Inicio:</b> {TxtFechaI.Text}")
|
||||
Dim FechaFn As String = If(TxtFechaF.Text = "", "", $" <b>Fecha Fin:</b> {TxtFechaF.Text}")
|
||||
Dim EntradaSalida As String = ""
|
||||
|
||||
If cbEntrada.Checked And cbSalida.Checked Then
|
||||
EntradaSalida = " Entradas y Salidas"
|
||||
ElseIf cbEntrada.Checked And cbSalida.Checked = False Then
|
||||
EntradaSalida = " Solo Entradas"
|
||||
ElseIf cbEntrada.Checked = False And cbSalida.Checked Then
|
||||
EntradaSalida = " Solo Salidas"
|
||||
End If
|
||||
|
||||
Dim CveTiposAlmacen = ""
|
||||
For Each item As ListItem In CBLTiposAlmacen.Items
|
||||
CveTiposAlmacen += If(item.Selected, $"{item.Value},", "")
|
||||
Next
|
||||
|
||||
Dim Serie As String = If(TxtSerie.Text <> "", TxtSerie.Text, "-1")
|
||||
|
||||
Dim SerieAgrupado As String = If(TxtSerie.Text = "", "", $"<b>Existencia y costos calculada por numero de serie:</b> {TxtSerie.Text} ")
|
||||
|
||||
If Movimientos.GetKardex(Entrada, Salida, CvePS, FechaI, FechaF, CveAlmacen, CveTiposAlmacen.Substring(0, CveTiposAlmacen.Length - 1), DdlUnidadMedida.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ChkAgruparAlmacen.Checked, Serie) Then
|
||||
|
||||
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 dt As DataTable = Movimientos.DtResultados
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||
params.Add(New ReportParameter("FechaFin", FechaF))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("Producto", ddlProducto2.SelectedText))
|
||||
params.Add(New ReportParameter("AgrupadoPor", $"<b>Agrupado Por:</b> {SerieAgrupado}{EntradaSalida}{Almacen}{UM}{FechaIn}{FechaFn}"))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Dim FechaI As String = If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
|
||||
Dim FechaF As String = If(TxtFechaF.Text <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
|
||||
Dim CveAlmacen As Integer = If(ddlAlmacen.SelectedValue.ToEntero = 0, -1, ddlAlmacen.SelectedValue.ToEntero)
|
||||
Dim Almacenes As String = ddlAlmacen.GetSelectedText()
|
||||
Dim CveAlmacenes As String = ddlAlmacen.GetSelectedValues()
|
||||
If CveAlmacenes.Contains(",") Then
|
||||
CveAlmacen = -2
|
||||
End If
|
||||
Dim Almacen As String
|
||||
If CveAlmacen = -1 Then
|
||||
Almacen = ""
|
||||
ElseIf CveAlmacen = -2 Then
|
||||
Almacen = $" <b>Almacén:</b> {Almacenes}"
|
||||
CveAlmacen = -1
|
||||
Else
|
||||
Almacen = $" <b>Almacén:</b> {ddlAlmacen.SelectedItem.Text}"
|
||||
End If
|
||||
Dim UM = If(DdlUnidadMedida.SelectedValue = "-1", "", $" <b>Unidad de Medida:</b> {DdlUnidadMedida.SelectedItem.Text}")
|
||||
Dim FechaIn As String = If(TxtFechaI.Text = "", "", $" <b>Fecha Inicio:</b> {TxtFechaI.Text}")
|
||||
Dim FechaFn As String = If(TxtFechaF.Text = "", "", $" <b>Fecha Fin:</b> {TxtFechaF.Text}")
|
||||
Dim EntradaSalida As String = ""
|
||||
|
||||
If cbEntrada.Checked And cbSalida.Checked Then
|
||||
EntradaSalida = " Entradas y Salidas"
|
||||
ElseIf cbEntrada.Checked And cbSalida.Checked = False Then
|
||||
EntradaSalida = " Solo Entradas"
|
||||
ElseIf cbEntrada.Checked = False And cbSalida.Checked Then
|
||||
EntradaSalida = " Solo Salidas"
|
||||
End If
|
||||
|
||||
Dim CveTiposAlmacen = ""
|
||||
For Each item As ListItem In CBLTiposAlmacen.Items
|
||||
CveTiposAlmacen += If(item.Selected, $"{item.Value},", "")
|
||||
Next
|
||||
|
||||
Dim Serie As String = If(TxtSerie.Text <> "", TxtSerie.Text, "-1")
|
||||
|
||||
Dim SerieAgrupado As String = If(TxtSerie.Text = "", "", $"<b>Existencia y costos calculada por numero de serie:</b> {TxtSerie.Text} ")
|
||||
|
||||
If Movimientos.GetKardex(Entrada, Salida, CvePS, FechaI, FechaF, CveAlmacen, CveTiposAlmacen.Substring(0, CveTiposAlmacen.Length - 1), DdlUnidadMedida.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ChkAgruparAlmacen.Checked, Serie, CveAlmacenes) Then
|
||||
|
||||
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 dt As DataTable = Movimientos.DtResultados
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||
params.Add(New ReportParameter("FechaFin", FechaF))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("Producto", ddlProducto2.SelectedText))
|
||||
params.Add(New ReportParameter("AgrupadoPor", $"<b>Agrupado Por:</b> {SerieAgrupado}{EntradaSalida}{Almacen}{UM}{FechaIn}{FechaFn}"))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepKardex.rdlc", dt, params, "ReporteKardex", Formato)
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepKardex.rdlc", dt, params, "ReporteKardex", Formato)
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
Alert("Debes seleccionar un Producto/Servicio", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Else
|
||||
Alert("Debes seleccionar un Producto/Servicio", TipoMensaje.MsgAdvertencia)
|
||||
Alert("No hay informacion cargada", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -68,6 +68,11 @@
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="TxtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgFechaI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVInicio" runat="server" ControlToValidate="TxtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicio''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpConsultar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVInicio" runat="server" ControlToValidate="TxtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicio''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsultar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CVEIncio1" runat="server" HighlightCssClass="vco" TargetControlID="RFVInicio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="CVEIncio2" runat="server" HighlightCssClass="vco" TargetControlID="CVInicio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@@ -81,6 +86,10 @@
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFin" runat="server" ControlToValidate="TxtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Fin''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpConsultar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFin" runat="server" ControlToValidate="TxtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Fin''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsultar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CVEFin1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFin" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="CVEFin2" runat="server" HighlightCssClass="vco" TargetControlID="CVFin" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -122,7 +131,7 @@
|
||||
<%--<asp:DropDownList ID="DdlPS" CssClass="form-control input-sm select2me" runat="server" Width="100%" DataTextField="PS" DataValueField="CvePS"></asp:DropDownList>--%>
|
||||
</div>
|
||||
<div runat="Server" id="DivMarca">
|
||||
<div class="col-md-1 truncate" style="width:40px !important" >Marca</div>
|
||||
<div class="col-md-1 truncate" style="width:50px !important" >Marca</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlMarca" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataValueField="CveMarca" DataTextField="Marca"></asp:DropDownList>
|
||||
</div>
|
||||
@@ -135,11 +144,11 @@
|
||||
<asp:DropDownList ID="DdlPersonal" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataValueField="CvePersonal" DataTextField="CodigoNombreCompleto"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate" style="text-align: right!important">Tipo Almacen:</div>
|
||||
<div class="col-md-1 truncate">Tipo Almacén:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:ListBox ID="DdlTipoAlmacen" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="TipoAlmacen" DataValueField="CveTipoAlmacen" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" style="text-align: right!important">Modalidad:</div>
|
||||
<div class="col-md-1 truncate">Modalidad:</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlModalidadFiltro" runat="server" CssClass="input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Text="Todas" Value="-1" Selected="True"> </asp:ListItem>
|
||||
@@ -197,8 +206,8 @@
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvM" Width="100%" runat="server" data-sort="false" GridLines="None" CssClass="table table-smallpadding table-striped table-hover Widthall ScrollAD" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||
<Columns>
|
||||
<asp:HyperLinkField DataNavigateUrlFields="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal" DataNavigateUrlFormatString="~/Inventarios/RepExistenciasCostos.aspx?CvePS={0}&CveMoneda={1}&CveProveedor={2}&CveConcepto={3}&FechaI={4}&FechaF={5}&CveAlmacen={6}&CvePersonal={7}" Target="_blank" ItemStyle-Width="10%" HeaderText="Codigo" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataTextField="Codigo" />
|
||||
<asp:HyperLinkField DataNavigateUrlFields="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal" DataNavigateUrlFormatString="~/Inventarios/RepExistenciasCostos.aspx?CvePS={0}&CveMoneda={1}&CveProveedor={2}&CveConcepto={3}&FechaI={4}&FechaF={5}&CveAlmacen={6}&CvePersonal={7}" Target="_blank" ItemStyle-Width="10%" HeaderText="codigo2" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" Visible="False" DataTextField="Codigo2" />
|
||||
<asp:HyperLinkField DataNavigateUrlFields="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal" DataNavigateUrlFormatString="~/Inventarios/RepExistenciasCostos.aspx?CvePS={0}&CveMoneda={1}&CveProveedor={2}&CveConcepto={3}&FechaI={4}&FechaF={5}&CveAlmacen={6}&CvePersonal={7}" Target="_blank" ItemStyle-Width="10%" HeaderText="Código" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataTextField="Codigo" />
|
||||
<asp:HyperLinkField DataNavigateUrlFields="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal" DataNavigateUrlFormatString="~/Inventarios/RepExistenciasCostos.aspx?CvePS={0}&CveMoneda={1}&CveProveedor={2}&CveConcepto={3}&FechaI={4}&FechaF={5}&CveAlmacen={6}&CvePersonal={7}" Target="_blank" ItemStyle-Width="10%" HeaderText="Código2" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" Visible="False" DataTextField="Codigo2" />
|
||||
<asp:BoundField Visible="false" DataField="CodigoBarras" HeaderText="CodigoBarras" ItemStyle-Width="10%" />
|
||||
<asp:BoundField Visible="false" DataField="Clasificacion" HeaderText="Clasificación 2" ItemStyle-Width="7%" />
|
||||
<asp:HyperLinkField DataNavigateUrlFields="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal" DataNavigateUrlFormatString="~/Inventarios/RepExistenciasCostos.aspx?CvePS={0}&CveMoneda={1}&CveProveedor={2}&CveConcepto={3}&FechaI={4}&FechaF={5}&CveAlmacen={6}&CvePersonal={7}" Target="_blank" ItemStyle-Width="22.5%" HeaderText="Descripción" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataTextField="PS" />
|
||||
@@ -251,7 +260,7 @@
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Ultimo Costo">
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Último Costo">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbUltimoCosto" runat="server" Text='<%# If(Eval("UltimoCosto").ToString() = "0", "-", Eval("UltimoCosto", "{0:N2}")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -1937,16 +1937,16 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
RealizarMovimientoVirtual = True
|
||||
End If
|
||||
|
||||
|
||||
'AGREGAMOS LA SALIDA
|
||||
CveMovimientoSalidaTransitorio = ObjInventario.AddMovimiento(CveAlmacenSalida, 8, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
|
||||
Observaciones:=TxtObservacionesRecepcion.Text.Trim, CveAlmacenDestino:=GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero, Modulo:="TA/G11")
|
||||
|
||||
'AGREGAMOS LA ENTRADA
|
||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacenEntrada, 27, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
|
||||
Observaciones:=TxtObservacionesRecepcion.Text.Trim, CveAlmacenDestino:=GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero, CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="TA/G1")
|
||||
Folio = ObjInventario.Folio
|
||||
|
||||
'AGREGAMOS LA SALIDA
|
||||
CveMovimientoSalidaTransitorio = ObjInventario.AddMovimiento(CveAlmacenSalida, 8, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
|
||||
Observaciones:=TxtObservacionesRecepcion.Text.Trim, CveAlmacenDestino:=GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero, CveMovimientoRelacionado:=CveMovimientoEntrada, Modulo:="TA/G11")
|
||||
|
||||
|
||||
If CveMovimientoSalidaTransitorio <= 0 Then
|
||||
TextoError = "No se pudo generar el movimiento de salida correctamente"
|
||||
ErrorMovInv = True
|
||||
@@ -1992,7 +1992,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
'MOV, Alm, Transito
|
||||
If gvr.DataKey("CveMovimientoDetalleTransitorio").ToString.ToEntero > 0 Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaTransitorio, gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal, gvr.DataKey("CveUM").ToString.ToEntero, gvr.DataKey("CvePS").ToString.ToEntero, PrecioEntrada, CveAF:=gvr.DataKey("CveAF").ToString.ToEntero, CveSeccionAlmacen:=gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, Serie:=gvr.DataKey("Serie").ToString, Lote:=tLote, FechaCaducidad:=tFechaCaducidad, CveMovimientoDetalleEntrada:=gvr.DataKey("CveMovimientoDetalleTransitorio").ToString.ToEntero) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaTransitorio, gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal, gvr.DataKey("CveUM").ToString.ToEntero, gvr.DataKey("CvePS").ToString.ToEntero, PrecioEntrada, CveAF:=gvr.DataKey("CveAF").ToString.ToEntero, CveSeccionAlmacen:=-3, Serie:=gvr.DataKey("Serie").ToString, Lote:=gvr.DataKey("Lote").ToString, FechaCaducidad:=gvr.DataKey("FechaCaducidad").ToDate, CveMovimientoDetalleEntrada:=gvr.DataKey("CveMovimientoDetalleTransitorio").ToString.ToEntero) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
||||
Exit For
|
||||
@@ -2013,14 +2013,13 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Dim resultado As DataTable = ObjInventario.DtResultados
|
||||
Dim importe As Decimal = resultado.SUMD("Total").RoundAD
|
||||
Dim importe As Decimal = ObjInventario.DtResultados.SUMD("Total").RoundSQL
|
||||
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero
|
||||
Dim tCveConcepto As Integer = 68
|
||||
|
||||
If CveMovimientoSalidaTransitorio = 0 Then
|
||||
tCveConcepto = 289
|
||||
End If
|
||||
'If CveMovimientoSalidaTransitorio = 0 Then
|
||||
' tCveConcepto = 289
|
||||
'End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, tCveConcepto, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalidaTransitorio, ImporteMX:=importe, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="EstatusSiguiente" HeaderText="Estatus siguiente" />
|
||||
<asp:BoundField DataField="TipoTerminoDesc" HeaderText="Tipo Termino" />
|
||||
<asp:BoundField DataField="TipoTerminoDesc" HeaderText="Tipo Término" />
|
||||
<asp:BoundField DataField="Cancelable" HeaderText="Cancelable" />
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Estatus</HeaderTemplate>
|
||||
@@ -628,7 +628,7 @@
|
||||
<asp:ListItem Text="Es Autorizado" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Es Rechazado" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlTipoTermino.ClientID.ToString()%>">Tipo Termino:</label>
|
||||
<label for="<%= DdlTipoTermino.ClientID.ToString()%>">Tipo Término:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" id="DivCancelable" runat="server" visible="false">
|
||||
|
||||
@@ -1241,7 +1241,7 @@
|
||||
<div class="col-md-6" style="text-align: right!important">
|
||||
<asp:HyperLink ID="hplCargarCotExcel" Font-Size="13" CssClass="Texto" NavigateUrl="#" data-toggle="modal" data-target="#DivCargaExcelCotizaciones" runat="server" Text="<i class='fa fa-file-excel-o'></i> Cargar Cotización"></asp:HyperLink>
|
||||
|
||||
<asp:HyperLink ID="hplAgregarCotizacion" Font-Size="13" CssClass="Texto thickbox" runat="server" Text="<i class='fa fa-plus'></i> Agregar Cotizacion" Style="cursor: pointer;" ToolTip="Agregar Cotizacion"></asp:HyperLink>
|
||||
<asp:HyperLink ID="hplAgregarCotizacion" Font-Size="13" CssClass="Texto thickbox" runat="server" Text="<i class='fa fa-plus'></i> Agregar Cotización" Style="cursor: pointer;" ToolTip="Agregar Cotización"></asp:HyperLink>
|
||||
|
||||
<asp:HyperLink ID="hplEnviarCorreo" Font-Size="13" CssClass="Texto thickbox" runat="server" Text="<i class='fa fa-envelope'></i> Enviar cotización por correo" Style="cursor: pointer;" ToolTip="Enviar cotización por correo"></asp:HyperLink>
|
||||
</div>
|
||||
@@ -1254,7 +1254,7 @@
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplFolio" CssClass="Texto thickbox" runat="server" Text='<%# Eval("Folio")%>' Style="cursor: pointer;" ToolTip="Ver Cotizacion" NavigateUrl='<%# String.Format("/OC/RepCotizacionesDetalle.aspx?CveOrdenCompra={0}&CveCotizacion={1}&TB_iframe=true&height=370&width=600;", Eval("CveOrdenCompra"), Eval("CveCotizacion"))%>'></asp:HyperLink>
|
||||
<asp:HyperLink ID="HplFolio" CssClass="Texto thickbox" runat="server" Text='<%# Eval("Folio")%>' Style="cursor: pointer;" ToolTip="Ver Cotización" NavigateUrl='<%# String.Format("/OC/RepCotizacionesDetalle.aspx?CveOrdenCompra={0}&CveCotizacion={1}&TB_iframe=true&height=370&width=600;", Eval("CveOrdenCompra"), Eval("CveCotizacion"))%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Folio" HeaderText="Folio"></asp:BoundField>
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" align="right">
|
||||
<asp:HyperLink ID="HplAgregar" CssClass="Texto thickbox" runat="server" Text="Agregar Cotizacion" Style="cursor: pointer;" ToolTip="Agregar Cotizacion" Visible="False">Agregar Cotización</asp:HyperLink>
|
||||
<asp:HyperLink ID="HplAgregar" CssClass="Texto thickbox" runat="server" Text="Agregar Cotización" Style="cursor: pointer;" ToolTip="Agregar Cotización" Visible="False">Agregar Cotización</asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
</div>
|
||||
<div class="colf-2 truncate">
|
||||
<label class="col-md-3">Tipo:</label>
|
||||
<asp:DropDownList ID="DdlTipo" CssClass="form-control input-sm col-md-9" runat="server" AutoPostBack="true" Style="width: 100px; height: 30px;">
|
||||
<asp:DropDownList ID="DdlTipo" CssClass="form-control input-sm col-md-9 select2me" runat="server" AutoPostBack="true" Style="width: 100px; height: 30px;">
|
||||
<asp:ListItem Value="-1" Text="Todas"></asp:ListItem>
|
||||
<asp:ListItem Value="REQ" Text="Requisiciones"></asp:ListItem>
|
||||
<asp:ListItem Value="OC" Text="Ordenes Compra"></asp:ListItem>
|
||||
@@ -163,11 +163,12 @@
|
||||
<asp:DropDownList ID="DdlSubProyectos" runat="server" CssClass="form-control input-sm select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="colf-3">
|
||||
<label>Estatus</label>
|
||||
<asp:DropDownList ID="DdlEstatus" runat="server" CssClass="form-control input-sm " DataTextField="Estatus" DataValueField="CveEstatus" Style="width: 95px; height: 30px; display: inline-block;">
|
||||
<label class="colf-1">Estatus</label>
|
||||
<div class="colf-2">
|
||||
<asp:DropDownList ID="DdlEstatus" runat="server" CssClass="form-control input-sm select2me" DataTextField="Estatus" DataValueField="CveEstatus" Style="width: 95px; height: 30px; display: inline-block;">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -198,7 +199,7 @@
|
||||
|
||||
</div>
|
||||
<div class="row rownomargin">
|
||||
<label class="colf-1 truncate">Clasificacion</label>
|
||||
<label class="colf-1 truncate">Clasificación</label>
|
||||
<div class="colf-2">
|
||||
<asp:DropDownList ID="DDlClasificacion" runat="server" CssClass="form-control input-sm select2me" DataTextField="Clasificacion" DataValueField="CveClasificacion" AutoPostBack="true">
|
||||
</asp:DropDownList>
|
||||
|
||||
@@ -106,15 +106,15 @@ Partial Class RepOC
|
||||
End Sub
|
||||
|
||||
Protected Sub CargaUsuarios()
|
||||
ddlUsuario.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
|
||||
ddlUsuario.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("", "Nombre", {"CveUsuario", "Nombre"})
|
||||
ddlUsuario.DataBind()
|
||||
ddlUsuario.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlUsuarioAsignado.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 1", "Nombre")
|
||||
DdlUsuarioAsignado.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 1", "Nombre", {"CveUsuario", "Nombre"})
|
||||
DdlUsuarioAsignado.DataBind()
|
||||
DdlUsuarioAsignado.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlUsuarioAutorizo.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
|
||||
DdlUsuarioAutorizo.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("", "Nombre", {"CveUsuario", "Nombre"})
|
||||
DdlUsuarioAutorizo.DataBind()
|
||||
DdlUsuarioAutorizo.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-1 "><span>Proyecto:</span></div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlProyecto" runat="server" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" CssClass="form-control input-sm select2me" Style="max-width: 200px !important;">
|
||||
<asp:DropDownList ID="DdlProyecto" runat="server" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" CssClass="form-control input-sm select2me" Style="max-width: 200px !important;" OnSelectedIndexChanged="CargaSubProyecto" AutoPostBack="true">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,14 @@ Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class OC_RepRequisiciones
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property DtUsuarioProyectos As DataTable
|
||||
Get
|
||||
Return DirectCast(ViewState("DtUsuarioProyectos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtUsuarioProyectos") = value
|
||||
End Set
|
||||
End Property
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
@@ -19,7 +26,6 @@ Partial Class OC_RepRequisiciones
|
||||
|
||||
Private Sub CargaCombos()
|
||||
'CargaProyectos
|
||||
Dim DtUsuarioProyectos As DataTable = Nothing
|
||||
|
||||
Dim objEstatusUsuarios As New ClsOC
|
||||
If objEstatusUsuarios.GetEstatusUsuarios(UsuarioActual.CveUsuario, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
@@ -67,6 +73,19 @@ Partial Class OC_RepRequisiciones
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub CargaSubProyecto(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged
|
||||
DdlSubProyecto.Items.Clear()
|
||||
If DdlProyecto.SelectedValue.ToEntero = -1 Then
|
||||
DdlSubProyecto.DataSource = DtUsuarioProyectos.FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"}) 'GlobalDTSubProyectos(-1).FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
Else
|
||||
DdlSubProyecto.DataSource = DtUsuarioProyectos.FiltraParametros(String.Format("CveProyecto = {0}", DdlProyecto.SelectedValue.ToEntero), "", {"CveSubProyecto", "SubProyecto"}) 'GlobalDTSubProyectos(CveProyecto, -1, UsuarioActual.CveEmpresa, Estatus:=1)
|
||||
DdlSubProyecto.DataBind()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
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.RowIndex = 0 Then
|
||||
@@ -161,4 +180,5 @@ Partial Class OC_RepRequisiciones
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||
Reporte de Solicitudes de Anticipo
|
||||
@@ -10,8 +11,7 @@
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||
<asp:UpdatePanel runat="server" id="UPAcciones" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Generar PDF</asp:LinkButton>
|
||||
</li>
|
||||
@@ -21,16 +21,15 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImpresionMasiva" OnClick="LnkImpresionMasiva_Click" runat="server"> <i class="fa fa-download" style="font-weight:bold;"></i> Descargar PDFs</asp:LinkButton>
|
||||
</li>
|
||||
<asp:UpdatePanel runat="server" id="UPAcciones" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCambiarFecha" OnClick="LnkCambiarFecha_Click" runat="server"> <i class="fa fa-calendar" style="font-weight:bold;"></i> Cambiar Fechas</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkGuardar" runat="server" Visible="false" data-toggle="modal" data-target="#ModalUpload"> <i class="fa fa-floppy-o" style="font-weight:bold;"></i> Guardar</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkGuardar" runat="server" Visible="false" OnClick="LnkGuardar_Click"> <i class="fa fa-floppy-o" style="font-weight:bold;"></i> Guardar</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkGuardar" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||
@@ -127,9 +126,10 @@
|
||||
<Columns>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>
|
||||
<asp:CheckBox ID="ChkAll" runat="server"/>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkOrdenCompra" runat="server"/>
|
||||
<asp:CheckBox ID="ChkOrdenCompra" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ord. Compra" ItemStyle-Width="10%">
|
||||
@@ -172,7 +172,7 @@
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="ModalUpload" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
@@ -186,12 +186,12 @@
|
||||
<div class="col-md-4"> </div>
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright" style="padding-left: 0px !important;">
|
||||
<div class="input-group input-sm dater" data-date-format="dd/mm/yyyy" style="width: 50%;">
|
||||
|
||||
<asp:TextBox ID="txtFechaActualizar" ClientIDMode="Static" runat="server" Width="100%" CssClass="form-control input-sm" CausesValidation="true" MaxLength="18"></asp:TextBox>
|
||||
<label style=" padding-bottom: 30px; width: 70%;" for="<%= txtFechaActualizar.ClientID.ToString()%>">Fecha:</label>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="btnFechaActualizar" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<asp:TextBox ID="txtFechaActualizar" ClientIDMode="Static" runat="server" Width="100%" CssClass="form-control input-sm" CausesValidation="true" MaxLength="18"></asp:TextBox>
|
||||
<label style=" padding-bottom: 30px; width: 70%;" for="<%= txtFechaActualizar.ClientID.ToString()%>">Fecha:</label>
|
||||
|
||||
</div>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaInicioAdd" Display="None" CssClass="help-block errorimput" runat="server" ControlToValidate="txtFechaActualizar" ErrorMessage="<b><span style='text-decoration: underline'>ERROR</span></b>:<br>El campo <b>''Fecha''</b> es necesario." ValidationGroup="Actualiza"></asp:RequiredFieldValidator>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaActualiar" runat="server" TargetControlID="txtFechaActualizar" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
@@ -236,12 +236,10 @@
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery('#C_datetimepicker').datetimepicker({
|
||||
timepicker: false,
|
||||
format: 'd.m.Y'
|
||||
});
|
||||
function SeleccionarTodos(chk) {
|
||||
$("#C_GvSolicitudes input:checkbox").attr("checked", chk.checked);
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -77,6 +77,7 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
|
||||
CargaProveedor();
|
||||
CargaUsuarios();
|
||||
CargaDatos();
|
||||
|
||||
}
|
||||
|
||||
private void CargaSubProyectos()
|
||||
@@ -155,21 +156,31 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
|
||||
}
|
||||
protected void LnkCambiarFecha_Click(object sender, EventArgs e)
|
||||
{
|
||||
GvSolicitudes.Columns[0].Visible = true;
|
||||
LnkGuardar.Visible = true;
|
||||
LnkCambiarFecha.Visible = false;
|
||||
if (GvSolicitudes.Rows.Count > 0)
|
||||
{
|
||||
GvSolicitudes.Columns[0].Visible = true;
|
||||
LnkGuardar.Visible = true;
|
||||
LnkCambiarFecha.Visible = false;
|
||||
GvSolicitudes.HeaderRow.FCCheckBox("ChkAll").Attributes.Add("onclick", "SeleccionarTodos(this);");
|
||||
UPDatos.Update();
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("No hay informacion cargada", TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
|
||||
UPAcciones.Update();
|
||||
UPDatos.Update();
|
||||
}
|
||||
protected void LnkGuardar_Click(object sender, EventArgs e)
|
||||
{
|
||||
RegistraScript("$('#ModalUpload').modal('show')");
|
||||
}
|
||||
protected void BtnGuardarArchivo_Click(object sender, EventArgs e)
|
||||
{
|
||||
ActualizarFechas();
|
||||
RegistraScript("$('#ModalUpload').modal('hide')", "hidemodal1");
|
||||
RegistraScript("$('#ModalUpload').modal('hide')");
|
||||
GvSolicitudes.Columns[0].Visible = false;
|
||||
LnkGuardar.Visible = false;
|
||||
LnkCambiarFecha.Visible = true;
|
||||
UPAcciones.Update();
|
||||
UPDatos.Update();
|
||||
}
|
||||
private void ActualizarFechas()
|
||||
@@ -195,14 +206,12 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
|
||||
{
|
||||
TieneError = true;
|
||||
Alert("Ocurrio un error al actulizar las fechas", TipoMensaje.MsgError);
|
||||
ObjEvento.RollBack();
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
if (TieneError == false) {
|
||||
ObjEvento.Commit();
|
||||
Alert("Las Fechas se actualizaron correctamente");
|
||||
}
|
||||
ObjEvento.Dispose();
|
||||
@@ -283,4 +292,5 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
|
||||
ImprimirbytesPDF(all, "RepSolicitudesAnticipo");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -90,7 +90,7 @@
|
||||
<asp:DropDownList ID="DdlTipoCliente" runat="server" CssClass=" form-control input-sm select2me" ValidationGroup="GrpFiltrar" Width="100%">
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="1">Frecuente</asp:ListItem>
|
||||
<asp:ListItem Value="2">No Frecuente</asp:ListItem>
|
||||
<asp:ListItem Value="2">Venta Mostrador</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<ADS:Dropdownlost runat="server" ID="DdlSATUnidadMedida" CssClass="form-control input-sm select2me" CssStyle="width: 46%;" DataTextField="ClaveNombre" DataValueField="CveSATUnidadMedida" />
|
||||
<ADS:Dropdownlost runat="server" ID="DdlSATUnidadMedida" CssClass="form-control input-sm select2me" CssStyle="width: 46%;" DataTextField="ClaveNombre" DataValueField="CveUnidadMedidaSAT" />
|
||||
<%-- <asp:DropDownList ID="DdlSATUnidadMedida" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="false" CausesValidation="true" DataTextField="Nombre" DataValueField="CveSATUnidadMedida" Width="350px" Enabled="true">
|
||||
</asp:DropDownList>--%>
|
||||
<label for="<%= DdlSATUnidadMedida.ClientID.ToString()%>">Unidad de Medida SAT:</label>
|
||||
|
||||
@@ -5522,7 +5522,7 @@
|
||||
<asp:Label ID="LblTituloGrafica" runat="server" ClientIDMode="Static" Text="Análisis de Crédito"></asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-body ADScroller-body">
|
||||
<div class="row" align="center">
|
||||
<div class="col-md-4">
|
||||
<div class="row">
|
||||
|
||||
@@ -6020,6 +6020,8 @@ Partial Class Clientes
|
||||
params.Add(New ReportParameter("DireccionEmpresa", UsuarioActual.Empresa.Direccion))
|
||||
params.Add(New ReportParameter("TelefonoEmpresa", UsuarioActual.Empresa.Telefono))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
params.Add(New ReportParameter("Cliente", LtlCliente.Text))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
@@ -6063,6 +6065,8 @@ Partial Class Clientes
|
||||
params.Add(New ReportParameter("DireccionEmpresa", UsuarioActual.Empresa.Direccion))
|
||||
params.Add(New ReportParameter("TelefonoEmpresa", UsuarioActual.Empresa.Telefono))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
params.Add(New ReportParameter("Cliente", LtlCliente.Text))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
@@ -10346,9 +10350,11 @@ Partial Class Clientes
|
||||
Min = row.Item("Total").ToString.ToDouble
|
||||
End If
|
||||
|
||||
If row.Item("Total").ToString.ToDouble > 0 Then
|
||||
Total += row.Item("Total").ToString.ToDouble
|
||||
Cantidad += 1
|
||||
|
||||
Total += row.Item("Total").ToString.ToDouble
|
||||
Cantidad += 1
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
@@ -625,7 +625,7 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
||||
if (continuar && DrUmSat == null) { continuar = false; strErrores.AppendLine($"No se encontro la unidad de medida en el catalogo del sat '{item.ClaveUnidad}', favor de contactar a soporte tecnico."); }
|
||||
if (continuar)
|
||||
{
|
||||
DrUm = get_GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveUnidadMedidaSAT={0}", DrUmSat["CveSATUnidadMedida"]));
|
||||
DrUm = get_GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveUnidadMedidaSAT={0}", DrUmSat["CveUnidadMedidaSAT"]));
|
||||
}
|
||||
if (continuar && DrUm == null) { continuar = false; strErrores.AppendLine($"No se encontro la unidad de medida relacionada a la clave del sat '{item.ClaveUnidad}', favor de asignarla en el catalogo de unidad de medida."); }
|
||||
if (continuar)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Utilidad o Pérdida sobre Ventas
|
||||
Reporte de utilidad o pérdida sobre venta
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -210,11 +210,11 @@
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Left" Target="_blank" HeaderText="Grupo" DataTextField="GPO" DataNavigateUrlFields="FechaI,FechaF,CveSubProyecto,CveCliente,CveVendedor,Grupo,GPO,CvePS,CveClasificacion" DataNavigateUrlFormatString="RepVentasUtilidad.aspx?FechaI={0}&FechaF={1}&CveSubProyecto={2}&CveCliente={3}&CveVendedor={4}&Gpo={5}&CveGpo={6}&CvePS={7}&CveClasificacion={8}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Ventas" DataField="Ventas" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Descuento" DataField="Descuento" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Bonificacion" DataField="Bonificacion" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Bonificación" DataField="Bonificacion" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Costo" DataField="Costo" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Utilidad" DataField="Utilidad" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="%" DataField="PorUtilidad" ItemStyle-Width="7px" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Perdida" DataField="Perdida" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Pérdida" DataField="Perdida" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="%" DataField="PorPerdida" ItemStyle-Width="7px" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Neto" DataField="Neto" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="%" DataField="PorNeto" ItemStyle-Width="7px" DataFormatString="{0:N2}" />
|
||||
|
||||
@@ -240,6 +240,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user