This commit is contained in:
2024-06-17 08:33:49 -07:00
31 changed files with 11483 additions and 4153 deletions

View File

@@ -1539,6 +1539,7 @@ Public Class ClsMovimientos
Optional CveCondicionesPago As Integer = -1, Optional CveTipoTransaccion As Integer = -1, Optional CveMoneda As Integer = -1) As Boolean Optional CveCondicionesPago As Integer = -1, Optional CveTipoTransaccion As Integer = -1, Optional CveMoneda As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_RepRecuperacion") DataAdapter("PA_Vta_RepRecuperacion")
SqlAdapter.SelectCommand.CommandTimeout = 0
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveResponsable", SqlDbType.Int).Value = CveResponsable .Add("@CveResponsable", SqlDbType.Int).Value = CveResponsable
.Add("@FechaI", SqlDbType.Date).Value = FechaI .Add("@FechaI", SqlDbType.Date).Value = FechaI

View File

@@ -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 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 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 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 Dim Retorno As Boolean = False
DataAdapter("PA_OC_OrdenesCompraAdd") DataAdapter("PA_OC_OrdenesCompraAdd")
@@ -754,6 +754,7 @@ Public Class ClsOC
.Add("@NumRemision", SqlDbType.VarChar).Value = NumRemision .Add("@NumRemision", SqlDbType.VarChar).Value = NumRemision
.Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva .Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva
.Add("@MetodoPago", SqlDbType.Int).Value = MetodoPago ' 0 Contado, 1 Credito .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("@vCveOrdenCompra", SqlDbType.Int).Direction = ParameterDirection.Output
.Add("@vFolio", 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 = "", 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 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 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 Dim Retorno As Boolean = False
DataAdapter("PA_OC_OrdenesCompraUpdate") DataAdapter("PA_OC_OrdenesCompraUpdate")
@@ -953,6 +955,8 @@ Public Class ClsOC
.Add("@PorcentajeIVA", SqlDbType.SmallMoney).Value = PorcentajeIVA .Add("@PorcentajeIVA", SqlDbType.SmallMoney).Value = PorcentajeIVA
.Add("@NumRemision", SqlDbType.VarChar).Value = NumRemision .Add("@NumRemision", SqlDbType.VarChar).Value = NumRemision
.Add("@MetodoPago", SqlDbType.Int).Value = MetodoPago ' 0 Contado, 1 Credito .Add("@MetodoPago", SqlDbType.Int).Value = MetodoPago ' 0 Contado, 1 Credito
.Add("@CveSubProyectoEntrega", SqlDbType.Int).Value = CveSubProyectoEntrega
End With End With
Try Try

View File

@@ -7607,6 +7607,9 @@ Public Class ClsPaginas
Dim bytes As Byte() = Nothing Dim bytes As Byte() = Nothing
Dim CveEmpresaActual As Integer Dim CveEmpresaActual As Integer
Dim params As New List(Of ReportParameter) Dim params As New List(Of ReportParameter)
Try Try
Dim DtDetalle As DataTable = Nothing Dim DtDetalle As DataTable = Nothing
Dim ObjOC As New ClsOC Dim ObjOC As New ClsOC
@@ -7632,8 +7635,81 @@ Public Class ClsPaginas
DtDetalle = ObjOC.DtResultados DtDetalle = ObjOC.DtResultados
End If End If
'Obtenemos la sucursal de la OC PARA COMPU PROVEEDORES
Dim DomicilioSucursal As String = "" 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 CveUsuarioSol As Integer = dtOC(0)("CveUsuarioSolicito").ToString.ToEntero
Dim CveUsuarioAut As Integer = dtOC(0)("CveUsuarioAutorizo").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) 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 End If
Dim nombreautorizo As String = dtOC(0)("UsuarioAutorizo").ToString 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 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))) params.Add(New ReportParameter("Descuento", DtDetalle.SUM("Descuento").ToString.FormatoNumero(2)))
End If End If
'DATOS PARA DESCUENTO '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 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)) 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("TipoOC", If(ObjOC.Tipo = "OC", "Orden de Compra", "Requisición")))
params.Add(New ReportParameter("UsoCFDI", ObjOC.UsoCFDI)) 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("FolioAdicional", dtOC(0)("FolioAdicional").ToString))
params.Add(New ReportParameter("Vendedor", dtOC(0)("Vendedor").ToString)) params.Add(New ReportParameter("Vendedor", dtOC(0)("Vendedor").ToString))
params.Add(New ReportParameter("Observacion", dtOC(0)("PrioridadObservacion").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("ProveedorContacto", ObjOC.ProveedorContacto))
params.Add(New ReportParameter("Comprador", ObjOC.UsuarioAsignado)) params.Add(New ReportParameter("Comprador", ObjOC.UsuarioAsignado))
End If End If
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
'Dim ObjCuentasBancos As New ClsGenerales() 'Dim ObjCuentasBancos As New ClsGenerales()
'If ObjCuentasBancos.GetCuentasDepositos(CveProveedor:=ObjOC.CveProveedor) Then 'If ObjCuentasBancos.GetCuentasDepositos(CveProveedor:=ObjOC.CveProveedor) Then
@@ -7737,6 +7815,7 @@ Public Class ClsPaginas
'End If 'End If
'ObjCuentasBancos.Dispose() 'ObjCuentasBancos.Dispose()
End If End If
'params.Add(New ReportParameter("FechaOC", ObjOC.Fecha.ToShortDateString)) 'params.Add(New ReportParameter("FechaOC", ObjOC.Fecha.ToShortDateString))
Dim RutaFisicaSol As String = String.Format("Empresas\{0}\Firmas\{1}.png", EmpresaActual.CveEmpresa, CveUsuarioSol) 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)) 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), ""))) 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 Dim ObjProveedor As New ClsCompProveedores
If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, ObjOC.CveProveedor, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, EmpresaActual.CveEmpresa) Then If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, ObjOC.CveProveedor, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, EmpresaActual.CveEmpresa) Then

