Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1539,6 +1539,7 @@ Public Class ClsMovimientos
|
||||
Optional CveCondicionesPago As Integer = -1, Optional CveTipoTransaccion As Integer = -1, Optional CveMoneda As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_RepRecuperacion")
|
||||
SqlAdapter.SelectCommand.CommandTimeout = 0
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveResponsable", SqlDbType.Int).Value = CveResponsable
|
||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||
|
||||
@@ -708,7 +708,7 @@ Public Class ClsOC
|
||||
Optional PorcentajeIVA As Decimal = 0.16D, Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional FechaExpiracion As Date = Nothing, Optional CveCotizacion As Integer = -1,
|
||||
Optional FolioAdicional As String = "", Optional EntregaDirecta As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional Guia As String = "-1", Optional IEPS As Decimal = -1,
|
||||
Optional CveIEAnticipo As Integer = -1, Optional ImporteAnticipo As Decimal = 0, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1", Optional CveProveedorContacto As Integer = -1, Optional NumRemision As String = "-1",
|
||||
Optional CveColectiva As Integer = -1, Optional MetodoPago As Integer = -1) As Boolean
|
||||
Optional CveColectiva As Integer = -1, Optional MetodoPago As Integer = -1, Optional CveSubProyectoEntrega As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OC_OrdenesCompraAdd")
|
||||
@@ -754,6 +754,7 @@ Public Class ClsOC
|
||||
.Add("@NumRemision", SqlDbType.VarChar).Value = NumRemision
|
||||
.Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva
|
||||
.Add("@MetodoPago", SqlDbType.Int).Value = MetodoPago ' 0 Contado, 1 Credito
|
||||
.Add("@CveSubProyectoEntrega", SqlDbType.Int).Value = CveSubProyectoEntrega ' 0 Contado, 1 Credito
|
||||
|
||||
.Add("@vCveOrdenCompra", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@vFolio", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
@@ -917,7 +918,8 @@ Public Class ClsOC
|
||||
pCveProveedor As Integer, pCveOrdenCompra As Integer, pCveUsuarioModifico As Integer, Optional CveCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PrioridadObservacion As String = "",
|
||||
Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional IDPoliza As Integer = -1, Optional FechaExpiracion As Date = Nothing, Optional FolioAdicional As String = "",
|
||||
Optional EntregaDirecta As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional Guia As String = "-1", Optional IEPS As Decimal = -1, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1",
|
||||
Optional pCveProveedorSucursal As Integer = -1, Optional CveProveedorContacto As Integer = -1, Optional PorcentajeIVA As Decimal = 0.16D, Optional NumRemision As String = "-1", Optional MetodoPago As Integer = -1) As Boolean
|
||||
Optional pCveProveedorSucursal As Integer = -1, Optional CveProveedorContacto As Integer = -1, Optional PorcentajeIVA As Decimal = 0.16D, Optional NumRemision As String = "-1", Optional MetodoPago As Integer = -1,
|
||||
Optional CveSubProyectoEntrega As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OC_OrdenesCompraUpdate")
|
||||
@@ -953,6 +955,8 @@ Public Class ClsOC
|
||||
.Add("@PorcentajeIVA", SqlDbType.SmallMoney).Value = PorcentajeIVA
|
||||
.Add("@NumRemision", SqlDbType.VarChar).Value = NumRemision
|
||||
.Add("@MetodoPago", SqlDbType.Int).Value = MetodoPago ' 0 Contado, 1 Credito
|
||||
.Add("@CveSubProyectoEntrega", SqlDbType.Int).Value = CveSubProyectoEntrega
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -7607,6 +7607,9 @@ Public Class ClsPaginas
|
||||
Dim bytes As Byte() = Nothing
|
||||
Dim CveEmpresaActual As Integer
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
|
||||
|
||||
Try
|
||||
Dim DtDetalle As DataTable = Nothing
|
||||
Dim ObjOC As New ClsOC
|
||||
@@ -7632,8 +7635,81 @@ Public Class ClsPaginas
|
||||
DtDetalle = ObjOC.DtResultados
|
||||
End If
|
||||
|
||||
'Obtenemos la sucursal de la OC PARA COMPU PROVEEDORES
|
||||
Dim DomicilioSucursal As String = ""
|
||||
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\OC.rdlc", EmpresaActual.Ruta))
|
||||
|
||||
If Not Archivo.Exists Then
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
If Imagen.Exists Then ''POR EMPRESA
|
||||
params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}"))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If Not Archivo.Exists Or (UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.CveEmpresa = 197) Then
|
||||
|
||||
Dim SBDomicilioSucursal As New StringBuilder()
|
||||
Dim CiudadSucursal As String = ""
|
||||
Dim ObjClientes As New ClsClientes
|
||||
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC))
|
||||
|
||||
If ObjOC.GetSucursalOC(ObjOC.CveOrdenCompra) AndAlso ObjOC.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
params.Add(New ReportParameter("Proyecto", ObjOC.SucSubProyecto.ToString))
|
||||
params.Add(New ReportParameter("Telefono", ObjOC.SucTelefono.ToString))
|
||||
|
||||
CiudadSucursal = String.Format("{0},{1}", ObjOC.SucMunicipio, ObjOC.SucEstado)
|
||||
|
||||
SBDomicilioSucursal.AppendFormat("{0}", ObjOC.SucCalle)
|
||||
If ObjOC.SucNoExt.Length > 0 Then SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", ObjOC.SucNoExt)
|
||||
If ObjOC.SucNoInt.Length > 0 Then SBDomicilioSucursal.AppendFormat(", No.Int: {0}", ObjOC.SucNoInt)
|
||||
If ObjOC.SucColonia.Length > 0 Then SBDomicilioSucursal.AppendFormat(", Col: {0}", ObjOC.SucColonia)
|
||||
If ObjOC.SucCP.Length > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", ObjOC.SucCP)
|
||||
If CiudadSucursal.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
|
||||
If ObjOC.SucPais.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", ObjOC.SucPais)
|
||||
|
||||
DomicilioSucursal = SBDomicilioSucursal.ToString
|
||||
|
||||
|
||||
Dim DirecconSubProyectoEntrega As String = ""
|
||||
Dim CveSubProyectoEntrega As Integer = dtOC(0)("CveSubProyectoEntrega").ToString.ToEntero
|
||||
|
||||
If CveSubProyectoEntrega > 0 Then
|
||||
|
||||
Dim DTSubProyectoEntrega As DataTable = GlobalDTSubProyectos(-1, CveSubProyectoEntrega)
|
||||
|
||||
params.Add(New ReportParameter("SubProyectoEntrega", DTSubProyectoEntrega(0)("SubProyecto").ToString))
|
||||
|
||||
Dim SubProyectoEntregaDir As String = $"Calle {DTSubProyectoEntrega(0)("Calle").ToString}"
|
||||
SubProyectoEntregaDir = $"{SubProyectoEntregaDir} No. {DTSubProyectoEntrega(0)("NoExt").ToString()}"
|
||||
|
||||
If DTSubProyectoEntrega(0)("NoInt").ToString().Trim.Length > 0 Then
|
||||
SubProyectoEntregaDir = $"{SubProyectoEntregaDir} No. int.{DTSubProyectoEntrega(0)("NoInt").ToString()}"
|
||||
End If
|
||||
|
||||
SubProyectoEntregaDir = $"{SubProyectoEntregaDir}{vbCrLf}"
|
||||
|
||||
SubProyectoEntregaDir = $"{SubProyectoEntregaDir}{DTSubProyectoEntrega(0)("Colonia").ToString()} C.P. {DTSubProyectoEntrega(0)("CP").ToString()}{vbCrLf}"
|
||||
SubProyectoEntregaDir = $"{SubProyectoEntregaDir}{DTSubProyectoEntrega(0)("Municipio").ToString()},{DTSubProyectoEntrega(0)("Estado").ToString()}{vbCrLf}Tel. { DTSubProyectoEntrega(0)("Telefono").ToString()}"
|
||||
|
||||
params.Add(New ReportParameter("SubProyectoEntregaDir", SubProyectoEntregaDir))
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Dim CveUsuarioSol As Integer = dtOC(0)("CveUsuarioSolicito").ToString.ToEntero
|
||||
Dim CveUsuarioAut As Integer = dtOC(0)("CveUsuarioAutorizo").ToString.ToEntero
|
||||
Dim drSol As DataRow = GlobalDTUsuarios(CveUsuarioSol, EmpresaActual.CveEmpresa).FiltroPrimero("") 'DataRow (incluye el NOMBRE de quien SOLICITÓ la OC)
|
||||
@@ -7659,10 +7735,11 @@ Public Class ClsPaginas
|
||||
End If
|
||||
|
||||
Dim nombreautorizo As String = dtOC(0)("UsuarioAutorizo").ToString
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\OC.rdlc", EmpresaActual.Ruta))
|
||||
|
||||
If Not Archivo.Exists OrElse EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 13, 72, 80, 83, 122, 126, 158) Then
|
||||
params.Add(New ReportParameter("Descuento", DtDetalle.SUM("Descuento").ToString.FormatoNumero(2)))
|
||||
End If
|
||||
|
||||
'DATOS PARA DESCUENTO
|
||||
If EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 13, 72, 80, 83, 119, 122, 126, 158) Then 'EMPRESAS QUE YA TIENEN EL AJUSTE EN EL FORMATO
|
||||
params.Add(New ReportParameter("SubTotal", ObjOC.SubTotal.ToString))
|
||||
@@ -7710,7 +7787,7 @@ Public Class ClsPaginas
|
||||
params.Add(New ReportParameter("TipoOC", If(ObjOC.Tipo = "OC", "Orden de Compra", "Requisición")))
|
||||
params.Add(New ReportParameter("UsoCFDI", ObjOC.UsoCFDI))
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 172) Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 172) Or (UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.CveEmpresa = 197) Then
|
||||
params.Add(New ReportParameter("FolioAdicional", dtOC(0)("FolioAdicional").ToString))
|
||||
params.Add(New ReportParameter("Vendedor", dtOC(0)("Vendedor").ToString))
|
||||
params.Add(New ReportParameter("Observacion", dtOC(0)("PrioridadObservacion").ToString))
|
||||
@@ -7723,6 +7800,7 @@ Public Class ClsPaginas
|
||||
params.Add(New ReportParameter("ProveedorContacto", ObjOC.ProveedorContacto))
|
||||
params.Add(New ReportParameter("Comprador", ObjOC.UsuarioAsignado))
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
'Dim ObjCuentasBancos As New ClsGenerales()
|
||||
'If ObjCuentasBancos.GetCuentasDepositos(CveProveedor:=ObjOC.CveProveedor) Then
|
||||
@@ -7737,6 +7815,7 @@ Public Class ClsPaginas
|
||||
'End If
|
||||
'ObjCuentasBancos.Dispose()
|
||||
End If
|
||||
|
||||
'params.Add(New ReportParameter("FechaOC", ObjOC.Fecha.ToShortDateString))
|
||||
Dim RutaFisicaSol As String = String.Format("Empresas\{0}\Firmas\{1}.png", EmpresaActual.CveEmpresa, CveUsuarioSol)
|
||||
Dim RutaVirtuaSol As String = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(RutaFisicaSol))
|
||||
@@ -7750,7 +7829,7 @@ Public Class ClsPaginas
|
||||
params.Add(New ReportParameter("FirmaAutorizo", If(FirmaAut.Exists, ImageToBase64(Drawing.Image.FromFile(FirmaAut.FullName), Drawing.Imaging.ImageFormat.Png), "")))
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.CveEmpresa = 197 Then
|
||||
If Not Archivo.Exists Or (UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.CveEmpresa = 197) Then
|
||||
|
||||
Dim ObjProveedor As New ClsCompProveedores
|
||||
If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, ObjOC.CveProveedor, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, EmpresaActual.CveEmpresa) Then
|
||||
|
||||
@@ -7,10 +7,21 @@
|
||||
.row {
|
||||
margin: 0 -10px;
|
||||
}
|
||||
.calendar-extender-popup {
|
||||
/*.calendar-extender-popup {
|
||||
position: absolute;
|
||||
z-index: 10000; /* Asegura que se muestre sobre otros elementos */
|
||||
z-index: 10000;*/ /* Asegura que se muestre sobre otros elementos */
|
||||
/*}*/
|
||||
|
||||
#C_CETxtFechaEmision_popupDiv{
|
||||
z-index: 10000; /* Asegura que el calendario se muestre sobre otros elementos */
|
||||
margin-top:-160px!important;
|
||||
position: absolute; /* Asegura que el calendario no desplace otros elementos */
|
||||
}
|
||||
#C_Calendario_popupDiv{
|
||||
z-index: 10000; /* Asegura que el calendario se muestre sobre otros elementos */
|
||||
margin-left:-50px!important;
|
||||
position: absolute; /* Asegura que el calendario no desplace otros elementos */
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
@@ -559,7 +570,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="METxtFechaEmision" runat="server" TargetControlID="TxtFechaEmision" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left" ></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CETxtFechaEmision" runat="server" TargetControlID="TxtFechaEmision" PopupButtonID="LnkImgTxtFechaEmision" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<ajax:CalendarExtender ID="CETxtFechaEmision" runat="server" TargetControlID="TxtFechaEmision" PopupButtonID="LnkImgTxtFechaEmision" PopupPosition="TopLeft" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtFechaEmision" runat="server" ControlToValidate="TxtFechaEmision" Display="None" ErrorMessage="El campo <b>''Fecha de Emisión''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVTxtFechaEmision" runat="server" ControlToValidate="TxtFechaEmision" Display="None" ErrorMessage="El campo <b>''Fecha de Emisión''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtFechaEmision" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
@@ -1112,7 +1112,7 @@ Partial Class Bancos_PopIEVentas
|
||||
|
||||
Dim FechaEmision As Date = MinFecha
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
If ChkComplementoPago.Checked AndAlso UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
FechaEmision = TxtFechaEmision.Text.ToDate
|
||||
|
||||
If FechaEmision <= MinFecha Then
|
||||
|
||||
@@ -20756,14 +20756,16 @@ Partial Class Compras_Compras
|
||||
Public Function ValidaPresupuesto(Opcion As Integer, Optional ValCveSubProyecto As Integer = -1, Optional ValSubProyecto As String = "", Optional ValCveClasificacion As Integer = -1, Optional ValClasificacion As String = "",
|
||||
Optional ValCveTipoGasto As Integer = -1, Optional ValTipoGasto As String = "", Optional ValImporte As Decimal = 0) As Boolean
|
||||
|
||||
|
||||
Dim respuesta As Boolean = False
|
||||
|
||||
If DdlTipoComprobante.SelectedValue <> "Fac" Then
|
||||
Return True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then
|
||||
|
||||
If Opcion = 1 Or OCVinculada Or DdlTipoComprobante.SelectedValue <> "Fac" Then
|
||||
Return True
|
||||
End If
|
||||
|
||||
Dim ObjCon As New ClsContratos
|
||||
Dim CvePresupuesto As Integer = 0
|
||||
Dim Autorizado As Double = 0
|
||||
|
||||
@@ -2053,7 +2053,7 @@
|
||||
<asp:UpdatePanel runat="server" ID="UpDocumentos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDocs" AutoGenerateColumns="false" runat="server" GridLines="none"
|
||||
DataKeyNames="CveDocumentacion,Documentacion,Orden,CveDocumentacionElectronica,Adjunto,Estatus,Observacion,Fecha,FechaIng,Usuario,FechaLimite,FechaVigencia,DiasLimite,AplicaDiasLimite,AplicaFechaVencimiento">
|
||||
DataKeyNames="CveDocumentacion,Documentacion,Orden,CveDocumentacionElectronica,Adjunto,Estatus,Observacion,Fecha,FechaIng,Usuario,FechaLimite,FechaVigencia,DiasLimite,AplicaDiasLimite,AplicaFechaVencimiento">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="60px">
|
||||
<ItemTemplate>
|
||||
@@ -2093,11 +2093,17 @@
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-upload' ></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="50px">
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="50px" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="ImgDownLoad" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkDownLoadDoc" CssClass="btn btn-circle btn-sm blue" OnClick="LnkDownLoadDoc_Click" runat="server"
|
||||
Text="<i class='fa fa-download' style='color:white' title='Descargar Documento'></i>" CausesValidation="False" Visible="false" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkGVEliminar" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="LnkGVEliminar_Click"
|
||||
|
||||
@@ -2526,6 +2526,8 @@ Partial Class Compras_Proveedores
|
||||
Dim AplicaDiasLimite As Boolean = If(e.Row.DataKey("AplicaDiasLimite").ToString = "1", True, False)
|
||||
Dim AplicaFechaVencimiento As Boolean = If(e.Row.DataKey("AplicaFechaVencimiento").ToString = "1", True, False)
|
||||
|
||||
Dim LnkDownLoadDoc As LinkButton = e.Row.FCLinkButton("LnkDownLoadDoc")
|
||||
|
||||
txtFechaLimite.Visible = If(AplicaDiasLimite, True, False)
|
||||
' txtFechaVigencia.Visible = If(AplicaFechaVencimiento, True, False)
|
||||
|
||||
@@ -2569,19 +2571,25 @@ Partial Class Compras_Proveedores
|
||||
Dim linkDescargaArchivo As String = UsuarioActual.Empresa.Ruta & "Edoc/Proveedor/" & CveProveedor & "/" & Adjunto
|
||||
|
||||
If File.Exists(linkDescargaArchivo) Then
|
||||
ImgDownLoad.Visible = True
|
||||
|
||||
If extencion.Length > 0 Then
|
||||
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CveDocumentacionElectronica & "." & extencion)
|
||||
Else
|
||||
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CveDocumentacionElectronica)
|
||||
End If
|
||||
'ImgDownLoad.Visible = True
|
||||
|
||||
LnkDownLoadDoc.Visible = True
|
||||
ScriptManager.GetCurrent(Me).RegisterPostBackControl(LnkDownLoadDoc)
|
||||
|
||||
'If extencion.Length > 0 Then
|
||||
' ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CveDocumentacionElectronica & "." & extencion)
|
||||
'Else
|
||||
' ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CveDocumentacionElectronica)
|
||||
'End If
|
||||
|
||||
|
||||
Else
|
||||
ImgDownLoad.Visible = False
|
||||
'ImgDownLoad.Visible = False
|
||||
End If
|
||||
|
||||
Else
|
||||
ImgDownLoad.Visible = False
|
||||
'ImgDownLoad.Visible = False
|
||||
End If
|
||||
|
||||
If requerido Then
|
||||
@@ -5835,6 +5843,28 @@ Partial Class Compras_Proveedores
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub LnkDownLoadDoc_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim Adjunto As String = GvRow.DataKey("Adjunto")
|
||||
|
||||
|
||||
Dim stringDescargaDocumento As String = UsuarioActual.Empresa.Ruta & String.Format("Edoc\\Proveedor\{0}\{1}", CveProveedor, Adjunto)
|
||||
|
||||
|
||||
Dim File As New FileInfo(stringDescargaDocumento)
|
||||
|
||||
If File.Exists Then
|
||||
Response.Clear()
|
||||
Response.AddHeader("Content-Disposition", "attachment; filename=" + File.Name)
|
||||
Response.AddHeader("Content-Length", File.Length.ToString())
|
||||
Response.ContentType = "text/octet-stream"
|
||||
Response.Flush()
|
||||
Response.TransmitFile(File.FullName)
|
||||
Response.End()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -552,22 +552,15 @@
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkObservaciones" runat="server" Text="Observaciones" Checked="false" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSubTotalPend" runat="server" Text=" SubTotal Pendiente" Checked="false" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkIVAPend" runat="server" Text=" IVA Pendiente" Checked="false" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkIEPSPend" runat="server" Text=" IEPS Pendiente" Checked="false" Visible="false" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkSubTotalPend" runat="server" Text=" SubTotal Pendiente" Checked="false" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkIVAPend" runat="server" Text=" IVA Pendiente" Checked="false" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkIEPSPend" runat="server" Text=" IEPS Pendiente" Checked="false" Visible="false" /></td>
|
||||
<td style="text-align: left;"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkIEPSP" runat="server" Text=" IEPS Pendiente" Checked="False" Visible="false" TextAlign="Right" />
|
||||
</td><td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkRetIVAPendiente" runat="server" Text=" Ret IVA Pendiente" Checked="False" TextAlign="Right" />
|
||||
</td><td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkRetISRPendiente" runat="server" Text=" Ret ISR Pendiente" Checked="False" TextAlign="Right" />
|
||||
</td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkIEPSP" runat="server" Text=" IEPS Pendiente" Checked="False" Visible="false" TextAlign="Right" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkRetIVAPendiente" runat="server" Text=" Ret IVA Pendiente" Checked="False" TextAlign="Right" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkRetISRPendiente" runat="server" Text=" Ret ISR Pendiente" Checked="False" TextAlign="Right" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@ Partial Class Contratos_RepPresupuestos
|
||||
Dim FechaInicio = If(IsDate(TxtFiltrosFechaInicio.Text), TxtFiltrosFechaInicio.Text.ToDate, MinFecha)
|
||||
Dim FechaFin = If(IsDate(TxtFiltrosFechaFin.Text), TxtFiltrosFechaFin.Text.ToDate, MaxFecha)
|
||||
Dim EsMensual = ChkMensual.Checked
|
||||
Dim TieneDatos As Boolean = False
|
||||
|
||||
If UsaComprometido Then
|
||||
thComprometido.Visible = True
|
||||
@@ -98,22 +99,39 @@ Partial Class Contratos_RepPresupuestos
|
||||
|
||||
If Not EsMensual Then
|
||||
Dim ObjPresupuestos As New ClsContratos
|
||||
If ObjPresupuestos.GetPresupuestosRep(-1, CveTipoGasto, Agrupador, FechaInicio, FechaFin, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlClasificacion.SelectedValue.ToEntero) Then
|
||||
|
||||
If ObjPresupuestos.GetPresupuestosRep(-1, CveTipoGasto, Agrupador, FechaInicio, FechaFin, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlClasificacion.SelectedValue.ToEntero) Then
|
||||
|
||||
If ObjPresupuestos.DtResultados IsNot Nothing AndAlso ObjPresupuestos.DtResultados.Rows.Count > 0 Then
|
||||
TieneDatos = True
|
||||
End If
|
||||
|
||||
DtPresupuestos = ObjPresupuestos.DtResultados
|
||||
GvDatos.DataSource = DtPresupuestos
|
||||
GvDatos.DataSource = DtPresupuestos
|
||||
|
||||
End If
|
||||
|
||||
ObjPresupuestos.Dispose()
|
||||
DivDatosMensual.Visible = False
|
||||
DivRepDatos.Visible = True
|
||||
DivIndicadores.Visible = True
|
||||
DivIndicadores.Visible = True
|
||||
|
||||
GvDatos.DataBind()
|
||||
GvDatos.HeaderRow.Cells(0).Text = If(Agrupador = 1, "Clasificación", "Centro de Costo")
|
||||
|
||||
If TieneDatos Then
|
||||
GvDatos.HeaderRow.Cells(0).Text = If(Agrupador = 1, "Clasificación", "Centro de Costo")
|
||||
End If
|
||||
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
Else
|
||||
Dim ObjPresupuestos As New ClsContratos
|
||||
If ObjPresupuestos.GetPresupuestosMensualRep(-1, CveTipoGasto, Agrupador, FechaInicio, FechaFin, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlClasificacion.SelectedValue.ToEntero) Then
|
||||
If ObjPresupuestos.GetPresupuestosMensualRep(-1, CveTipoGasto, Agrupador, FechaInicio, FechaFin, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlClasificacion.SelectedValue.ToEntero) Then
|
||||
|
||||
If ObjPresupuestos.DtResultados IsNot Nothing AndAlso ObjPresupuestos.DtResultados.Rows.Count > 0 Then
|
||||
TieneDatos = True
|
||||
End If
|
||||
|
||||
DtPresupuestos = ObjPresupuestos.DtResultados
|
||||
GvDatosMensual.DataSource = DtPresupuestos
|
||||
End If
|
||||
@@ -122,7 +140,10 @@ Partial Class Contratos_RepPresupuestos
|
||||
DivRepDatos.Visible = False
|
||||
DivIndicadores.Visible = False
|
||||
GvDatosMensual.DataBind()
|
||||
GvDatosMensual.HeaderRow.Cells(0).Text = If(Agrupador = 1, "Clasificación", "Centro de Costo")
|
||||
If TieneDatos Then
|
||||
GvDatosMensual.HeaderRow.Cells(0).Text = If(Agrupador = 1, "Clasificación", "Centro de Costo")
|
||||
End If
|
||||
|
||||
UpDatosMensual.Update()
|
||||
|
||||
End If
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
1966
Empresas/197/Formatos/Entradas.rdlc
Normal file
1966
Empresas/197/Formatos/Entradas.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
2928
Empresas/197/Formatos/OC.rdlc
Normal file
2928
Empresas/197/Formatos/OC.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
2805
Empresas/197/Formatos/RepCortes.rdlc
Normal file
2805
Empresas/197/Formatos/RepCortes.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Empresas/197/Logo.png
Normal file
BIN
Empresas/197/Logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 113 KiB |
File diff suppressed because it is too large
Load Diff
@@ -157,48 +157,42 @@
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="Upsaldar" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="row" runat="server" id="DvSaldar">
|
||||
<div class="col-md-1" style="text-align: left">Fecha:</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="TxtFecha" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkCortfecha" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEECortfecha" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEECortfecha" TargetControlID="TxtFecha" PopupButtonID="LnkCortfecha" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RfvCortfecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="VgGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoCortfecha" runat="server" HighlightCssClass="vco" TargetControlID="RfvCortfecha"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1" style="text-align: left">Centro Costo:</div>
|
||||
<div class="col-md-1" style="text-align: left">
|
||||
<asp:DropDownList ID="DdlSubProyectoSaldar" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1" style="text-align: left">Concepto:</div>
|
||||
<div class="col-md-1" style="text-align: left">
|
||||
<asp:TextBox ID="TxtConcepto" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvConcepto" runat="server" ControlToValidate="TxtConcepto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="VgGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoConcepto" runat="server" HighlightCssClass="vco" TargetControlID="RfvConcepto"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1" >
|
||||
<asp:Button ID="BtnSaldar" OnClick="BtnSaldar_Click" runat="server" Text="Saldar" CssClass="btn btn-primary" ValidationGroup="VgGuardar" />
|
||||
</div>
|
||||
|
||||
<div class="row" runat="server" id="DvSaldar" visible="false">
|
||||
<div class="col-md-1" style="text-align: left">Fecha:</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="TxtFecha" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkCortfecha" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEECortfecha" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEECortfecha" TargetControlID="TxtFecha" PopupButtonID="LnkCortfecha" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RfvCortfecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="VgGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoCortfecha" runat="server" HighlightCssClass="vco" TargetControlID="RfvCortfecha"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-1" style="text-align: left">Centro Costo:</div>
|
||||
<div class="col-md-1" style="text-align: left">
|
||||
<asp:DropDownList ID="DdlSubProyectoSaldar" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1" style="text-align: left">Concepto:</div>
|
||||
<div class="col-md-1" style="text-align: left">
|
||||
<asp:TextBox ID="TxtConcepto" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvConcepto" runat="server" ControlToValidate="TxtConcepto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="VgGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoConcepto" runat="server" HighlightCssClass="vco" TargetControlID="RfvConcepto"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<asp:Button ID="BtnSaldar" OnClick="BtnSaldar_Click" runat="server" Text="Saldar" CssClass="btn btn-primary" ValidationGroup="VgGuardar" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -206,7 +200,7 @@
|
||||
|
||||
|
||||
<ajax:TabContainer runat="server" ID="Tabs">
|
||||
<ajax:TabPanel ID="TabIndicadores" runat="server" HeaderText="Indicadores" ClientIDMode="Static">
|
||||
<ajax:TabPanel ID="TabIXC" runat="server" HeaderText="IXC" ClientIDMode="Static">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
|
||||
@@ -271,7 +265,8 @@
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpBodyTipoCambio" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:RadioButtonList runat="server" ID="RblTipoCambio" OnSelectedIndexChanged="RblTipoCambio_SelectedIndexChanged" AutoPostBack="true">
|
||||
|
||||
<%-- <asp:RadioButtonList runat="server" ID="RblTipoCambio" OnSelectedIndexChanged="RblTipoCambio_SelectedIndexChanged" AutoPostBack="true">
|
||||
<asp:ListItem Selected="true" Text="Moneda Original" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Dólares en Tipo Cambio de la Fecha Venta" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Tipo Cambio Especifico" Value="3"></asp:ListItem>
|
||||
@@ -279,13 +274,14 @@
|
||||
<div class="row" style="margin-left: 10px;" runat="server" id="LiEspecifico" visible="false">
|
||||
Especifico:
|
||||
<asp:TextBox ID="TxtEspecifico" runat="server" Width="55px" />
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnTipoCambio" runat="server" OnClick="BtnTipoCambio_Click" Text="Aceptar" class="btn btn-primary" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
<%-- <asp:Button ID="BtnTipoCambio" runat="server" OnClick="BtnTipoCambio_Click" Text="Aceptar" class="btn btn-primary" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,7 +9,7 @@ Partial Public Class General_SaldosMenores
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Private Property DtDatosIXC As DataTable
|
||||
Get
|
||||
Return DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
@@ -61,6 +61,114 @@ Partial Public Class General_SaldosMenores
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
|
||||
DvSaldar.Visible = False
|
||||
|
||||
If Tabs.ActiveTab Is TabIXC Then
|
||||
CargaDatosIXC()
|
||||
If DtDatosIXC.Rows.Count > 0 Then
|
||||
DvSaldar.Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Upsaldar.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnSaldar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
If Tabs.ActiveTab Is TabIXC Then
|
||||
Dim ObjConta As New ClsContabilidad()
|
||||
ObjConta.IniciaTransacSQL()
|
||||
Dim CvePrePoliza As Integer = 0, CveVenta As Integer = -1, CveIE As Integer = -1
|
||||
Dim Saldo As Decimal = 0
|
||||
Dim SaldoAdmin As Decimal = 0
|
||||
Dim ImporteTotalGasto As Decimal = 0
|
||||
Dim MsgError As String = ""
|
||||
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepNCXAplicar", 6, 0, 0, 1, TxtFecha.Text.ToDate(), TxtConcepto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 3)
|
||||
Dim tMovto As Boolean = True
|
||||
Dim tConceptoSaldar As Integer = 78
|
||||
|
||||
If CvePrePoliza > 0 Then
|
||||
For Each Gv As GridViewRow In GvDatosIXC.Rows
|
||||
Dim ConPreP As New ConceptosTipoSaldo()
|
||||
|
||||
If Gv.FCCheckBox("Chk").Checked Then
|
||||
|
||||
If Gv.DataKey("CveVenta").ToEntero > 0 Then
|
||||
ConPreP = ClsPaginas.ObtenerCveConceptoPrePoliza(6, Gv.DataKey("CveMoneda").ToEntero(), False, 2)
|
||||
ElseIf Gv.DataKey("CveIE").ToEntero > 0 Then
|
||||
ConPreP.CveConcepto = 3
|
||||
End If
|
||||
|
||||
'If Tipo = 1 OrElse Tipo = 2 Then
|
||||
If Gv.DataKey("CveVenta").ToEntero() > 0 Then
|
||||
CveVenta = Gv.DataKey("CveVenta").ToEntero()
|
||||
Saldo = -Gv.DataKey("Saldo").ToDecimal()
|
||||
SaldoAdmin = Saldo
|
||||
|
||||
ElseIf Gv.DataKey("CveIE").ToEntero() > 0 Then
|
||||
'ElseIf Tipo = 3 Then
|
||||
ConPreP = ClsPaginas.ObtenerCveConceptoPrePoliza(18, Gv.DataKey("CveMoneda").ToEntero(), True, 2)
|
||||
CveIE = Gv.DataKey("CveIE").ToEntero()
|
||||
Saldo = Gv.DataKey("Saldo").ToDecimal()
|
||||
SaldoAdmin = Saldo
|
||||
End If
|
||||
|
||||
Saldo = -Saldo ' invertimos el saldo para que se haga negativo para que sea Abono
|
||||
|
||||
ImporteTotalGasto += Saldo
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tMovto, SaldoAdmin, Saldo, ConPreP.CveConcepto, Gv.DataKey("SerieFolio").ToString(), TxtConcepto.Text, CveIE, CveVenta, CveCliente:=Gv.DataKey("CveCliente").ToEntero()) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If Gv.DataKey("CveMoneda").ToEntero() > 1 Then
|
||||
Dim ImporteMN As Decimal = (Saldo * Gv.DataKey("TipoCambio").ToDecimal() - Saldo).RoundSQL()
|
||||
ImporteTotalGasto += ImporteMN
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tMovto, Saldo, ImporteMN, ConPreP.CveConceptoComplementario, Gv.DataKey("SerieFolio").ToString(), TxtConcepto.Text, CveIE, CveVenta, CveCliente:=Gv.DataKey("CveCliente").ToEntero(), ImporteME:=Saldo, TipoCambio:=Gv.DataKey("TipoCambio").ToDecimal()) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If ImporteTotalGasto <> 0 Then
|
||||
ImporteTotalGasto *= -1 ' se invierte el valor, para cuadre de prepoliza
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tMovto, ImporteTotalGasto, ImporteTotalGasto, tConceptoSaldar, "", TxtConcepto.Text, CveIE, CveVenta, CveSubProyecto:=DdlSubProyectoSaldar.SelectedValue.ToEntero()) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
Else
|
||||
MsgError = "Poliza no insertada"
|
||||
End If
|
||||
End If
|
||||
|
||||
If MsgError = "" Then
|
||||
ObjConta.Commit()
|
||||
Dim Msg As String = "Los movimientos se saldaron correctamente."
|
||||
Msg &= $"<br/><br/><a Class='Texto' target='_blank' href='/Contabilidad/RegPrePolizaS.aspx?CvePrePoliza={CvePrePoliza}'>Ver Póliza</a> "
|
||||
Alert(Msg)
|
||||
Else
|
||||
ObjConta.RollBack()
|
||||
Alert(MsgError, ModExtensiones.TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
CargaDatosIXC()
|
||||
ObjConta.Dispose()
|
||||
End If
|
||||
|
||||
|
||||
TxtFecha.Text = DateTime.Today.ToString()
|
||||
Upsaldar.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region "I X C"
|
||||
@@ -82,55 +190,45 @@ Partial Public Class General_SaldosMenores
|
||||
txtFechaF.Text = If(Request("FechaF") Is Nothing, NowADS().ToString(), Request("FechaF").ToString())
|
||||
TipoCambio = If(Request("TipoCambio") Is Nothing, 1, Request("TipoCambio").ToString().ToEntero())
|
||||
TCEspecifico = If(Request("TCEspecifico") Is Nothing, -1, Request("TCEspecifico").ToString().ToDouble())
|
||||
RblTipoCambio.SelectedValue = TipoCambio.ToString()
|
||||
LiEspecifico.InnerText = TCEspecifico.FormatoNumero()
|
||||
'RblTipoCambio.SelectedValue = TipoCambio.ToString()
|
||||
'LiEspecifico.InnerText = TCEspecifico.FormatoNumero()
|
||||
|
||||
Dim FechaICorte As DateTime
|
||||
FechaICorte = If(Request("FechaICorte") Is Nothing, DateTime.MinValue, Request("FechaICorte").ToString().ToDate())
|
||||
CargaDatos()
|
||||
|
||||
Tipo = -1
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub CargaSucursales()
|
||||
'DdlSucursal.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa)
|
||||
'DdlSucursal.DataBind()
|
||||
'DdlSucursal.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
'DdlSucursal.SelectedValue = "-1"
|
||||
|
||||
DdlSubProyectoSaldar.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa)
|
||||
DdlSubProyectoSaldar.DataBind()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
'Protected Sub CargaVendedores()
|
||||
' DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
||||
' DdlVendedor.DataBind()
|
||||
' DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
'End Sub
|
||||
|
||||
Protected Sub CargaDatos()
|
||||
If TipoCambio = 3 AndAlso TxtEspecifico.Text <> "" Then
|
||||
TCEspecifico = TxtEspecifico.Text.ToDouble()
|
||||
Else
|
||||
TCEspecifico = -1
|
||||
End If
|
||||
|
||||
If TipoCambio <> 1 Then
|
||||
CveMoneda = -1
|
||||
End If
|
||||
Protected Sub CargaDatosIXC()
|
||||
|
||||
|
||||
|
||||
|
||||
'If TipoCambio = 3 AndAlso TxtEspecifico.Text <> "" Then
|
||||
' TCEspecifico = TxtEspecifico.Text.ToDouble()
|
||||
'Else
|
||||
' TCEspecifico = -1
|
||||
'End If
|
||||
|
||||
'If TipoCambio <> 1 Then
|
||||
' CveMoneda = -1
|
||||
'End If
|
||||
|
||||
Dim FechaICorte As DateTime = MinFecha
|
||||
'If TxtFechaICorte.Text <> "" Then
|
||||
' FechaICorte = TxtFechaICorte.Text.ToDate()
|
||||
'Else
|
||||
' FechaICorte = DateTime.MinValue
|
||||
'End If
|
||||
|
||||
Dim FechaFCorte As DateTime = MaxFecha
|
||||
'If TxtFechaFCorte.Text <> "" Then
|
||||
' FechaFCorte = TxtFechaFCorte.Text.ToDate()
|
||||
'Else
|
||||
' FechaFCorte = DateTime.MaxValue
|
||||
'End If
|
||||
|
||||
|
||||
Dim ObjVenta As New ClsVentas()
|
||||
Dim CveCliente As Integer = -1
|
||||
@@ -140,30 +238,18 @@ Partial Public Class General_SaldosMenores
|
||||
If ObjVenta.GetRepAnticiposNCIXCDetalle(CveCliente, -1, txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), UsuarioActual.CveEmpresa, 1, -1, CveMoneda, FechaICorte, FechaFCorte, TipoCambio, TCEspecifico,
|
||||
SaldoMayorA:=TxtSaldoMayorA.Text.ToDecimal, SaldoMenorA:=TxtSaldoMenorA.Text.ToDecimal) Then
|
||||
GvDatosIXC.DataSource = ObjVenta.DtResultados
|
||||
DtDatos = ObjVenta.DtResultados
|
||||
DtDatosIXC = ObjVenta.DtResultados
|
||||
End If
|
||||
|
||||
ObjVenta.Dispose()
|
||||
GvDatosIXC.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
'If TxtFechaFCorte.Text <> NowADS().ToShortDateString() AndAlso txtFechaI.Text <> "" Then
|
||||
' LnkHabilitarSaldar.Visible = False
|
||||
' LnkSaldar.Visible = False
|
||||
'Else
|
||||
'LnkHabilitarSaldar.Visible = True
|
||||
''End If
|
||||
|
||||
'If LnkSaldar.Visible Then
|
||||
' HabilitarCheckbox()
|
||||
'End If
|
||||
|
||||
Tipo = -1
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
|
||||
'GenerarPDF("EXCEL")
|
||||
@@ -173,80 +259,7 @@ Partial Public Class General_SaldosMenores
|
||||
'GenerarPDF("PDF")
|
||||
End Sub
|
||||
|
||||
'Protected Sub GenerarPDF(Opcion As String)
|
||||
' Dim FechaI As String
|
||||
' If txtFechaI.Text = "" OrElse txtFechaI.Text = "__/__/____" Then
|
||||
' FechaI = "-1"
|
||||
' Else
|
||||
' FechaI = $" <b>Fecha Inicial:</b> {txtFechaI.Text}"
|
||||
' End If
|
||||
|
||||
' Dim FechaF As String
|
||||
' If txtFechaF.Text = "" OrElse txtFechaF.Text = "__/__/____" Then
|
||||
' FechaF = "-1"
|
||||
' Else
|
||||
' FechaF = $" <b>Fecha Final:</b> {txtFechaF.Text}"
|
||||
' End If
|
||||
|
||||
' Dim FechaICorte As String
|
||||
' If TxtFechaICorte.Text = "" OrElse TxtFechaICorte.Text = "__/__/____" Then
|
||||
' FechaICorte = ""
|
||||
' Else
|
||||
' FechaICorte = $" <b>Fecha Inicial Corte:</b> {TxtFechaICorte.Text}"
|
||||
' End If
|
||||
|
||||
' Dim FechaFCorte As String
|
||||
' If TxtFechaFCorte.Text = "" OrElse TxtFechaFCorte.Text = "__/__/____" Then
|
||||
' FechaFCorte = ""
|
||||
' Else
|
||||
' FechaFCorte = $" <b>Fecha Final Corte:</b> {TxtFechaFCorte.Text}"
|
||||
' End If
|
||||
|
||||
' Dim Sucursal As String
|
||||
' If DdlSucursal.SelectedValue <> "-1" Then
|
||||
' Sucursal = $" <b>Sucursal:</b> {DdlSucursal.SelectedItem.Text}"
|
||||
' Else
|
||||
' Sucursal = ""
|
||||
' End If
|
||||
|
||||
' Dim Cliente As String = ""
|
||||
|
||||
' Dim ConSaldo As String
|
||||
' If DdlConSaldo.SelectedValue <> "-1" Then
|
||||
' ConSaldo = $" <b>Con Saldo:</b> {DdlConSaldo.SelectedItem.Text}"
|
||||
' Else
|
||||
' ConSaldo = ""
|
||||
' End If
|
||||
|
||||
' Dim Tipo2 As String
|
||||
' If DdlTipo.SelectedValue <> "-1" Then
|
||||
' Tipo2 = $" <b>Tipo:</b> {DdlTipo.SelectedItem.Text}"
|
||||
' Else
|
||||
' Tipo2 = ""
|
||||
' End If
|
||||
|
||||
' If DtDatos.Rows.Count > 0 Then
|
||||
' Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
' Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
' Dim para As New List(Of ReportParameter) From {
|
||||
' New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa),
|
||||
' New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre),
|
||||
' New ReportParameter("FechaImpresion", NowADS().ToString()),
|
||||
' New ReportParameter("Tipo", Tipo.ToString()),
|
||||
' New ReportParameter("AgrupadoPor", $"<b>Agrupado Por:</b> {Cliente}{Sucursal}{ConSaldo}{Tipo2}{FechaI}{FechaF}{FechaICorte}{FechaFCorte}")
|
||||
' }
|
||||
|
||||
' If Imagen.Exists Then
|
||||
' para.Add(New ReportParameter("LogoPath", logouri))
|
||||
' Else
|
||||
' para.Add(New ReportParameter("LogoPath", ""))
|
||||
' End If
|
||||
|
||||
' ImprimirPDF("Empresas/Grales/Formatos/RepAnt-NC-IXCDetalle.rdlc", DtDatos, para, "Reporte de Anticipos - NCXAplicar - IXC Detalle", Opcion)
|
||||
' Else
|
||||
' Alert("No hay datos consultados", ModExtensiones.TipoMensaje.MsgAdvertencia)
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
Protected Sub GvDatosIXC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosIXC.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -338,120 +351,10 @@ Partial Public Class General_SaldosMenores
|
||||
RegistraScript("$('#DivModalSaldar').modal();")
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnSaldar_Click(sender As Object, e As EventArgs) Handles BtnSaldar.Click
|
||||
Dim ObjConta As New ClsContabilidad()
|
||||
ObjConta.IniciaTransacSQL()
|
||||
Dim CvePrePoliza As Integer = 0, CveVenta As Integer = -1, CveIE As Integer = -1
|
||||
Dim Saldo As Decimal = 0
|
||||
Dim SaldoAdmin As Decimal = 0
|
||||
Dim ImporteTotalGasto As Decimal = 0
|
||||
Dim MsgError As String = ""
|
||||
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepNCXAplicar", 6, 0, 0, 1, TxtFecha.Text.ToDate(), TxtConcepto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 3)
|
||||
Dim tMovto As Boolean = True
|
||||
Dim tConceptoSaldar As Integer = 78
|
||||
|
||||
If CvePrePoliza > 0 Then
|
||||
For Each Gv As GridViewRow In GvDatosIXC.Rows
|
||||
Dim ConPreP As New ConceptosTipoSaldo()
|
||||
|
||||
If Gv.FCCheckBox("Chk").Checked Then
|
||||
If Tipo = 2 Then
|
||||
ConPreP = ClsPaginas.ObtenerCveConceptoPrePoliza(6, Gv.DataKey("CveMoneda").ToEntero(), False, 2)
|
||||
ElseIf Tipo = 1 Then
|
||||
ConPreP.CveConcepto = 3
|
||||
End If
|
||||
|
||||
'If Tipo = 1 OrElse Tipo = 2 Then
|
||||
If Gv.DataKey("CveVenta").ToEntero() > 0 Then
|
||||
CveVenta = Gv.DataKey("CveVenta").ToEntero()
|
||||
Saldo = -Gv.DataKey("Saldo").ToDecimal()
|
||||
SaldoAdmin = Saldo
|
||||
|
||||
ElseIf Gv.DataKey("CveIE").ToEntero() > 0 Then
|
||||
'ElseIf Tipo = 3 Then
|
||||
ConPreP = ClsPaginas.ObtenerCveConceptoPrePoliza(18, Gv.DataKey("CveMoneda").ToEntero(), True, 2)
|
||||
CveIE = Gv.DataKey("CveIE").ToEntero()
|
||||
Saldo = Gv.DataKey("Saldo").ToDecimal()
|
||||
SaldoAdmin = Saldo
|
||||
End If
|
||||
|
||||
Saldo = -Saldo ' invertimos el saldo para que se haga negativo para que sea Abono
|
||||
|
||||
ImporteTotalGasto += Saldo
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tMovto, SaldoAdmin, Saldo, ConPreP.CveConcepto, Gv.DataKey("SerieFolio").ToString(), TxtConcepto.Text, CveIE, CveVenta, CveCliente:=Gv.DataKey("CveCliente").ToEntero()) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If Gv.DataKey("CveMoneda").ToEntero() > 1 Then
|
||||
Dim ImporteMN As Decimal = (Saldo * Gv.DataKey("TipoCambio").ToDecimal() - Saldo).RoundSQL()
|
||||
ImporteTotalGasto += ImporteMN
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tMovto, Saldo, ImporteMN, ConPreP.CveConceptoComplementario, Gv.DataKey("SerieFolio").ToString(), TxtConcepto.Text, CveIE, CveVenta, CveCliente:=Gv.DataKey("CveCliente").ToEntero(), ImporteME:=Saldo, TipoCambio:=Gv.DataKey("TipoCambio").ToDecimal()) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If ImporteTotalGasto <> 0 Then
|
||||
ImporteTotalGasto *= -1 ' se invierte el valor, para cuadre de prepoliza
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tMovto, ImporteTotalGasto, ImporteTotalGasto, tConceptoSaldar, "", TxtConcepto.Text, CveIE, CveVenta, CveSubProyecto:=DdlSubProyectoSaldar.SelectedValue.ToEntero()) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
Else
|
||||
MsgError = "Poliza no insertada"
|
||||
End If
|
||||
End If
|
||||
|
||||
If MsgError = "" Then
|
||||
ObjConta.Commit()
|
||||
Dim Msg As String = "Los movimientos se saldaron correctamente."
|
||||
Msg &= $"<br/><br/><a Class='Texto' target='_blank' href='/Contabilidad/RegPrePolizaS.aspx?CvePrePoliza={CvePrePoliza}'>Ver Póliza</a> "
|
||||
Alert(Msg)
|
||||
Else
|
||||
ObjConta.RollBack()
|
||||
Alert(MsgError, ModExtensiones.TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
'LnkSaldar.Visible = False
|
||||
'LnkHabilitarSaldar.Visible = True
|
||||
CargaDatos()
|
||||
'UpLnkAgregar.Update()
|
||||
ObjConta.Dispose()
|
||||
'RegistraScript("$('#DivModalSaldar').modal('hide');")
|
||||
TxtFecha.Text = DateTime.Today.ToString()
|
||||
Upsaldar.Update()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "TIPO DE CAMBIO"
|
||||
|
||||
Protected Sub BtnTipoCambio_Click(sender As Object, e As EventArgs) Handles BtnTipoCambio.Click
|
||||
CargaDatos()
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivTipoCambio"))
|
||||
End Sub
|
||||
|
||||
Protected Sub RblTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipoCambio.SelectedIndexChanged
|
||||
TipoCambio = RblTipoCambio.SelectedValue.ToEntero()
|
||||
|
||||
If TipoCambio = 3 Then
|
||||
LiEspecifico.Visible = True
|
||||
TCEspecifico = GlobalTipoCambio(NowADS()).ToString().ToDouble()
|
||||
TxtEspecifico.Text = TCEspecifico.ToString()
|
||||
Else
|
||||
LiEspecifico.Visible = False
|
||||
End If
|
||||
|
||||
UpBodyTipoCambio.Update()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -15,14 +15,14 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property CveVentaAD As Integer
|
||||
Get
|
||||
Return CType(ViewState("CveVentaAD"), Integer)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveVentaAD") = value
|
||||
End Set
|
||||
End Property
|
||||
'Private Property CveVentaAD As Integer
|
||||
' Get
|
||||
' Return CType(ViewState("CveVentaAD"), Integer)
|
||||
' End Get
|
||||
' Set(value As Integer)
|
||||
' ViewState("CveVentaAD") = value
|
||||
' End Set
|
||||
'End Property
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtDatos"), DataTable)
|
||||
@@ -468,14 +468,14 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
#Region " CARGA PARAMETROS - EXCLUSIVO USO AD "
|
||||
Private Sub CargaParametrosAD()
|
||||
|
||||
CveVentaAD = -1
|
||||
'CveVentaAD = -1
|
||||
|
||||
'If UsuarioActual.CveUsuario <> 100 Then
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
If Not IsNothing(Request("CveVenta")) AndAlso IsNumeric(Request("CveVenta")) Then
|
||||
CveVentaAD = Request("CveVenta").ToEntero()
|
||||
'CveVentaAD = Request("CveVenta").ToEntero()
|
||||
CargaVentaPorSurtir(Request("CveVenta").ToEntero())
|
||||
'LbSurtida.Visible = True
|
||||
'LbSurtida.Text = "SOLO MODO VISUAL"
|
||||
@@ -611,7 +611,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
Dim CveOS As Integer = GvRow.DataKey("CveOS").ToEntero
|
||||
|
||||
CveVentaAD = -1
|
||||
'CveVentaAD = -1
|
||||
|
||||
If Boton.CommandArgument.ToEntero() > 0 Then
|
||||
TimmerRefresh.Enabled = False
|
||||
@@ -634,7 +634,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
End Sub
|
||||
Protected Sub BtnBuscar_Click(sender As Object, e As EventArgs)
|
||||
CveVentaAD = -2
|
||||
'CveVentaAD = -2
|
||||
CargaVentaPorSurtir(DdlFolio.SelectedValue.ToEntero())
|
||||
End Sub
|
||||
Private Sub CargaVentaPorSurtir(CveVenta As Integer, Optional CveAlmacen As Integer = -1, Optional CveOS As Integer = -1)
|
||||
@@ -692,7 +692,8 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
EsDevolucionVenta = drE("EsDevolucionVenta").ToString().ToEntero()
|
||||
TipoDocto = DtDatos.Rows(0)("TipoDocto").ToString()
|
||||
TipoMovimiento = If(TipoDocto.Contiene({"Rem", "Ped", "Ing", "Ped", "PeC", "Ant"}) And (EsDevolucionVenta = 0 Or CveVentaAD > 0), 1, 2)
|
||||
'TipoMovimiento = If(TipoDocto.Contiene({"Rem", "Ped", "Ing", "Ped", "PeC", "Ant"}) And (EsDevolucionVenta = 0 Or CveVentaAD > 0), 1, 2)
|
||||
TipoMovimiento = If(TipoDocto.Contiene({"Rem", "Ped", "Ing", "Ped", "PeC", "Ant"}) And (EsDevolucionVenta = 0), 1, 2)
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 AndAlso TipoDocto.Contiene("Ped", "Ing") Then
|
||||
TxtObservaciones.Text = $"Dr. {drE("Medico").ToString}{vbCrLf}Cx. {drE("Procedimiento").ToString}{vbCrLf}F. Cirugía {drE("FechaParaSurtir").ToString.ToDateTime.ToString("dd/MM/yyyy HH:mm")}{vbCrLf}H. {drE("Sucursal").ToString}{vbCrLf}"
|
||||
@@ -2098,18 +2099,23 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Dim ValidaSalidaCompleta As Boolean = Not (EsDevolucionVenta = 1 And TipoDocto.Contiene("Rem", "Ped"))
|
||||
'LIMITAR EL NUMERO DE PARTIDAS QUE SE PUEDEN ENTREGAR
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||
'SI EL CLIENTE ES OPERADORA DE HOSPITALES ANGELES SOLO SE PUEDEN RECIBIR MAXIMO 5
|
||||
If CveCliente = 819998 And Not EsDevolucionVenta = 1 Then
|
||||
If NumRegistros > 5 Then
|
||||
Alert("Solo se pueden recibir máximo 5 partidas.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
Else
|
||||
If NumRegistros > 10 Then
|
||||
Alert("Solo se pueden recibir máximo 10 partidas.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
|
||||
'SoloNumeros entrega
|
||||
'SI EL CLIENTE ES OPERADORA DE HOSPITALES ANGELES SOLO SE PUEDEN RECIBIR MAXIMO 9
|
||||
If Not EsDevolucionVenta = 1 Then
|
||||
If CveCliente = 819998 Then
|
||||
If NumRegistros > 9 Then
|
||||
Alert("Solo se pueden recibir máximo 9 partidas.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
Else
|
||||
If NumRegistros > 10 Then
|
||||
Alert("Solo se pueden recibir máximo 10 partidas.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
ValidaSalidaCompleta = False
|
||||
End If
|
||||
|
||||
|
||||
@@ -272,7 +272,11 @@
|
||||
</div>
|
||||
<label class="col-md-2" runat="server" id="DivLugarEntrega1">Lugar Entrega:</label>
|
||||
<div class="col-md-4" runat="server" id="DivLugarEntrega2">
|
||||
<asp:TextBox ID="txtLugarEntrega" runat="server" MaxLength="100" Width="100%"></asp:TextBox>
|
||||
<asp:CheckBox runat="server" ID="chkSubProyectoEntrega" Visible="false" AutoPostBack="true" OnCheckedChanged="chkSubProyectoEntrega_CheckedChanged" />
|
||||
<asp:DropDownList ID="DdlSubProyectoEntrega" CssClass=" form-control input-sm select2me" runat="server" DataTextField="SubProyecto" Style="width: 80%;" DataValueField="CveSubProyecto" Visible="false" >
|
||||
<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:TextBox ID="txtLugarEntrega" runat="server" MaxLength="100" Width="80%"></asp:TextBox>
|
||||
</div>
|
||||
<div class="row" runat="server" visible="False" id="TrCancelacion">
|
||||
<label class="col-md-2">Cancelacion:</label>
|
||||
|
||||
@@ -629,6 +629,8 @@ Partial Class OC_OC
|
||||
TxtFecha.Enabled = False
|
||||
End If
|
||||
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyectoEntrega, Nothing, Nothing, "Seleccione")
|
||||
|
||||
'CARGA YA REGISTRADO
|
||||
If Request("OC") IsNot Nothing AndAlso IsNumeric(Request("OC")) AndAlso Request("OC").ToEntero > 0 Then
|
||||
|
||||
@@ -831,14 +833,21 @@ Partial Class OC_OC
|
||||
' aqui tiene otras condiciones especiales
|
||||
If CveOrdenCompra <> Nothing AndAlso CveOrdenCompra > 0 Then
|
||||
DdlSubProyecto.DataSource = DtEstatusUsuarios.FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"})
|
||||
'DdlSubProyectoEntrega.DataSource = DtEstatusUsuarios.FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"})
|
||||
Else
|
||||
DdlSubProyecto.DataSource = DtEstatusUsuarios.FiltraParametros(" SPEstatus = 1 ", "", {"CveSubProyecto", "SubProyecto"})
|
||||
'DdlSubProyectoEntrega.DataSource = DtEstatusUsuarios.FiltraParametros(" SPEstatus = 1 ", "", {"CveSubProyecto", "SubProyecto"})
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
'DdlSubProyectoEntrega.DataBind()
|
||||
'DdlSubProyectoEntrega.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlSubProyectoContrato.Items.Clear()
|
||||
DdlSubProyectoContrato.DataSource = DtEstatusUsuarios.FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"}) 'If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, CveEmpresaActual, -1, 1), GlobalDTSubProyectos(-1, -1, CveEmpresaActual, 1)) ' DtEstatusUsuarios.FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"})
|
||||
DdlSubProyectoContrato.DataBind()
|
||||
@@ -933,6 +942,11 @@ Partial Class OC_OC
|
||||
' End If
|
||||
'End If
|
||||
|
||||
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
chkSubProyectoEntrega.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
MostrarUsuarioAsignado()
|
||||
@@ -1359,6 +1373,19 @@ Partial Class OC_OC
|
||||
TieneInventario = CBool(objOC.DtResultados.Rows(0)("TieneInvOC"))
|
||||
DdlMetodoPago.SelectedValueExist(objOC.DtResultados.Rows(0)("MetodoPago"))
|
||||
|
||||
|
||||
If objOC.DtResultados.Rows(0)("CveSubProyectoEntrega").ToString.ToEntero > 0 Then
|
||||
DdlSubProyectoEntrega.SelectedValueExist(objOC.DtResultados.Rows(0)("CveSubProyectoEntrega").ToString)
|
||||
txtLugarEntrega.Visible = False
|
||||
chkSubProyectoEntrega.Checked = True
|
||||
DdlSubProyectoEntrega.Visible = True
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'PROMOCIONES
|
||||
TxtPromocion.Text = objOC.Promocion
|
||||
ChkPromocion.Checked = TxtPromocion.Text.Trim.Length > 0
|
||||
@@ -1593,6 +1620,9 @@ Partial Class OC_OC
|
||||
EditarOC = False
|
||||
End Select
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
'If objOC.TipoTermino = 2 Then
|
||||
@@ -2609,6 +2639,11 @@ Partial Class OC_OC
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If chkSubProyectoEntrega.Checked AndAlso DdlSubProyectoEntrega.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("Debe seleccionar un lugar de entrega", TipoMensaje.MsgAdvertencia)
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
|
||||
Return TieneError
|
||||
End Function
|
||||
@@ -2698,7 +2733,8 @@ Partial Class OC_OC
|
||||
LugarEntrega, UsuarioActual.CveUsuario, CveEmpresaActual, GvD.Rows(0).FCHiddenField("HdnCvePresupuestoEgreso").Value.ToString.ToEntero, pCveProveedor:=CveProveedor, pCveProveedorSucursal:=CveProveedorSucursal,
|
||||
RequiereCotizacion:=ChkCotizacion.Checked, CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text, PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal,
|
||||
RetISR:=TxtRetISR.Text.ToDecimal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), Guia:=TxtGuia.Text.Trim,
|
||||
IEPS:=TxtIEPS.Text.ToDecimal, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, Promocion:=Promocion, CveProveedorContacto:=CveProveedorContacto, NumRemision:=TxtNumRemision.Text.Trim(), MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero()) Then
|
||||
IEPS:=TxtIEPS.Text.ToDecimal, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, Promocion:=Promocion, CveProveedorContacto:=CveProveedorContacto, NumRemision:=TxtNumRemision.Text.Trim(), MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero(),
|
||||
CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero) Then
|
||||
|
||||
CveOrdenCompraPadre = OC.CveOrdenCompra
|
||||
If CveOrdenCompraPadre > 0 Then
|
||||
@@ -2739,7 +2775,7 @@ Partial Class OC_OC
|
||||
RequiereCotizacion:=ChkCotizacion.Checked, CveUsuarioAsignado:=DdlUsuariosAsignado.SelectedValue.ToEntero, CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text,
|
||||
PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1),
|
||||
CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), Guia:=TxtGuia.Text.Trim, IEPS:=TxtIEPS.Text.ToDecimal, CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=ImporteAnticipos, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero,
|
||||
Promocion:=Promocion, CveProveedorContacto:=CveProveedorContacto, NumRemision:=TxtNumRemision.Text, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero()) Then
|
||||
Promocion:=Promocion, CveProveedorContacto:=CveProveedorContacto, NumRemision:=TxtNumRemision.Text, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero(), CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero) Then
|
||||
CveOrdenCompra = OC.CveOrdenCompra
|
||||
CveEstatus = CboE.SelectedValue.ToEntero
|
||||
|
||||
@@ -2926,7 +2962,7 @@ Partial Class OC_OC
|
||||
LugarEntrega, DdlMoneda.SelectedValue.ToEntero, CveProveedor, CveOrdenCompra, UsuarioActual.CveUsuario, Ddlcliente.txtValue.Value.ToEntero,
|
||||
DdlVendedor.SelectedValue.ToEntero, txtobsprioridad.Text, IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1),
|
||||
Guia:=TxtGuia.Text.Trim, IEPS:=TxtIEPS.Text.ToDecimal, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, Promocion:=Promocion, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveProveedorContacto:=CveProveedorContacto,
|
||||
PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), NumRemision:=TxtNumRemision.Text, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero()) Then
|
||||
PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), NumRemision:=TxtNumRemision.Text, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero(), CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero) Then
|
||||
If CveProveedorOriginal <> CveProveedor Then
|
||||
If Not ObjConta.UpdateProveedorPoliza(CveOrdenCompra, CveProveedor, Proveedor) Then
|
||||
TieneError = True
|
||||
@@ -3396,8 +3432,9 @@ Partial Class OC_OC
|
||||
If (Not HuboError) AndAlso objOrdenCompra.AddOrdenCompra("OC", -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CveEstatusInicialOC, TxtFechaEstimadaEntrega.Text, LugarEntrega,
|
||||
CveUsuario, CveEmpresaActual, 0, pCveProveedor:=CveProveedor, CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text,
|
||||
PorcentajeIVA:=PorIVA, IVA:=IVACot, RetIVA:=RetIVA.ToString.ToDecimal, RetISR:=RetISR.ToString.ToDecimal, IDPoliza:=IdPoliza, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text,
|
||||
EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal,
|
||||
CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=ImporteAnticipos, Promocion:=Promocion, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, NumRemision:=TxtNumRemision.Text.Trim, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero()) Then
|
||||
EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal,
|
||||
CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=ImporteAnticipos, Promocion:=Promocion, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, NumRemision:=TxtNumRemision.Text.Trim, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero(),
|
||||
CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero) Then
|
||||
|
||||
'CREA POLIZA POR CADA PROVEEDOR
|
||||
|
||||
@@ -3473,7 +3510,7 @@ Partial Class OC_OC
|
||||
CveUsuario, CveEmpresaActual, 0, pCveProveedor:=DdlProveedores.SelectedValue.ToEntero, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveUsuarioAsignado:=DdlUsuariosAsignado.SelectedValue.ToEntero(), CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text,
|
||||
PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, IDPoliza:=IDPolizaPresupuestal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text,
|
||||
EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal, CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=ImporteAnticipos, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero,
|
||||
Promocion:=Promocion, NumRemision:=TxtNumRemision.Text.Trim, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero()) Then
|
||||
Promocion:=Promocion, NumRemision:=TxtNumRemision.Text.Trim, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero(), CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero) Then
|
||||
|
||||
|
||||
'USA AC
|
||||
@@ -9221,5 +9258,13 @@ Partial Class OC_OC
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub chkSubProyectoEntrega_CheckedChanged(sender As Object, e As EventArgs)
|
||||
|
||||
DdlSubProyectoEntrega.Visible = chkSubProyectoEntrega.Checked
|
||||
txtLugarEntrega.Visible = Not chkSubProyectoEntrega.Checked
|
||||
UPPEmp.Update()
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
@@ -229,9 +229,16 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="60px" HeaderText="Hora Servicio">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlHoraServicio" runat="server" Visible="false" Text='<%# Eval("HoraCita", "{0:t}")%>'> ></asp:Literal>
|
||||
<cc1:TimeSelector ID="TimeSelector" runat="server" DisplaySeconds="false" DisplayButtons="false" Visible="false" SelectedTimeFormat="TwentyFour" Width="60px" Height="20px" CssClass="test" >
|
||||
</cc1:TimeSelector>
|
||||
<table style="width:58px!important">
|
||||
<tr>
|
||||
<td style="width:58px!important">
|
||||
<asp:Literal ID="LtlHoraServicio" runat="server" Visible="false" Text='<%# Eval("HoraCita", "{0:t}")%>'> ></asp:Literal>
|
||||
<cc1:TimeSelector ID="TimeSelector" runat="server" DisplaySeconds="false" DisplayButtons="false" Visible="false" SelectedTimeFormat="TwentyFour" Width="60px" Height="20px" CssClass="test" >
|
||||
</cc1:TimeSelector>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--11--%>
|
||||
|
||||
@@ -465,7 +465,7 @@ Partial Class OS_OrdenesServicios
|
||||
DvTxtEpisodioModal.Visible = True
|
||||
DvTxtFolioRemisionModal.Visible = True
|
||||
|
||||
If CveOS > 0 And TipoEstatus >= 3 Then
|
||||
If CveOS > 0 And TipoEstatus >= 2 Then
|
||||
DdlUsuarioAtendio.Enabled = True
|
||||
DVUsuarioAtendio3.Visible = True
|
||||
End If
|
||||
|
||||
@@ -462,6 +462,10 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
DivDatosAutorizacion.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109).ToString = "1" Then
|
||||
TrDescuentoAutorizado.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(599) = "1" Then
|
||||
TrCodigoAcceso.Visible = True
|
||||
End If
|
||||
|
||||
@@ -343,7 +343,7 @@ Partial Class Ventas_ActualizarPrecios
|
||||
|
||||
|
||||
If Not TieneError Then
|
||||
TieneError = ActualizarPreciosFranquicia(ObjPS, row.DataKey("Codigo"), row.DataKey("PS"), row.FCTextBox("TxtPrecio").Text.ToDecimal, row.FCTextBox("TxtPrecioMinimo").Text.ToDecimal, DdlPrecioLista.SelectedItem.Text)
|
||||
TieneError = ActualizarPreciosFranquicia(ObjPS, row.DataKey("Codigo"), row.FCTextBox("TxtPrecio").Text.ToDecimal, row.FCTextBox("TxtPrecioMinimo").Text.ToDecimal, DdlPrecioLista.SelectedItem.Text)
|
||||
Else
|
||||
Exit For
|
||||
End If
|
||||
@@ -603,7 +603,7 @@ Partial Class Ventas_ActualizarPrecios
|
||||
Correcto = ObjPS.UpdatePSPreciosLista(PrecioNuevo, CvePrecioLista, Porcentaje, CvePS, UsuarioActual.CveUsuario, NowADS(), True)
|
||||
If Correcto Then
|
||||
RowsCargados += 1
|
||||
TieneError = ActualizarPreciosFranquicia(ObjPS, row(0).ToString(), row(1).ToString(), PrecioNuevo, 0, DdlPrecioListaCarga.SelectedItem.Text)
|
||||
TieneError = ActualizarPreciosFranquicia(ObjPS, row(0).ToString(), PrecioNuevo, 0, DdlPrecioListaCarga.SelectedItem.Text)
|
||||
End If
|
||||
Else
|
||||
If CvePS > 0 AndAlso CvePrecioLista = -2 Then
|
||||
@@ -652,7 +652,7 @@ Partial Class Ventas_ActualizarPrecios
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function ActualizarPreciosFranquicia(ObjPS As ClsProductosServicios, Codigo As String, PS As String, Precio As Decimal, PrecioMinimo As Decimal, PrecioLista As String) As Boolean
|
||||
Private Function ActualizarPreciosFranquicia(ObjPS As ClsProductosServicios, Codigo As String, Precio As Decimal, PrecioMinimo As Decimal, PrecioLista As String, Optional UpdatePrecioMinimo As Boolean = True) As Boolean
|
||||
Dim FranquiciasStr As String = UsuarioActual.Empresa.Funcionalidad(563)
|
||||
Dim StrMsg As New StringBuilder
|
||||
Dim StrMsgError As New StringBuilder
|
||||
@@ -674,7 +674,7 @@ Partial Class Ventas_ActualizarPrecios
|
||||
' Dim EmpresaFranquicia As String = GlobalDTEmpresas(CveEmpresa:=CveFranquicia).FiltroPrimeroValor("Empresa")
|
||||
' StrMsg.AppendFormat("El precio lista '{0}' no existe en la Franquicia '{1}'<br/>", DdlPrecioLista.SelectedItem.Text, EmpresaFranquicia)
|
||||
'End If
|
||||
If CvePrecioLisa > 0 AndAlso CvePS > 0 AndAlso Not ObjPS.UpdatePSPreciosLista(Precio, CvePrecioLisa, Porcentaje, CvePS, UsuarioActual.CveUsuario, NowADS(), If(RblTipo.SelectedValue = "Imp", True, False), PrecioMinimo:=PrecioMinimo) Then
|
||||
If CvePrecioLisa > 0 AndAlso CvePS > 0 AndAlso Not ObjPS.UpdatePSPreciosLista(Precio, CvePrecioLisa, Porcentaje, CvePS, UsuarioActual.CveUsuario, NowADS(), If(RblTipo.SelectedValue = "Imp", True, False), PrecioMinimo:=If(UpdatePrecioMinimo, PrecioMinimo, 0)) Then
|
||||
StrMsgError.AppendFormat("No se pudo actualizar el producto")
|
||||
End If
|
||||
Next
|
||||
@@ -960,7 +960,9 @@ Partial Class Ventas_ActualizarPrecios
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub LnkGuardarMultiple_Click(sender As Object, e As EventArgs)
|
||||
Dim TieneError As Boolean = False
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
Dim DtPS As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
ObjPS.IniciaTransacSQL()
|
||||
@@ -984,6 +986,28 @@ Partial Class Ventas_ActualizarPrecios
|
||||
|
||||
TieneError = Not ObjPS.UpdatePSPreciosLista(Precio, CvePrecioLista, 0, CvePS, UsuarioActual.CveUsuario, NowADS(), True)
|
||||
|
||||
If Not TieneError Then
|
||||
|
||||
Dim text As String = DtPreciosMultiple.Columns(indiceColumna).ColumnName
|
||||
Dim splitValues As String() = text.Split("|"c)
|
||||
|
||||
If splitValues.Length > 1 Then
|
||||
|
||||
Dim PrecioLista As String = splitValues(1)
|
||||
|
||||
Dim DrPS = DtPS.FiltroPrimero($"CvePS = {CvePS}")
|
||||
If DrPS IsNot Nothing Then
|
||||
TieneError = ActualizarPreciosFranquicia(ObjPS, DrPS("Codigo").ToString(), Precio, 0, PrecioLista, UpdatePrecioMinimo:=False)
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If TieneError Then
|
||||
Exit For
|
||||
End If
|
||||
|
||||
@@ -346,7 +346,7 @@
|
||||
<table>
|
||||
<td style="white-space: nowrap;">Fecha Emisión:</td>
|
||||
<td>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaEmision" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="LnkImgTxtFechaEmision" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
|
||||
@@ -618,7 +618,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
Dim FechaEmision As Date = MinFecha
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
If ChkComplementoPago.Checked AndAlso UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
FechaEmision = TxtFechaEmision.Text.ToDate
|
||||
|
||||
If FechaEmision <= MinFecha Then
|
||||
|
||||
@@ -24,6 +24,16 @@
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
|
||||
</li>
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpAccionezPersonalizar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPErsonalizar" OnClick="LnkPErsonalizar_Click" runat="server"><i class="fa fa-pencil"></i>Personalizar Columnas</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -210,7 +220,7 @@
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFAplicadoF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaAplicadoF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<label id="lblEsDistribuidor" runat="server" visible="false" class="col-md-1 truncate">Es Distribuidor:</label>
|
||||
<div class="col-md-2" id="divEsDistribuidor" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlDistribuidor" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
@@ -269,10 +279,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="99%" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Ventas" CssClass="ScrollAD table table-striped table-hover Widthall" data-heighterror="320" data-freezecols="0" data-freezerows="0" GridLines="None"
|
||||
DataKeyNames="CveVenta">
|
||||
<Columns>
|
||||
@@ -291,10 +304,27 @@
|
||||
<asp:BoundField HeaderText="Dias Pago" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.##}" DataField="DiasPagados" />
|
||||
<asp:BoundField HeaderText="Forma Pago" DataField="TipoTransaccion" />
|
||||
<asp:BoundField HeaderText="MSI" DataField="MesesSinIntereses" />
|
||||
|
||||
|
||||
<asp:BoundField HeaderText="Sucursal Cliente" DataField="SucursalCliente" />
|
||||
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" />
|
||||
<asp:BoundField HeaderText="Descuento" DataField="Descuento" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField HeaderText="Vendedor" DataField="Vendedor" />
|
||||
<asp:BoundField HeaderText="Codigo" DataField="Codigo" />
|
||||
|
||||
<asp:BoundField HeaderText="Limite Credito" DataField="LimiteCredito" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField HeaderText="Ret IVA" DataField="RetIVA" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField HeaderText="Ret ISR" DataField="RetISR" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField HeaderText="Sub Total" DataField="SubTotal" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField HeaderText="T.C." DataField="TipoCambio" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField HeaderText="DescripcionVenta" DataField="DescripcionVenta" />
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpTipoCambio" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivTipoCambio" class="modal fade" role="dialog">
|
||||
@@ -329,6 +359,108 @@
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div id="DivPersonalizar" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="Label3" runat="server" ClientIDMode="Static" Text="Personalizar Columnas"></asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<table class="table table-striped nobordertop table-advance table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFolio" runat="server" Text=" Folio" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFecha" runat="server" Text=" Fecha" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSubTotal" runat="server" Text=" SubTotal" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkObservaciones" runat="server" Text=" Observaciones" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkDescuento" runat="server" Text=" Descuento" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkVendedor" runat="server" Text=" Vendedor" Checked="false" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSucursal" runat="server" Text=" Sucursal" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkCodigo" runat="server" Text=" Código Cliente"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkLimiteCredito" runat="server" Text=" Limite Credito" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkRetIVA" runat="server" Text=" Ret. IVA" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkCliente" runat="server" Text=" Cliente" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkRetISR" runat="server" Text=" Ret. ISR" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSucursalCliente" runat="server" Text=" Sucursal Cliente" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkTotal" runat="server" Text=" Total" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkDiasTranscurridos" runat="server" Text=" Días Transcurridos" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkDiasPago" runat="server" Text=" Dias Pago" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkTC" runat="server" Text=" Tipo Cambio" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMostrarDescripcionVenta" runat="server" Text=" Descripción Venta" Checked="false" /></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6" style="text-align: left">
|
||||
<asp:CheckBox ID="ChkGuardarPersonalizacion" runat="server" Text=" Guarda Personalización" TextAlign="Right" />
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<button type="button" class="btn btn-success" data-dismiss="modal" onclick="$('#BtnPersonalizar').click();">Personalizar</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpBtnPersonalizar" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnPersonalizar" Style="display: none" ClientIDMode="Static" runat="server" Text="Personalizar" class="btn btn-success" OnClick="BtnPersonalizar_Click" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -71,11 +71,22 @@ Partial Class Ventas_RepRecuperacionDetalle
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property Personalizo As Integer
|
||||
Get
|
||||
Return ViewState("Personalizo").ToString.ToEntero
|
||||
End Get
|
||||
|
||||
Set(value As Integer)
|
||||
ViewState("Personalizo") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
CargaCombos()
|
||||
CargaPersonalizacion()
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
@@ -373,5 +384,345 @@ Partial Class Ventas_RepRecuperacionDetalle
|
||||
Else
|
||||
LiEspecifico.Visible = False
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "PERSONALIZAR"
|
||||
|
||||
Protected Sub LnkPErsonalizar_Click(sender As Object, e As EventArgs)
|
||||
ChkGuardarPersonalizacion.Checked = False
|
||||
RegistraScript("$('#DivPersonalizar').modal('show')")
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs)
|
||||
|
||||
If ChkGuardarPersonalizacion.Checked Then
|
||||
GuardaPersonalizacion()
|
||||
End If
|
||||
|
||||
Personaliza()
|
||||
CargaDatos()
|
||||
'GvDatosDataBind()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub Personaliza()
|
||||
|
||||
GvDatos.Columns(0).Visible = True
|
||||
GvDatos.Columns(1).Visible = ChkFecha.Checked
|
||||
GvDatos.Columns(2).Visible = ChkFolio.Checked
|
||||
GvDatos.Columns(3).Visible = True
|
||||
GvDatos.Columns(4).Visible = ChkTotal.Checked
|
||||
GvDatos.Columns(5).Visible = True
|
||||
GvDatos.Columns(6).Visible = ChkSucursal.Checked
|
||||
GvDatos.Columns(7).Visible = True
|
||||
GvDatos.Columns(8).Visible = ChkCliente.Checked
|
||||
GvDatos.Columns(9).Visible = True
|
||||
GvDatos.Columns(10).Visible = True
|
||||
GvDatos.Columns(11).Visible = ChkDiasTranscurridos.Checked
|
||||
GvDatos.Columns(12).Visible = ChkDiasPago.Checked
|
||||
GvDatos.Columns(13).Visible = True
|
||||
GvDatos.Columns(14).Visible = True
|
||||
|
||||
GvDatos.Columns(15).Visible = ChkSucursalCliente.Checked
|
||||
GvDatos.Columns(16).Visible = ChkObservaciones.Checked
|
||||
GvDatos.Columns(17).Visible = ChkDescuento.Checked
|
||||
GvDatos.Columns(18).Visible = ChkVendedor.Checked
|
||||
GvDatos.Columns(19).Visible = ChkCodigo.Checked
|
||||
|
||||
GvDatos.Columns(20).Visible = ChkLimiteCredito.Checked
|
||||
GvDatos.Columns(21).Visible = ChkRetIVA.Checked
|
||||
GvDatos.Columns(22).Visible = ChkRetISR.Checked
|
||||
GvDatos.Columns(23).Visible = ChkSubTotal.Checked
|
||||
GvDatos.Columns(24).Visible = ChkTC.Checked
|
||||
GvDatos.Columns(25).Visible = ChkMostrarDescripcionVenta.Checked
|
||||
|
||||
|
||||
Personalizo = 1
|
||||
If Personalizo = 1 Then
|
||||
'ImgExcelPersonalizado.Visible = True
|
||||
Else
|
||||
'ImgExcelPersonalizado.Visible = False
|
||||
End If
|
||||
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub GuardaPersonalizacion()
|
||||
Dim objUsuario As New ClsSisUsuarios
|
||||
Dim ListPersonalizada As New List(Of String)
|
||||
|
||||
If ChkFolio.Checked Then
|
||||
ListPersonalizada.Add("Folio")
|
||||
End If
|
||||
|
||||
If ChkFecha.Checked Then
|
||||
ListPersonalizada.Add("Fecha")
|
||||
End If
|
||||
|
||||
If ChkSubTotal.Checked Then
|
||||
ListPersonalizada.Add("SubTotal")
|
||||
End If
|
||||
|
||||
If ChkObservaciones.Checked Then
|
||||
ListPersonalizada.Add("Observaciones")
|
||||
End If
|
||||
|
||||
If ChkDescuento.Checked Then
|
||||
ListPersonalizada.Add("Descuento")
|
||||
End If
|
||||
|
||||
If ChkVendedor.Checked Then
|
||||
ListPersonalizada.Add("Vendedor")
|
||||
End If
|
||||
|
||||
If ChkSucursal.Checked Then
|
||||
ListPersonalizada.Add("Sucursal")
|
||||
End If
|
||||
|
||||
If ChkCodigo.Checked Then
|
||||
ListPersonalizada.Add("Codigo")
|
||||
End If
|
||||
|
||||
If ChkLimiteCredito.Checked Then
|
||||
ListPersonalizada.Add("LimiteCredito")
|
||||
End If
|
||||
|
||||
If ChkRetIVA.Checked Then
|
||||
ListPersonalizada.Add("RetIVA")
|
||||
End If
|
||||
|
||||
If ChkCliente.Checked Then
|
||||
ListPersonalizada.Add("Cliente")
|
||||
End If
|
||||
|
||||
If ChkRetISR.Checked Then
|
||||
ListPersonalizada.Add("RetISR")
|
||||
End If
|
||||
|
||||
If ChkSucursalCliente.Checked Then
|
||||
ListPersonalizada.Add("SucursalCliente")
|
||||
End If
|
||||
|
||||
If ChkTotal.Checked Then
|
||||
ListPersonalizada.Add("Total")
|
||||
End If
|
||||
|
||||
If ChkDiasTranscurridos.Checked Then
|
||||
ListPersonalizada.Add("DiasTranscurridos")
|
||||
End If
|
||||
|
||||
If ChkDiasPago.Checked Then
|
||||
ListPersonalizada.Add("DiasPago")
|
||||
End If
|
||||
|
||||
If ChkTC.Checked Then
|
||||
ListPersonalizada.Add("TC")
|
||||
End If
|
||||
|
||||
If ChkMostrarDescripcionVenta.Checked Then
|
||||
ListPersonalizada.Add("MostrarDescripcionVenta")
|
||||
End If
|
||||
|
||||
If objUsuario.AddUsuariosPersonalizaciones(UsuarioActual, "RepRecuperacionDetalle.aspx", String.Join("|", ListPersonalizada)) Then
|
||||
'Alert("Personalizacion guardada")
|
||||
End If
|
||||
|
||||
objUsuario.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaPersonalizacion()
|
||||
Dim strBasePersonalizacion As String = UsuarioActual.Personalizaciones("RepRecuperacionDetalle.aspx")
|
||||
|
||||
If strBasePersonalizacion.Trim.Length > 0 Then
|
||||
|
||||
|
||||
Dim Personalizaciones As String() = strBasePersonalizacion.Split("|"c)
|
||||
|
||||
For Each personalizacion As String In Personalizaciones
|
||||
Select Case personalizacion
|
||||
Case "Folio"
|
||||
ChkFolio.Checked = True
|
||||
Case "Fecha"
|
||||
ChkFecha.Checked = True
|
||||
Case "SubTotal"
|
||||
ChkSubTotal.Checked = True
|
||||
Case "Observaciones"
|
||||
ChkObservaciones.Checked = True
|
||||
Case "Descuento"
|
||||
ChkDescuento.Checked = True
|
||||
Case "Vendedor"
|
||||
ChkVendedor.Checked = True
|
||||
Case "Sucursal"
|
||||
ChkSucursal.Checked = True
|
||||
Case "Codigo"
|
||||
ChkCodigo.Checked = True
|
||||
Case "LimiteCredito"
|
||||
ChkLimiteCredito.Checked = True
|
||||
Case "RetIVA"
|
||||
ChkRetIVA.Checked = True
|
||||
Case "Cliente"
|
||||
ChkCliente.Checked = True
|
||||
Case "RetISR"
|
||||
ChkRetISR.Checked = True
|
||||
Case "SucursalCliente"
|
||||
ChkSucursalCliente.Checked = True
|
||||
Case "Total"
|
||||
ChkTotal.Checked = True
|
||||
Case "DiasTranscurridos"
|
||||
ChkDiasTranscurridos.Checked = True
|
||||
Case "DiasPago"
|
||||
ChkDiasPago.Checked = True
|
||||
Case "TC"
|
||||
ChkTC.Checked = True
|
||||
Case "MostrarDescripcionVenta"
|
||||
ChkMostrarDescripcionVenta.Checked = True
|
||||
Case Else
|
||||
' Do nothing
|
||||
End Select
|
||||
Next
|
||||
|
||||
Personaliza()
|
||||
Else
|
||||
PersonalizaDefault()
|
||||
End If
|
||||
UPPersonalizar.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub PersonalizaDefault()
|
||||
ChkFolio.Checked = True
|
||||
ChkFecha.Checked = True
|
||||
ChkTotal.Checked = True
|
||||
ChkSucursal.Checked = True
|
||||
ChkCliente.Checked = True
|
||||
ChkDiasTranscurridos.Checked = True
|
||||
ChkDiasPago.Checked = True
|
||||
|
||||
|
||||
ChkSucursalCliente.Checked = False
|
||||
ChkSubTotal.Checked = False
|
||||
ChkObservaciones.Checked = False
|
||||
ChkDescuento.Checked = False
|
||||
ChkVendedor.Checked = False
|
||||
ChkCodigo.Checked = False
|
||||
ChkLimiteCredito.Checked = False
|
||||
ChkRetIVA.Checked = False
|
||||
ChkRetISR.Checked = False
|
||||
ChkTC.Checked = False
|
||||
ChkMostrarDescripcionVenta.Checked = False
|
||||
|
||||
GvDatos.Columns(0).Visible = True
|
||||
GvDatos.Columns(1).Visible = True
|
||||
GvDatos.Columns(2).Visible = True
|
||||
GvDatos.Columns(3).Visible = True
|
||||
GvDatos.Columns(4).Visible = True
|
||||
GvDatos.Columns(5).Visible = True
|
||||
GvDatos.Columns(6).Visible = True
|
||||
GvDatos.Columns(7).Visible = True
|
||||
GvDatos.Columns(8).Visible = True
|
||||
GvDatos.Columns(9).Visible = True
|
||||
GvDatos.Columns(10).Visible = True
|
||||
GvDatos.Columns(11).Visible = True
|
||||
GvDatos.Columns(12).Visible = True
|
||||
GvDatos.Columns(13).Visible = True
|
||||
GvDatos.Columns(14).Visible = True
|
||||
GvDatos.Columns(15).Visible = False
|
||||
GvDatos.Columns(16).Visible = False
|
||||
GvDatos.Columns(17).Visible = False
|
||||
GvDatos.Columns(18).Visible = False
|
||||
GvDatos.Columns(19).Visible = False
|
||||
GvDatos.Columns(20).Visible = False
|
||||
GvDatos.Columns(21).Visible = False
|
||||
GvDatos.Columns(22).Visible = False
|
||||
GvDatos.Columns(23).Visible = False
|
||||
GvDatos.Columns(24).Visible = False
|
||||
GvDatos.Columns(25).Visible = False
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
'Private Sub GuardaPersonalizacion()
|
||||
|
||||
' Dim objUsuario As New ClsSisUsuarios
|
||||
' Dim ListPersonalizada As New List(Of String)
|
||||
|
||||
' If ChkCantidad.Checked Then
|
||||
' ListPersonalizada.Add("Cantidad")
|
||||
' End If
|
||||
|
||||
' If ChkSubTotal.Checked Then
|
||||
' ListPersonalizada.Add("Subtotal")
|
||||
' End If
|
||||
|
||||
' If ChkDescuentos.Checked Then
|
||||
' ListPersonalizada.Add("Descuentos")
|
||||
' End If
|
||||
|
||||
' If ChkIVA.Checked Then
|
||||
' ListPersonalizada.Add("IVA")
|
||||
' End If
|
||||
|
||||
' If ChkTotal.Checked Then
|
||||
' ListPersonalizada.Add("Total")
|
||||
' End If
|
||||
|
||||
' If ChkSubTotal2.Checked Then
|
||||
' ListPersonalizada.Add("SubTotal2")
|
||||
' End If
|
||||
' If ChkIEPS.Checked Then
|
||||
' ListPersonalizada.Add("IEPS")
|
||||
' End If
|
||||
' If ChkRetIVA.Checked Then
|
||||
' ListPersonalizada.Add("RetIVA")
|
||||
' End If
|
||||
' If ChkRetISR.Checked Then
|
||||
' ListPersonalizada.Add("RetISR")
|
||||
' End If
|
||||
' If ChkImpLoc.Checked Then
|
||||
' ListPersonalizada.Add("ImpLoc")
|
||||
' End If
|
||||
' If ChkMinSub.Checked Then
|
||||
' ListPersonalizada.Add("MinSub")
|
||||
' End If
|
||||
' If ChkAVGSub.Checked Then
|
||||
' ListPersonalizada.Add("AVGSub")
|
||||
' End If
|
||||
' If ChkMaxSub.Checked Then
|
||||
' ListPersonalizada.Add("MaxSub")
|
||||
' End If
|
||||
' If ChkMaxTot.Checked Then
|
||||
' ListPersonalizada.Add("MaxTot")
|
||||
' End If
|
||||
' If ChkAvgTot.Checked Then
|
||||
' ListPersonalizada.Add("AvgTot")
|
||||
' End If
|
||||
' If ChkMinTot.Checked Then
|
||||
' ListPersonalizada.Add("MinTot")
|
||||
' End If
|
||||
' If CheckRefacturado.Checked Then
|
||||
' ListPersonalizada.Add("CheckRefacturado")
|
||||
' End If
|
||||
|
||||
' If ChkCantidad.Checked Then
|
||||
' ListPersonalizada.Add("Cantidad")
|
||||
' End If
|
||||
|
||||
|
||||
' If objUsuario.AddUsuariosPersonalizaciones(UsuarioActual, "RepVentas.aspx", String.Join("|", ListPersonalizada)) Then
|
||||
' 'Alert("Personalizacion guardada")
|
||||
' End If
|
||||
|
||||
' objUsuario.Dispose()
|
||||
|
||||
'End Sub
|
||||
|
||||
Private Sub GvDatosDataBind()
|
||||
|
||||
GvDatos.DataSource = DtDatos
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
@@ -4409,6 +4409,7 @@
|
||||
<asp:HiddenField ID="HdnIVADescPS" runat="server" ClientIDMode="Static" Value="0" />
|
||||
<asp:HiddenField ID="HdnConsecPS" runat="server" ClientIDMode="Static" Value="-1" />
|
||||
<asp:HiddenField ID="HdnTotalCompra" runat="server" ClientIDMode="Static" Value="0" />
|
||||
<asp:HiddenField ID="HdnPorcentajeMaxDescPS" runat="server" ClientIDMode="Static" Value="100" />
|
||||
<table style="width: 90%">
|
||||
<tr>
|
||||
<td>SubTotal</td>
|
||||
@@ -10083,16 +10084,21 @@
|
||||
|
||||
function CalculaDescPS() {
|
||||
console.log("evento descuento");
|
||||
let ivaPor = parseFloat($get("HdnIVADescPS").value) ;
|
||||
|
||||
if ($get("TxtPorPS").value != "") {
|
||||
let PorcentajeDescuento = parseFloat($get("TxtPorPS").value);
|
||||
if (PorcentajeDescuento < 0 || PorcentajeDescuento > 100) {
|
||||
alert("No se puede aplicar ese porcentaje de descuento");
|
||||
let PorcentajeMaximoDescuento = parseFloat($get("HdnPorcentajeMaxDescPS").value);
|
||||
|
||||
if (PorcentajeDescuento < 0 || PorcentajeDescuento > PorcentajeMaximoDescuento) {
|
||||
alert("No se puede aplicar ese porcentaje de descuento. El porcentaje máximo permitido es del " + PorcentajeMaximoDescuento.toFixed(2) + "%.");
|
||||
$get("TxtPorPS").value = "0";
|
||||
$get("HdnDescPS").value = "0";
|
||||
LimpiarTotalDescPS(ivaPor);
|
||||
recalcularUtilidad(0);
|
||||
return;
|
||||
}
|
||||
let ivaPor = parseFloat($get("HdnIVADescPS").value) ;
|
||||
|
||||
|
||||
let subTotal = parseFloat($get("LblSubtotalDescPS").innerText.replace(",", "").replace(",", ""));
|
||||
|
||||
$get("LblDescPS").innerText = formato_numero(((subTotal * PorcentajeDescuento) / 100), 2, '.', ',');
|
||||
@@ -10111,20 +10117,24 @@
|
||||
|
||||
recalcularUtilidad(descuento)
|
||||
} else {
|
||||
let subTotal = parseFloat($get("LblSubtotalDescPS").innerText.replace(",", "").replace(",", ""));
|
||||
$get("LblIVADescPS").innerText = formato_numero((subTotal * ivaPor), 2, '.', ',');
|
||||
let importeIVA =parseFloat($get("LblIVADescPS").innerText.replace(",", "").replace(",", ""));
|
||||
let Total = (subTotal) + importeIVA;
|
||||
|
||||
$get("LblTotalFinalDescPS").innerText = formato_numero(Total, 2, '.', ',');
|
||||
$get("LblDescPS").innerText = "0.00";
|
||||
$get("LblUtilidadPorcentaje").innerText = "0.00";
|
||||
$get("HdnDescPS").innerText = "0.00";
|
||||
LimpiarTotalDescPS(ivaPor);
|
||||
|
||||
recalcularUtilidad(0);
|
||||
}
|
||||
}
|
||||
|
||||
function LimpiarTotalDescPS(ivaPor){
|
||||
let subTotal = parseFloat($get("LblSubtotalDescPS").innerText.replace(",", "").replace(",", ""));
|
||||
$get("LblIVADescPS").innerText = formato_numero((subTotal * ivaPor), 2, '.', ',');
|
||||
let importeIVA =parseFloat($get("LblIVADescPS").innerText.replace(",", "").replace(",", ""));
|
||||
let Total = (subTotal) + importeIVA;
|
||||
|
||||
$get("LblTotalFinalDescPS").innerText = formato_numero(Total, 2, '.', ',');
|
||||
$get("LblDescPS").innerText = "0.00";
|
||||
$get("LblUtilidadPorcentaje").innerText = "0.00";
|
||||
$get("HdnDescPS").innerText = "0.00";
|
||||
}
|
||||
|
||||
function recalcularUtilidad(descuento){
|
||||
let totalCompra = parseFloat($get("HdnTotalCompra").value);
|
||||
if (totalCompra > 0) {
|
||||
@@ -10667,8 +10677,8 @@
|
||||
var td;
|
||||
let idxHeader = 0;
|
||||
for (var key in item) {
|
||||
if (idxHeader == 0 && '<%= UsuarioActual.Empresa.Funcionalidad(382) %>' == '1') {
|
||||
tr.append('<td style="font-weight:bold;"> </td>');
|
||||
if (idxHeader == 0 && '<%= If(UsuarioActual.CveEmpresa = 189, "1", "") %>' == '1') {
|
||||
tr.append('<td style="font-weight:bold;"></td>');
|
||||
tr.append('<td style="font-weight:bold;"></td>');
|
||||
tr.append('<td style="font-weight:bold;"></td>');
|
||||
}
|
||||
@@ -10685,7 +10695,7 @@
|
||||
let idxColumn = 0;
|
||||
for (var key in item) {
|
||||
|
||||
if (idxColumn == 0 && '<%= UsuarioActual.Empresa.Funcionalidad(382) %>' == '1') {
|
||||
if (idxColumn == 0 && '<%= If(UsuarioActual.CveEmpresa = 189, "1", "") %>' == '1') {
|
||||
let tdExistencia = '<a href="javascript:void(0);" title="Ver existencias" onclick="javascript:AbrirVentana(' + "'/Inventarios/PopUpExistenciasAlmacen.aspx?CvePS=" + item.id + "'" + ", 800, 547," + "'N'" + ",'PopUpBuscar');$('#C_Tab_TabGenerales_DdlPS > select').select2('close');" + '"> <img style="width:15px; height: 13px;" src="../Content/CustomIcons/existencia_verde.svg"></img > </a>';
|
||||
tr.append('<td>' + tdExistencia + '</td>');
|
||||
|
||||
|
||||
@@ -3228,9 +3228,13 @@ Partial Class Ventas
|
||||
' End If
|
||||
'End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(301) <> "" Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(301) = "1" Then
|
||||
TxtFecha.Enabled = True
|
||||
ImgFecha.Visible = True
|
||||
Else
|
||||
TxtFecha.Enabled = False
|
||||
ImgFecha.Visible = False
|
||||
CEFecha.Enabled = False
|
||||
End If
|
||||
|
||||
CargarCodigo()
|
||||
@@ -5037,7 +5041,10 @@ Partial Class Ventas
|
||||
If (Not CveEstatus.Contiene(4, 5, 12, 13, 20, 23) OrElse (CveEstatus = 5 AndAlso DbRowVenta("CveEstatusRefacturacion").ToString().ToEntero() = 4)) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Egs", "Ant") AndAlso UsuarioActual.TienePermisoProceso(159) Then
|
||||
Dim TienePermiso As String = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, -1).FiltroPrimeroValor("CveSubProyecto", String.Format("CveSubProyecto = {0}", DbRowVenta("CveSubProyecto")))
|
||||
If TienePermiso <> "" Then
|
||||
LkRefacturacion.Visible = True
|
||||
If Not (UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(382) = "1") Then
|
||||
LkRefacturacion.Visible = True
|
||||
End If
|
||||
|
||||
If (CveEstatus = 5 AndAlso DbRowVenta("CveEstatusRefacturacion").ToString().ToEntero() = 4) Then
|
||||
RefacturarCancelada = True
|
||||
End If
|
||||
@@ -5065,9 +5072,18 @@ Partial Class Ventas
|
||||
' End If
|
||||
'End If
|
||||
'si utiliza cortes, y cajas, no permitir cancelar de días anteriores
|
||||
If UsuarioActual.CveRol <> 1 AndAlso UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso DbRowVenta("Fecha").ToString.ToDate.ToShortDateString.ToDate < Now.ToShortDateString.ToDate Then
|
||||
LbCancelarDocumento.Visible = UsuarioActual.TienePermisoProceso(378)
|
||||
If (UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(382) = "1") Then
|
||||
LkRefacturacion.Visible = False
|
||||
If DbRowVenta("Fecha").ToString.ToDate.ToShortDateString.ToDate < Now.ToShortDateString.ToDate Then
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Egs", "Ant") AndAlso UsuarioActual.TienePermisoProceso(159) Then
|
||||
LkRefacturacion.Visible = True
|
||||
LbCancelarDocumento.Visible = False
|
||||
Else
|
||||
LbCancelarDocumento.Visible = UsuarioActual.TienePermisoProceso(378)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -7272,7 +7288,11 @@ Partial Class Ventas
|
||||
TxtCantidad.Focus()
|
||||
End If
|
||||
|
||||
|
||||
'SI ES REFACTURACION HABILITAR LOS CAMPOS
|
||||
If NuevaFactura = 1 Then
|
||||
DdlMetodoPago33.Enabled = True
|
||||
DdlFormaPago33.Enabled = True
|
||||
End If
|
||||
'If UsuarioActual.Empresa.Funcionalidad(705) = "1" Then
|
||||
' Using ObjVentas As New ClsVentas
|
||||
' If ObjVentas.GetLineasAdicionales(-1, CveCliente, -1, -1, DdlMoneda.SelectedValue.ToEntero(), MinFecha, MaxFecha, 0, UsuarioActual.CveEmpresa) Then
|
||||
@@ -25004,6 +25024,15 @@ Partial Class Ventas
|
||||
LblIVADescPS.Text = GvRow.DataKey("ImporteIVA").FormatoNumero()
|
||||
HdnIVADescPS.Value = GvRow.DataKey("IVA").FormatoNumero()
|
||||
|
||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=GvRow.DataKey("CvePS").ToEntero()).FiltroPrimero("")
|
||||
If DrPS IsNot Nothing Then
|
||||
If DrPS("PorMaximoDescuento").ToString().ToDecimal() > 0 Then
|
||||
HdnPorcentajeMaxDescPS.Value = DrPS("PorMaximoDescuento").ToString()
|
||||
Else
|
||||
HdnPorcentajeMaxDescPS.Value = UsuarioActual.DescuentoAutorizado.ToString()
|
||||
End If
|
||||
End If
|
||||
|
||||
Using ObjPS As New ClsProductosServicios
|
||||
Dim PrecioCompra = ObjPS.GetUltimoPrecioCompra(UsuarioActual.CveEmpresa, GvRow.DataKey("CvePS").ToEntero())
|
||||
If PrecioCompra > 0 Then
|
||||
@@ -25650,7 +25679,7 @@ Partial Class Ventas
|
||||
|
||||
Dim AplicaCancelacionConPagos As Boolean = False
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso ObjFacturaCancelacion.TipoDocto.Contiene("Ing", "Rem") AndAlso Not EsRefacturacion AndAlso ObjFacturaCancelacion.Pagado > 0 Then
|
||||
If (UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(382) = "1") AndAlso ObjFacturaCancelacion.TipoDocto.Contiene("Ing", "Rem") AndAlso Not EsRefacturacion AndAlso ObjFacturaCancelacion.Pagado > 0 Then
|
||||
AplicaCancelacionConPagos = True
|
||||
End If
|
||||
|
||||
@@ -38276,7 +38305,21 @@ Partial Class Ventas
|
||||
If UsuarioAutorizar.TienePermisoProceso(374) Then
|
||||
txtUserDesc.Text = ""
|
||||
txtPassDesc.Text = ""
|
||||
'UpAutorizarDesc.Update()
|
||||
|
||||
'ASIGNA EL PORCENTAJE A APLICAR DEL USUARIO QUE AUTORIZA
|
||||
Dim RowUpdate As DataRow = TmpDT.Select($"Consec = {HdnConsecPS.Value}").FirstOrDefault()
|
||||
If RowUpdate IsNot Nothing Then
|
||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=RowUpdate("CvePS").ToString().ToEntero()).FiltroPrimero("")
|
||||
If DrPS IsNot Nothing Then
|
||||
If DrPS("PorMaximoDescuento").ToString().ToDecimal() > 0 Then
|
||||
HdnPorcentajeMaxDescPS.Value = DrPS("PorMaximoDescuento").ToString()
|
||||
Else
|
||||
HdnPorcentajeMaxDescPS.Value = UsuarioAutorizar.DescuentoAutorizado.ToString()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
UpDescPS.Update()
|
||||
|
||||
RegistraScript("$('#ModalPermisoDesc').modal('hide');$('#ModalDescPS').modal({backdrop: 'static', keyboard: false});", "AUT")
|
||||
Else
|
||||
|
||||
Reference in New Issue
Block a user