View File

@@ -7,10 +7,21 @@
.row { .row {
margin: 0 -10px; margin: 0 -10px;
} }
.calendar-extender-popup { /*.calendar-extender-popup {
position: absolute; 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> </style>
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
@@ -559,7 +570,7 @@
</span> </span>
</div> </div>
<ajax:MaskedEditExtender ID="METxtFechaEmision" runat="server" TargetControlID="TxtFechaEmision" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left" ></ajax:MaskedEditExtender> <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: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> <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> <ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtFechaEmision" Width="350px"></ajax:ValidatorCalloutExtender>

View File

@@ -1112,7 +1112,7 @@ Partial Class Bancos_PopIEVentas
Dim FechaEmision As Date = MinFecha 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 FechaEmision = TxtFechaEmision.Text.ToDate
If FechaEmision <= MinFecha Then If FechaEmision <= MinFecha Then

View File

@@ -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 = "", 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 Optional ValCveTipoGasto As Integer = -1, Optional ValTipoGasto As String = "", Optional ValImporte As Decimal = 0) As Boolean
Dim respuesta As Boolean = False Dim respuesta As Boolean = False
If DdlTipoComprobante.SelectedValue <> "Fac" Then
Return True
End If
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then 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 ObjCon As New ClsContratos
Dim CvePresupuesto As Integer = 0 Dim CvePresupuesto As Integer = 0
Dim Autorizado As Double = 0 Dim Autorizado As Double = 0

View File

@@ -2053,7 +2053,7 @@
<asp:UpdatePanel runat="server" ID="UpDocumentos" UpdateMode="Conditional"> <asp:UpdatePanel runat="server" ID="UpDocumentos" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDocs" AutoGenerateColumns="false" runat="server" GridLines="none" <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> <Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="60px"> <asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="60px">
<ItemTemplate> <ItemTemplate>
@@ -2093,11 +2093,17 @@
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-upload' ></i>" /> CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-upload' ></i>" />
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="50px"> <asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="50px" Visible="false">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="ImgDownLoad" runat="server"></asp:Literal> <asp:Literal ID="ImgDownLoad" runat="server"></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </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"> <asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" Visible="false">
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="LnkGVEliminar" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="LnkGVEliminar_Click" <asp:LinkButton ID="LnkGVEliminar" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="LnkGVEliminar_Click"

View File

@@ -2526,6 +2526,8 @@ Partial Class Compras_Proveedores
Dim AplicaDiasLimite As Boolean = If(e.Row.DataKey("AplicaDiasLimite").ToString = "1", True, False) 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 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) txtFechaLimite.Visible = If(AplicaDiasLimite, True, False)
' txtFechaVigencia.Visible = If(AplicaFechaVencimiento, 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 Dim linkDescargaArchivo As String = UsuarioActual.Empresa.Ruta & "Edoc/Proveedor/" & CveProveedor & "/" & Adjunto
If File.Exists(linkDescargaArchivo) Then If File.Exists(linkDescargaArchivo) Then
ImgDownLoad.Visible = True
If extencion.Length > 0 Then 'ImgDownLoad.Visible = True
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 LnkDownLoadDoc.Visible = True
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) ScriptManager.GetCurrent(Me).RegisterPostBackControl(LnkDownLoadDoc)
End If
'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 Else
ImgDownLoad.Visible = False 'ImgDownLoad.Visible = False
End If End If
Else Else
ImgDownLoad.Visible = False 'ImgDownLoad.Visible = False
End If End If
If requerido Then If requerido Then
@@ -5835,6 +5843,28 @@ Partial Class Compras_Proveedores
End Sub End Sub
#End Region #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 End Class

View File

@@ -552,22 +552,15 @@
<td style="text-align: left;"><asp:CheckBox ID="ChkObservaciones" runat="server" Text="Observaciones" Checked="false" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkObservaciones" runat="server" Text="Observaciones" Checked="false" /></td>
</tr> </tr>
<tr> <tr>
<td style="text-align: left;"> <td style="text-align: left;"><asp:CheckBox ID="ChkSubTotalPend" runat="server" Text="&nbsp;SubTotal Pendiente" Checked="false" /></td>
<asp:CheckBox ID="ChkSubTotalPend" runat="server" Text="&nbsp;SubTotal Pendiente" Checked="false" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkIVAPend" runat="server" Text="&nbsp;IVA Pendiente" Checked="false" /></td>
<td style="text-align: left;"> <td style="text-align: left;"><asp:CheckBox ID="ChkIEPSPend" runat="server" Text="&nbsp;IEPS Pendiente" Checked="false" Visible="false" /></td>
<asp:CheckBox ID="ChkIVAPend" runat="server" Text="&nbsp;IVA Pendiente" Checked="false" /></td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkIEPSPend" runat="server" Text="&nbsp;IEPS Pendiente" Checked="false" Visible="false" /></td>
<td style="text-align: left;"></td> <td style="text-align: left;"></td>
</tr> </tr>
<tr> <tr>
<td style="text-align: left;"> <td style="text-align: left;"><asp:CheckBox ID="ChkIEPSP" runat="server" Text="&nbsp; IEPS Pendiente" Checked="False" Visible="false" TextAlign="Right" /></td>
<asp:CheckBox ID="ChkIEPSP" runat="server" Text="&nbsp; IEPS Pendiente" Checked="False" Visible="false" TextAlign="Right" /> <td style="text-align: left;"><asp:CheckBox ID="ChkRetIVAPendiente" runat="server" Text="&nbsp; Ret IVA Pendiente" Checked="False" TextAlign="Right" /></td>
</td><td style="text-align: left;"> <td style="text-align: left;"><asp:CheckBox ID="ChkRetISRPendiente" runat="server" Text="&nbsp; Ret ISR Pendiente" Checked="False" TextAlign="Right" /></td>
<asp:CheckBox ID="ChkRetIVAPendiente" runat="server" Text="&nbsp; Ret IVA Pendiente" Checked="False" TextAlign="Right" />
</td><td style="text-align: left;">
<asp:CheckBox ID="ChkRetISRPendiente" runat="server" Text="&nbsp; Ret ISR Pendiente" Checked="False" TextAlign="Right" />
</td>
</tr> </tr>
</table> </table>

View File

@@ -89,6 +89,7 @@ Partial Class Contratos_RepPresupuestos
Dim FechaInicio = If(IsDate(TxtFiltrosFechaInicio.Text), TxtFiltrosFechaInicio.Text.ToDate, MinFecha) Dim FechaInicio = If(IsDate(TxtFiltrosFechaInicio.Text), TxtFiltrosFechaInicio.Text.ToDate, MinFecha)
Dim FechaFin = If(IsDate(TxtFiltrosFechaFin.Text), TxtFiltrosFechaFin.Text.ToDate, MaxFecha) Dim FechaFin = If(IsDate(TxtFiltrosFechaFin.Text), TxtFiltrosFechaFin.Text.ToDate, MaxFecha)
Dim EsMensual = ChkMensual.Checked Dim EsMensual = ChkMensual.Checked
Dim TieneDatos As Boolean = False
If UsaComprometido Then If UsaComprometido Then
thComprometido.Visible = True thComprometido.Visible = True
@@ -98,22 +99,39 @@ Partial Class Contratos_RepPresupuestos
If Not EsMensual Then If Not EsMensual Then
Dim ObjPresupuestos As New ClsContratos 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 DtPresupuestos = ObjPresupuestos.DtResultados
GvDatos.DataSource = DtPresupuestos GvDatos.DataSource = DtPresupuestos
End If End If
ObjPresupuestos.Dispose() ObjPresupuestos.Dispose()
DivDatosMensual.Visible = False DivDatosMensual.Visible = False
DivRepDatos.Visible = True DivRepDatos.Visible = True
DivIndicadores.Visible = True DivIndicadores.Visible = True
GvDatos.DataBind() 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() UpDatos.Update()
Else Else
Dim ObjPresupuestos As New ClsContratos 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 DtPresupuestos = ObjPresupuestos.DtResultados
GvDatosMensual.DataSource = DtPresupuestos GvDatosMensual.DataSource = DtPresupuestos
End If End If
@@ -122,7 +140,10 @@ Partial Class Contratos_RepPresupuestos
DivRepDatos.Visible = False DivRepDatos.Visible = False
DivIndicadores.Visible = False DivIndicadores.Visible = False
GvDatosMensual.DataBind() 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() UpDatosMensual.Update()
End If End If

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

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

View File

@@ -157,48 +157,42 @@
<asp:UpdatePanel runat="server" ID="Upsaldar" UpdateMode="Conditional"> <asp:UpdatePanel runat="server" ID="Upsaldar" UpdateMode="Conditional">
<ContentTemplate> <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="row" runat="server" id="DvSaldar" visible="false">
<div class="col-md-1" style="text-align: left"> <div class="col-md-1" style="text-align: left">Fecha:</div>
<asp:TextBox ID="TxtConcepto" CssClass="form-control" runat="server"></asp:TextBox> <div class="col-md-2">
<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> <div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
<ajax:ValidatorCalloutExtender ID="VcoConcepto" runat="server" HighlightCssClass="vco" TargetControlID="RfvConcepto"></ajax:ValidatorCalloutExtender> <asp:TextBox ID="TxtFecha" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
</div> <span class="input-group-btn ">
<asp:LinkButton ID="LnkCortfecha" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
<div class="col-md-1" > </span>
<asp:Button ID="BtnSaldar" OnClick="BtnSaldar_Click" runat="server" Text="Saldar" CssClass="btn btn-primary" ValidationGroup="VgGuardar" /> <ajax:MaskedEditExtender ID="MEECortfecha" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
</div> <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>
<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> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
@@ -206,7 +200,7 @@
<ajax:TabContainer runat="server" ID="Tabs"> <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> <ContentTemplate>
<div class="row"> <div class="row">
@@ -271,7 +265,8 @@
<div class="modal-body"> <div class="modal-body">
<asp:UpdatePanel runat="server" ID="UpBodyTipoCambio" UpdateMode="Conditional"> <asp:UpdatePanel runat="server" ID="UpBodyTipoCambio" UpdateMode="Conditional">
<ContentTemplate> <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 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="Dólares en Tipo Cambio de la Fecha Venta" Value="2"></asp:ListItem>
<asp:ListItem Text="Tipo Cambio Especifico" Value="3"></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"> <div class="row" style="margin-left: 10px;" runat="server" id="LiEspecifico" visible="false">
Especifico: Especifico:
<asp:TextBox ID="TxtEspecifico" runat="server" Width="55px" /> <asp:TextBox ID="TxtEspecifico" runat="server" Width="55px" />
</div> </div>--%>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<asp:Button ID="BtnTipoCambio" runat="server" OnClick="BtnTipoCambio_Click" Text="Aceptar" class="btn btn-primary" /> <%-- <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> <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>--%>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -9,7 +9,7 @@ Partial Public Class General_SaldosMenores
Inherits ClsPaginas Inherits ClsPaginas
#Region "PROPIEDADES" #Region "PROPIEDADES"
Private Property DtDatos As DataTable Private Property DtDatosIXC As DataTable
Get Get
Return DirectCast(ViewState("DtDatos"), DataTable) Return DirectCast(ViewState("DtDatos"), DataTable)
End Get End Get
@@ -61,6 +61,114 @@ Partial Public Class General_SaldosMenores
End If End If
End Sub 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>&nbsp;&nbsp; "
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" #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()) txtFechaF.Text = If(Request("FechaF") Is Nothing, NowADS().ToString(), Request("FechaF").ToString())
TipoCambio = If(Request("TipoCambio") Is Nothing, 1, Request("TipoCambio").ToString().ToEntero()) TipoCambio = If(Request("TipoCambio") Is Nothing, 1, Request("TipoCambio").ToString().ToEntero())
TCEspecifico = If(Request("TCEspecifico") Is Nothing, -1, Request("TCEspecifico").ToString().ToDouble()) TCEspecifico = If(Request("TCEspecifico") Is Nothing, -1, Request("TCEspecifico").ToString().ToDouble())
RblTipoCambio.SelectedValue = TipoCambio.ToString() 'RblTipoCambio.SelectedValue = TipoCambio.ToString()
LiEspecifico.InnerText = TCEspecifico.FormatoNumero() 'LiEspecifico.InnerText = TCEspecifico.FormatoNumero()
Dim FechaICorte As DateTime Dim FechaICorte As DateTime
FechaICorte = If(Request("FechaICorte") Is Nothing, DateTime.MinValue, Request("FechaICorte").ToString().ToDate()) FechaICorte = If(Request("FechaICorte") Is Nothing, DateTime.MinValue, Request("FechaICorte").ToString().ToDate())
CargaDatos()
Tipo = -1
End Sub End Sub
Protected Sub CargaSucursales() 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.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa)
DdlSubProyectoSaldar.DataBind() DdlSubProyectoSaldar.DataBind()
End Sub 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 Protected Sub CargaDatosIXC()
CveMoneda = -1
End If
'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 Dim FechaICorte As DateTime = MinFecha
'If TxtFechaICorte.Text <> "" Then
' FechaICorte = TxtFechaICorte.Text.ToDate()
'Else
' FechaICorte = DateTime.MinValue
'End If
Dim FechaFCorte As DateTime = MaxFecha 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 ObjVenta As New ClsVentas()
Dim CveCliente As Integer = -1 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, 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 SaldoMayorA:=TxtSaldoMayorA.Text.ToDecimal, SaldoMenorA:=TxtSaldoMenorA.Text.ToDecimal) Then
GvDatosIXC.DataSource = ObjVenta.DtResultados GvDatosIXC.DataSource = ObjVenta.DtResultados
DtDatos = ObjVenta.DtResultados DtDatosIXC = ObjVenta.DtResultados
End If End If
ObjVenta.Dispose() ObjVenta.Dispose()
GvDatosIXC.DataBind() GvDatosIXC.DataBind()
UpDatos.Update() 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 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 Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
'GenerarPDF("EXCEL") 'GenerarPDF("EXCEL")
@@ -173,80 +259,7 @@ Partial Public Class General_SaldosMenores
'GenerarPDF("PDF") 'GenerarPDF("PDF")
End Sub End Sub
'Protected Sub GenerarPDF(Opcion As String)
' Dim FechaI As String
' If txtFechaI.Text = "" OrElse txtFechaI.Text = "__/__/____" Then
' FechaI = "-1"
' Else
' FechaI = $"&emsp;<b>Fecha Inicial:</b> {txtFechaI.Text}"
' End If
' Dim FechaF As String
' If txtFechaF.Text = "" OrElse txtFechaF.Text = "__/__/____" Then
' FechaF = "-1"
' Else
' FechaF = $"&emsp;<b>Fecha Final:</b> {txtFechaF.Text}"
' End If
' Dim FechaICorte As String
' If TxtFechaICorte.Text = "" OrElse TxtFechaICorte.Text = "__/__/____" Then
' FechaICorte = ""
' Else
' FechaICorte = $"&emsp;<b>Fecha Inicial Corte:</b> {TxtFechaICorte.Text}"
' End If
' Dim FechaFCorte As String
' If TxtFechaFCorte.Text = "" OrElse TxtFechaFCorte.Text = "__/__/____" Then
' FechaFCorte = ""
' Else
' FechaFCorte = $"&emsp;<b>Fecha Final Corte:</b> {TxtFechaFCorte.Text}"
' End If
' Dim Sucursal As String
' If DdlSucursal.SelectedValue <> "-1" Then
' Sucursal = $"&emsp;<b>Sucursal:</b> {DdlSucursal.SelectedItem.Text}"
' Else
' Sucursal = ""
' End If
' Dim Cliente As String = ""
' Dim ConSaldo As String
' If DdlConSaldo.SelectedValue <> "-1" Then
' ConSaldo = $"&emsp;<b>Con Saldo:</b> {DdlConSaldo.SelectedItem.Text}"
' Else
' ConSaldo = ""
' End If
' Dim Tipo2 As String
' If DdlTipo.SelectedValue <> "-1" Then
' Tipo2 = $"&emsp;<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 Protected Sub GvDatosIXC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosIXC.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
@@ -338,120 +351,10 @@ Partial Public Class General_SaldosMenores
RegistraScript("$('#DivModalSaldar').modal();") RegistraScript("$('#DivModalSaldar').modal();")
End Sub 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>&nbsp;&nbsp; "
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 #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 #End Region

View File

@@ -15,14 +15,14 @@ Partial Class Inventarios_EntregaAlmacen
Inherits ClsPaginas Inherits ClsPaginas
#Region "PROPIEDADES" #Region "PROPIEDADES"
Private Property CveVentaAD As Integer 'Private Property CveVentaAD As Integer
Get ' Get
Return CType(ViewState("CveVentaAD"), Integer) ' Return CType(ViewState("CveVentaAD"), Integer)
End Get ' End Get
Set(value As Integer) ' Set(value As Integer)
ViewState("CveVentaAD") = value ' ViewState("CveVentaAD") = value
End Set ' End Set
End Property 'End Property
Private Property DtDatos As DataTable Private Property DtDatos As DataTable
Get Get
Return CType(ViewState("DtDatos"), DataTable) Return CType(ViewState("DtDatos"), DataTable)
@@ -468,14 +468,14 @@ Partial Class Inventarios_EntregaAlmacen
#Region " CARGA PARAMETROS - EXCLUSIVO USO AD " #Region " CARGA PARAMETROS - EXCLUSIVO USO AD "
Private Sub CargaParametrosAD() Private Sub CargaParametrosAD()
CveVentaAD = -1 'CveVentaAD = -1
'If UsuarioActual.CveUsuario <> 100 Then 'If UsuarioActual.CveUsuario <> 100 Then
' Exit Sub ' Exit Sub
'End If 'End If
If Not IsNothing(Request("CveVenta")) AndAlso IsNumeric(Request("CveVenta")) Then If Not IsNothing(Request("CveVenta")) AndAlso IsNumeric(Request("CveVenta")) Then
CveVentaAD = Request("CveVenta").ToEntero() 'CveVentaAD = Request("CveVenta").ToEntero()
CargaVentaPorSurtir(Request("CveVenta").ToEntero()) CargaVentaPorSurtir(Request("CveVenta").ToEntero())
'LbSurtida.Visible = True 'LbSurtida.Visible = True
'LbSurtida.Text = "SOLO MODO VISUAL" 'LbSurtida.Text = "SOLO MODO VISUAL"
@@ -611,7 +611,7 @@ Partial Class Inventarios_EntregaAlmacen
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
Dim CveOS As Integer = GvRow.DataKey("CveOS").ToEntero Dim CveOS As Integer = GvRow.DataKey("CveOS").ToEntero
CveVentaAD = -1 'CveVentaAD = -1
If Boton.CommandArgument.ToEntero() > 0 Then If Boton.CommandArgument.ToEntero() > 0 Then
TimmerRefresh.Enabled = False TimmerRefresh.Enabled = False
@@ -634,7 +634,7 @@ Partial Class Inventarios_EntregaAlmacen
End Sub End Sub
Protected Sub BtnBuscar_Click(sender As Object, e As EventArgs) Protected Sub BtnBuscar_Click(sender As Object, e As EventArgs)
CveVentaAD = -2 'CveVentaAD = -2
CargaVentaPorSurtir(DdlFolio.SelectedValue.ToEntero()) CargaVentaPorSurtir(DdlFolio.SelectedValue.ToEntero())
End Sub End Sub
Private Sub CargaVentaPorSurtir(CveVenta As Integer, Optional CveAlmacen As Integer = -1, Optional CveOS As Integer = -1) 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() EsDevolucionVenta = drE("EsDevolucionVenta").ToString().ToEntero()
TipoDocto = DtDatos.Rows(0)("TipoDocto").ToString() 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 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}" 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")) Dim ValidaSalidaCompleta As Boolean = Not (EsDevolucionVenta = 1 And TipoDocto.Contiene("Rem", "Ped"))
'LIMITAR EL NUMERO DE PARTIDAS QUE SE PUEDEN ENTREGAR 'LIMITAR EL NUMERO DE PARTIDAS QUE SE PUEDEN ENTREGAR
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then 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 'SoloNumeros entrega
If NumRegistros > 5 Then 'SI EL CLIENTE ES OPERADORA DE HOSPITALES ANGELES SOLO SE PUEDEN RECIBIR MAXIMO 9
Alert("Solo se pueden recibir máximo 5 partidas.", TipoMensaje.MsgAdvertencia) If Not EsDevolucionVenta = 1 Then
Exit Sub If CveCliente = 819998 Then
End If If NumRegistros > 9 Then
Else Alert("Solo se pueden recibir máximo 9 partidas.", TipoMensaje.MsgAdvertencia)
If NumRegistros > 10 Then Exit Sub
Alert("Solo se pueden recibir máximo 10 partidas.", TipoMensaje.MsgAdvertencia) End If
Exit Sub Else
If NumRegistros > 10 Then
Alert("Solo se pueden recibir máximo 10 partidas.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If End If
End If End If
ValidaSalidaCompleta = False ValidaSalidaCompleta = False
End If End If

View File

@@ -272,7 +272,11 @@
</div> </div>
<label class="col-md-2" runat="server" id="DivLugarEntrega1">Lugar Entrega:</label> <label class="col-md-2" runat="server" id="DivLugarEntrega1">Lugar Entrega:</label>
<div class="col-md-4" runat="server" id="DivLugarEntrega2"> <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>
<div class="row" runat="server" visible="False" id="TrCancelacion"> <div class="row" runat="server" visible="False" id="TrCancelacion">
<label class="col-md-2">Cancelacion:</label> <label class="col-md-2">Cancelacion:</label>

View File

@@ -629,6 +629,8 @@ Partial Class OC_OC
TxtFecha.Enabled = False TxtFecha.Enabled = False
End If End If
CargarCentrosDeCosto(Nothing, DdlSubProyectoEntrega, Nothing, Nothing, "Seleccione")
'CARGA YA REGISTRADO 'CARGA YA REGISTRADO
If Request("OC") IsNot Nothing AndAlso IsNumeric(Request("OC")) AndAlso Request("OC").ToEntero > 0 Then 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 ' aqui tiene otras condiciones especiales
If CveOrdenCompra <> Nothing AndAlso CveOrdenCompra > 0 Then If CveOrdenCompra <> Nothing AndAlso CveOrdenCompra > 0 Then
DdlSubProyecto.DataSource = DtEstatusUsuarios.FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"}) DdlSubProyecto.DataSource = DtEstatusUsuarios.FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"})
'DdlSubProyectoEntrega.DataSource = DtEstatusUsuarios.FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"})
Else Else
DdlSubProyecto.DataSource = DtEstatusUsuarios.FiltraParametros(" SPEstatus = 1 ", "", {"CveSubProyecto", "SubProyecto"}) DdlSubProyecto.DataSource = DtEstatusUsuarios.FiltraParametros(" SPEstatus = 1 ", "", {"CveSubProyecto", "SubProyecto"})
'DdlSubProyectoEntrega.DataSource = DtEstatusUsuarios.FiltraParametros(" SPEstatus = 1 ", "", {"CveSubProyecto", "SubProyecto"})
End If End If
DdlSubProyecto.DataBind() DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
'DdlSubProyectoEntrega.DataBind()
'DdlSubProyectoEntrega.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlSubProyectoContrato.Items.Clear() 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.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() DdlSubProyectoContrato.DataBind()
@@ -933,6 +942,11 @@ Partial Class OC_OC
' End If ' End If
'End If 'End If
If UsuarioActual.CveRol = 1 Then
chkSubProyectoEntrega.Visible = True
End If
End If End If
MostrarUsuarioAsignado() MostrarUsuarioAsignado()
@@ -1359,6 +1373,19 @@ Partial Class OC_OC
TieneInventario = CBool(objOC.DtResultados.Rows(0)("TieneInvOC")) TieneInventario = CBool(objOC.DtResultados.Rows(0)("TieneInvOC"))
DdlMetodoPago.SelectedValueExist(objOC.DtResultados.Rows(0)("MetodoPago")) 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 'PROMOCIONES
TxtPromocion.Text = objOC.Promocion TxtPromocion.Text = objOC.Promocion
ChkPromocion.Checked = TxtPromocion.Text.Trim.Length > 0 ChkPromocion.Checked = TxtPromocion.Text.Trim.Length > 0
@@ -1593,6 +1620,9 @@ Partial Class OC_OC
EditarOC = False EditarOC = False
End Select End Select
End If End If
'If objOC.TipoTermino = 2 Then 'If objOC.TipoTermino = 2 Then
@@ -2609,6 +2639,11 @@ Partial Class OC_OC
TieneError = True TieneError = True
End If 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 Return TieneError
End Function 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, 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, 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, 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 CveOrdenCompraPadre = OC.CveOrdenCompra
If CveOrdenCompraPadre > 0 Then 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, 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), 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, 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 CveOrdenCompra = OC.CveOrdenCompra
CveEstatus = CboE.SelectedValue.ToEntero CveEstatus = CboE.SelectedValue.ToEntero
@@ -2926,7 +2962,7 @@ Partial Class OC_OC
LugarEntrega, DdlMoneda.SelectedValue.ToEntero, CveProveedor, CveOrdenCompra, UsuarioActual.CveUsuario, Ddlcliente.txtValue.Value.ToEntero, 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), 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, 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 CveProveedorOriginal <> CveProveedor Then
If Not ObjConta.UpdateProveedorPoliza(CveOrdenCompra, CveProveedor, Proveedor) Then If Not ObjConta.UpdateProveedorPoliza(CveOrdenCompra, CveProveedor, Proveedor) Then
TieneError = True 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, 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, 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, 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, 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 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 '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, 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, 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, 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 '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 End Class

View File

@@ -229,9 +229,16 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-Width="60px" HeaderText="Hora Servicio"> <asp:TemplateField ItemStyle-Width="60px" HeaderText="Hora Servicio">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlHoraServicio" runat="server" Visible="false" Text='<%# Eval("HoraCita", "{0:t}")%>'> ></asp:Literal> <table style="width:58px!important">
<cc1:TimeSelector ID="TimeSelector" runat="server" DisplaySeconds="false" DisplayButtons="false" Visible="false" SelectedTimeFormat="TwentyFour" Width="60px" Height="20px" CssClass="test" > <tr>
</cc1:TimeSelector> <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> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<%--11--%> <%--11--%>

View File

@@ -465,7 +465,7 @@ Partial Class OS_OrdenesServicios
DvTxtEpisodioModal.Visible = True DvTxtEpisodioModal.Visible = True
DvTxtFolioRemisionModal.Visible = True DvTxtFolioRemisionModal.Visible = True
If CveOS > 0 And TipoEstatus >= 3 Then If CveOS > 0 And TipoEstatus >= 2 Then
DdlUsuarioAtendio.Enabled = True DdlUsuarioAtendio.Enabled = True
DVUsuarioAtendio3.Visible = True DVUsuarioAtendio3.Visible = True
End If End If

View File

@@ -462,6 +462,10 @@ Partial Class Sistemas_UsuarioDetalle
DivDatosAutorizacion.Visible = True DivDatosAutorizacion.Visible = True
End If End If
If UsuarioActual.Empresa.Funcionalidad(109).ToString = "1" Then
TrDescuentoAutorizado.Visible = True
End If
If UsuarioActual.Empresa.Funcionalidad(599) = "1" Then If UsuarioActual.Empresa.Funcionalidad(599) = "1" Then
TrCodigoAcceso.Visible = True TrCodigoAcceso.Visible = True
End If End If

View File

@@ -343,7 +343,7 @@ Partial Class Ventas_ActualizarPrecios
If Not TieneError Then 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 Else
Exit For Exit For
End If End If
@@ -603,7 +603,7 @@ Partial Class Ventas_ActualizarPrecios
Correcto = ObjPS.UpdatePSPreciosLista(PrecioNuevo, CvePrecioLista, Porcentaje, CvePS, UsuarioActual.CveUsuario, NowADS(), True) Correcto = ObjPS.UpdatePSPreciosLista(PrecioNuevo, CvePrecioLista, Porcentaje, CvePS, UsuarioActual.CveUsuario, NowADS(), True)
If Correcto Then If Correcto Then
RowsCargados += 1 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 End If
Else Else
If CvePS > 0 AndAlso CvePrecioLista = -2 Then If CvePS > 0 AndAlso CvePrecioLista = -2 Then
@@ -652,7 +652,7 @@ Partial Class Ventas_ActualizarPrecios
End If End If
End Sub 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 FranquiciasStr As String = UsuarioActual.Empresa.Funcionalidad(563)
Dim StrMsg As New StringBuilder Dim StrMsg As New StringBuilder
Dim StrMsgError 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") ' 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) ' StrMsg.AppendFormat("El precio lista '{0}' no existe en la Franquicia '{1}'<br/>", DdlPrecioLista.SelectedItem.Text, EmpresaFranquicia)
'End If '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") StrMsgError.AppendFormat("No se pudo actualizar el producto")
End If End If
Next Next
@@ -960,7 +960,9 @@ Partial Class Ventas_ActualizarPrecios
End If End If
End Sub End Sub
Protected Sub LnkGuardarMultiple_Click(sender As Object, e As EventArgs) 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 Dim ObjPS As New ClsProductosServicios
ObjPS.IniciaTransacSQL() ObjPS.IniciaTransacSQL()
@@ -984,6 +986,28 @@ Partial Class Ventas_ActualizarPrecios
TieneError = Not ObjPS.UpdatePSPreciosLista(Precio, CvePrecioLista, 0, CvePS, UsuarioActual.CveUsuario, NowADS(), True) 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 If TieneError Then
Exit For Exit For
End If End If

View File

@@ -346,7 +346,7 @@
<table> <table>
<td style="white-space: nowrap;">Fecha Emisión:</td> <td style="white-space: nowrap;">Fecha Emisión:</td>
<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> <asp:TextBox ID="TxtFechaEmision" runat="server" CssClass="form-control"></asp:TextBox>
<span class="input-group-btn "> <span class="input-group-btn ">
<asp:LinkButton runat="server" ID="LnkImgTxtFechaEmision" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton> <asp:LinkButton runat="server" ID="LnkImgTxtFechaEmision" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>

View File

@@ -618,7 +618,7 @@ Partial Class Ventas_ClientesAbonar
Dim FechaEmision As Date = MinFecha 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 FechaEmision = TxtFechaEmision.Text.ToDate
If FechaEmision <= MinFecha Then If FechaEmision <= MinFecha Then

View File

@@ -24,6 +24,16 @@
<li> <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> <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> </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>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content> </asp:Content>
@@ -210,7 +220,7 @@
<ajax:ValidatorCalloutExtender ID="vcoCvFAplicadoF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaAplicadoF" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="vcoCvFAplicadoF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaAplicadoF" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<label id="lblEsDistribuidor" runat="server" visible="false" class="col-md-1 truncate">Es Distribuidor:</label> <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"> <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%"> <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>
</div> </div>
</div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <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" <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"> DataKeyNames="CveVenta">
<Columns> <Columns>
@@ -291,10 +304,27 @@
<asp:BoundField HeaderText="Dias Pago" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.##}" DataField="DiasPagados" /> <asp:BoundField HeaderText="Dias Pago" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.##}" DataField="DiasPagados" />
<asp:BoundField HeaderText="Forma Pago" DataField="TipoTransaccion" /> <asp:BoundField HeaderText="Forma Pago" DataField="TipoTransaccion" />
<asp:BoundField HeaderText="MSI" DataField="MesesSinIntereses" /> <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> </Columns>
</asp:GridView> </asp:GridView>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<asp:UpdatePanel runat="server" ID="UpTipoCambio" UpdateMode="Conditional"> <asp:UpdatePanel runat="server" ID="UpTipoCambio" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div id="DivTipoCambio" class="modal fade" role="dialog"> <div id="DivTipoCambio" class="modal fade" role="dialog">
@@ -329,6 +359,108 @@
</div> </div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </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">&times;</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="&nbsp;Folio" /></td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkFecha" runat="server" Text="&nbsp;Fecha" /></td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkSubTotal" runat="server" Text="&nbsp;SubTotal" /></td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkObservaciones" runat="server" Text="&nbsp;Observaciones" /></td>
</tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkDescuento" runat="server" Text="&nbsp;Descuento" /></td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkVendedor" runat="server" Text="&nbsp;Vendedor" Checked="false" /></td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkSucursal" runat="server" Text="&nbsp;Sucursal" /></td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkCodigo" runat="server" Text="&nbsp;Código Cliente"/></td>
</tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkLimiteCredito" runat="server" Text="&nbsp;Limite Credito" /></td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkRetIVA" runat="server" Text="&nbsp;Ret. IVA" /></td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkCliente" runat="server" Text="&nbsp;Cliente" /></td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkRetISR" runat="server" Text="&nbsp;Ret. ISR" /></td>
</tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkSucursalCliente" runat="server" Text="&nbsp;Sucursal Cliente" /></td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkTotal" runat="server" Text="&nbsp;Total" /></td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkDiasTranscurridos" runat="server" Text="&nbsp;Días Transcurridos" /></td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkDiasPago" runat="server" Text="&nbsp;Dias Pago" /></td>
</tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkTC" runat="server" Text="&nbsp;Tipo Cambio" /></td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkMostrarDescripcionVenta" runat="server" Text="&nbsp;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>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
<script type="text/javascript"> <script type="text/javascript">

View File

@@ -71,11 +71,22 @@ Partial Class Ventas_RepRecuperacionDetalle
End Set End Set
End Property 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 #End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
CargaCombos() CargaCombos()
CargaPersonalizacion()
CargaDatos() CargaDatos()
End If End If
End Sub End Sub
@@ -373,5 +384,345 @@ Partial Class Ventas_RepRecuperacionDetalle
Else Else
LiEspecifico.Visible = False LiEspecifico.Visible = False
End If 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 End Class

View File

@@ -4409,6 +4409,7 @@
<asp:HiddenField ID="HdnIVADescPS" runat="server" ClientIDMode="Static" Value="0" /> <asp:HiddenField ID="HdnIVADescPS" runat="server" ClientIDMode="Static" Value="0" />
<asp:HiddenField ID="HdnConsecPS" runat="server" ClientIDMode="Static" Value="-1" /> <asp:HiddenField ID="HdnConsecPS" runat="server" ClientIDMode="Static" Value="-1" />
<asp:HiddenField ID="HdnTotalCompra" runat="server" ClientIDMode="Static" Value="0" /> <asp:HiddenField ID="HdnTotalCompra" runat="server" ClientIDMode="Static" Value="0" />
<asp:HiddenField ID="HdnPorcentajeMaxDescPS" runat="server" ClientIDMode="Static" Value="100" />
<table style="width: 90%"> <table style="width: 90%">
<tr> <tr>
<td>SubTotal</td> <td>SubTotal</td>
@@ -10083,16 +10084,21 @@
function CalculaDescPS() { function CalculaDescPS() {
console.log("evento descuento"); console.log("evento descuento");
let ivaPor = parseFloat($get("HdnIVADescPS").value) ;
if ($get("TxtPorPS").value != "") { if ($get("TxtPorPS").value != "") {
let PorcentajeDescuento = parseFloat($get("TxtPorPS").value); let PorcentajeDescuento = parseFloat($get("TxtPorPS").value);
if (PorcentajeDescuento < 0 || PorcentajeDescuento > 100) { let PorcentajeMaximoDescuento = parseFloat($get("HdnPorcentajeMaxDescPS").value);
alert("No se puede aplicar ese porcentaje de descuento");
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("TxtPorPS").value = "0";
$get("HdnDescPS").value = "0";
LimpiarTotalDescPS(ivaPor);
recalcularUtilidad(0); recalcularUtilidad(0);
return; return;
} }
let ivaPor = parseFloat($get("HdnIVADescPS").value) ;
let subTotal = parseFloat($get("LblSubtotalDescPS").innerText.replace(",", "").replace(",", "")); let subTotal = parseFloat($get("LblSubtotalDescPS").innerText.replace(",", "").replace(",", ""));
$get("LblDescPS").innerText = formato_numero(((subTotal * PorcentajeDescuento) / 100), 2, '.', ','); $get("LblDescPS").innerText = formato_numero(((subTotal * PorcentajeDescuento) / 100), 2, '.', ',');
@@ -10111,20 +10117,24 @@
recalcularUtilidad(descuento) recalcularUtilidad(descuento)
} else { } else {
let subTotal = parseFloat($get("LblSubtotalDescPS").innerText.replace(",", "").replace(",", "")); LimpiarTotalDescPS(ivaPor);
$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";
recalcularUtilidad(0); 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){ function recalcularUtilidad(descuento){
let totalCompra = parseFloat($get("HdnTotalCompra").value); let totalCompra = parseFloat($get("HdnTotalCompra").value);
if (totalCompra > 0) { if (totalCompra > 0) {
@@ -10667,8 +10677,8 @@
var td; var td;
let idxHeader = 0; let idxHeader = 0;
for (var key in item) { for (var key in item) {
if (idxHeader == 0 && '<%= UsuarioActual.Empresa.Funcionalidad(382) %>' == '1') { 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>'); 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; let idxColumn = 0;
for (var key in item) { 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>'; 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>'); tr.append('<td>' + tdExistencia + '</td>');

View File

@@ -3228,9 +3228,13 @@ Partial Class Ventas
' End If ' End If
'End If 'End If
If UsuarioActual.Empresa.Funcionalidad(301) <> "" Then If UsuarioActual.Empresa.Funcionalidad(301) = "1" Then
TxtFecha.Enabled = True TxtFecha.Enabled = True
ImgFecha.Visible = True ImgFecha.Visible = True
Else
TxtFecha.Enabled = False
ImgFecha.Visible = False
CEFecha.Enabled = False
End If End If
CargarCodigo() 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 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"))) Dim TienePermiso As String = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, -1).FiltroPrimeroValor("CveSubProyecto", String.Format("CveSubProyecto = {0}", DbRowVenta("CveSubProyecto")))
If TienePermiso <> "" Then 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 If (CveEstatus = 5 AndAlso DbRowVenta("CveEstatusRefacturacion").ToString().ToEntero() = 4) Then
RefacturarCancelada = True RefacturarCancelada = True
End If End If
@@ -5065,9 +5072,18 @@ Partial Class Ventas
' End If ' End If
'End If 'End If
'si utiliza cortes, y cajas, no permitir cancelar de días anteriores '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 If (UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(382) = "1") Then
LbCancelarDocumento.Visible = UsuarioActual.TienePermisoProceso(378) 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 End If
End If End If
@@ -7272,7 +7288,11 @@ Partial Class Ventas
TxtCantidad.Focus() TxtCantidad.Focus()
End If 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 'If UsuarioActual.Empresa.Funcionalidad(705) = "1" Then
' Using ObjVentas As New ClsVentas ' Using ObjVentas As New ClsVentas
' If ObjVentas.GetLineasAdicionales(-1, CveCliente, -1, -1, DdlMoneda.SelectedValue.ToEntero(), MinFecha, MaxFecha, 0, UsuarioActual.CveEmpresa) Then ' 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() LblIVADescPS.Text = GvRow.DataKey("ImporteIVA").FormatoNumero()
HdnIVADescPS.Value = GvRow.DataKey("IVA").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 Using ObjPS As New ClsProductosServicios
Dim PrecioCompra = ObjPS.GetUltimoPrecioCompra(UsuarioActual.CveEmpresa, GvRow.DataKey("CvePS").ToEntero()) Dim PrecioCompra = ObjPS.GetUltimoPrecioCompra(UsuarioActual.CveEmpresa, GvRow.DataKey("CvePS").ToEntero())
If PrecioCompra > 0 Then If PrecioCompra > 0 Then
@@ -25650,7 +25679,7 @@ Partial Class Ventas
Dim AplicaCancelacionConPagos As Boolean = False 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 AplicaCancelacionConPagos = True
End If End If
@@ -38276,7 +38305,21 @@ Partial Class Ventas
If UsuarioAutorizar.TienePermisoProceso(374) Then If UsuarioAutorizar.TienePermisoProceso(374) Then
txtUserDesc.Text = "" txtUserDesc.Text = ""
txtPassDesc.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") RegistraScript("$('#ModalPermisoDesc').modal('hide');$('#ModalDescPS').modal({backdrop: 'static', keyboard: false});", "AUT")
Else Else