merge aggresivo
This commit is contained in:
@@ -4749,13 +4749,17 @@ Public Class ClsInventarios
|
||||
|
||||
#Region "MOVIMIENTOS SALIDA"
|
||||
|
||||
Public Function GetRepMovimientosSalida(FechaI As Date, FechaF As Date, CveEmpresa As Integer) As Boolean
|
||||
Public Function GetRepMovimientosSalida(FechaI As Date, FechaF As Date, CveSubProyecto As Integer, CveCliente As Integer, CveClasificacion As Integer, Grupo As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_RepMovimientosSalidaGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Grupo", SqlDbType.Int).Value = Grupo
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -4262,13 +4262,14 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/General/CatDiasInhabiles.aspx".ToUpper(), 429)
|
||||
PaginaDict.Add("/General/CatTipoCambio.aspx".ToUpper(), 642)
|
||||
PaginaDict.Add("/General/PopUpPaqueteriasGuias.aspx".ToUpper(), 659)
|
||||
PaginaDict.Add("/General/PopUpPaqueteriasGuiasInternas.aspx".ToUpper(), 659)
|
||||
PaginaDict.Add("/General/CatPaqueterias.aspx".ToUpper(), 665)
|
||||
PaginaDict.Add("/General/CatDocumentacionTipo.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/General/CatModelos.aspx".ToUpper(), 710)
|
||||
PaginaDict.Add("/General/CatRinTamanios.aspx".ToUpper(), 711)
|
||||
PaginaDict.Add("/General/CatMedidas.aspx".ToUpper(), 712)
|
||||
PaginaDict.Add("/General/CatSatListado69B.aspx".ToUpper, 1038)
|
||||
PaginaDict.Add("/General/PopUpPaqueteriasGuiasInternas.aspx".ToUpper(), 727)
|
||||
|
||||
|
||||
#End Region
|
||||
#Region "GPS"
|
||||
|
||||
@@ -339,7 +339,8 @@ Public Class ClsVentas
|
||||
Optional ObservacionesAlmacen As String = "", Optional CveSubProyecto As Integer = -1, Optional CveSubProyectoEjecucion As Integer = -1, Optional CveSubProyectoCobranza As Integer = -1,
|
||||
Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional CveUsoCFDI As Integer = -1, Optional OrdenCompra As String = "-1", Optional CveCuentaTerminal As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ImpuestoLocal As Double = 0,
|
||||
Optional CveTipoAmortizacionAnticipo As Integer = -1, Optional CveVentaRelacion As Integer = -1, Optional ImporteRelacion As Decimal = -1, Optional CveEmpresaCRM As Integer = -1, Optional EsInterno As Integer = -1, Optional CveAcercamientoCRM As Integer = -1,
|
||||
Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0) As Boolean
|
||||
Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0,
|
||||
Optional CorreoNotificacion As String = "") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_VentasAdd")
|
||||
@@ -428,6 +429,7 @@ Public Class ClsVentas
|
||||
.Add("@Kilometraje", SqlDbType.Float).Value = Kilometraje
|
||||
.Add("@EsAmortizacion", SqlDbType.Bit).Value = EsAmortizacion
|
||||
.Add("@CveTipoRetencion", SqlDbType.TinyInt).Value = CveTipoRetencion
|
||||
.Add("@CorreoNotificacion", SqlDbType.VarChar).Value = CorreoNotificacion
|
||||
|
||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||
End With
|
||||
|
||||
@@ -544,6 +544,8 @@ Namespace Extensiones
|
||||
Alert("", String.Format("{0} code[FilesMove]", ex.Message), TipoMensaje.MsgAdvertencia)
|
||||
retorno = False
|
||||
End Try
|
||||
directorioOld.Clear()
|
||||
directorioNew.Clear()
|
||||
Return retorno
|
||||
End Function
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
@@ -2044,6 +2046,8 @@ Namespace Extensiones
|
||||
HttpContext.Current.Response.Write(style.ToString)
|
||||
HttpContext.Current.Response.Write(sb.ToString())
|
||||
HttpContext.Current.Response.End()
|
||||
sb.Clear()
|
||||
style.Clear()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -2076,6 +2080,8 @@ Namespace Extensiones
|
||||
HttpContext.Current.Response.Write(style.ToString)
|
||||
HttpContext.Current.Response.Write(sb.ToString())
|
||||
HttpContext.Current.Response.End()
|
||||
sb.Clear()
|
||||
style.Clear()
|
||||
End Sub
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Sub ExportToExcel(datatable As DataTable, NombreArchivoXLSX As String)
|
||||
@@ -2284,6 +2290,7 @@ Namespace Extensiones
|
||||
HttpContext.Current.Response.Write(style.ToString)
|
||||
HttpContext.Current.Response.Write(pdfDoc)
|
||||
HttpContext.Current.Response.[End]()
|
||||
style.Clear()
|
||||
End Using
|
||||
End Using
|
||||
End Sub
|
||||
|
||||
@@ -77,7 +77,7 @@ Partial Class Bancos_CargarConciliacionesBancarias
|
||||
Protected Sub BtnCargaExcel_Click(sender As Object, e As EventArgs)
|
||||
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
|
||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & file.patch
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.patch
|
||||
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
CargaExcel(Directorio, file.filename, Tipo)
|
||||
Else
|
||||
|
||||
@@ -2492,7 +2492,7 @@ Partial Class Bancos_IE
|
||||
|
||||
'GUARDA COMPROBANTE
|
||||
If filemove <> "" Then
|
||||
filemove.FilesMove(CveIE.ToString, String.Format("Empresas\{0}\IE", UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta))
|
||||
filemove.FilesMove(CveIE.ToString, String.Format("Empresas\{0}\IE", UsuarioActual.CveEmpresa))
|
||||
End If
|
||||
|
||||
'GUARDA PREPOLIZAS DETALLE [PRIMERO SON LOS CASOS ESPECIALES, AL FINAL (ELSE) LOS CASOS NORMALES] --REEMPLAZA IFs
|
||||
|
||||
@@ -2364,10 +2364,8 @@
|
||||
|
||||
<table>
|
||||
<tr id="TrRembolsoUpdate" runat="server" visible="False">
|
||||
<td>Rembolso:
|
||||
|
||||
|
||||
|
||||
<td>Reembolso:
|
||||
|
||||
<asp:RadioButtonList ID="RblRembolso" OnSelectedIndexChanged="RblRembolso_SelectedIndexChanged" RepeatDirection="Horizontal" runat="server" AutoPostBack="True">
|
||||
<asp:ListItem Value="1">Personal/Empleado</asp:ListItem>
|
||||
<asp:ListItem Value="2">Caja Chica</asp:ListItem>
|
||||
@@ -2554,10 +2552,11 @@
|
||||
<asp:UpdatePanel ID="UpFacturar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:Button ID="BtnGuardar" CssClass="btn btn-primary " runat="server" data-toggle="confirmation" data-popout="true" data-original-title="<b>Verifique los datos para continuar</b>. <br/><br/> <center>¿Seguro de registrar el documento con la información actual?</center>" data-btn-ok-label="si" Text="Registrar Compra" />
|
||||
<asp:Button ID="BtnGuardar" CssClass="btn btn-primary " runat="server" ValidationGroup="GrpGuardar" data-toggle="confirmation" data-popout="true" data-original-title="<b>Verifique los datos para continuar</b>. <br/><br/> <center>¿Seguro de registrar el documento con la información actual?</center>" data-btn-ok-label="si" Text="Registrar Compra" />
|
||||
<asp:Button ID="BtnActualizar" CssClass="btn btn-success" runat="server" Text="Actualizar Compra" ValidationGroup="GrpGuardar" Visible="False" />
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<asp:Button ID="BtnEliminarCompra" CssClass="btn btn-danger" Visible="False" runat="server" Text="Eliminar Compra" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar la compra?" data-btn-ok-label="si" />
|
||||
<br />
|
||||
<br />
|
||||
@@ -3920,8 +3919,8 @@
|
||||
<div class="row">
|
||||
<div class="col-md-2" style="width: 90%; margin-left: 5%; margin-right: 5%; text-align: left">
|
||||
<asp:TextBox ID="TxtNumeroReembolso" runat="server" Width="100%" />
|
||||
<asp:RequiredFieldValidator ID="RFVNumeroReembolso" runat="server" ControlToValidate="TxtNumeroReembolso" InitialValue="" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Numero de Reembolso''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCENumeroReembolso" runat="server" HighlightCssClass="vco" TargetControlID="RFVNumeroReembolso" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<%-- <asp:RequiredFieldValidator ID="RFVNumeroReembolso" runat="server" ControlToValidate="TxtNumeroReembolso" InitialValue="" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Numero de Reembolsoxx''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCENumeroReembolso" runat="server" HighlightCssClass="vco" TargetControlID="RFVNumeroReembolso" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10695,7 +10695,6 @@ Partial Class Compras_Compras
|
||||
|
||||
'VALIDA UNIDAD DE MEDIDA
|
||||
If e.Row.DBCampo("CvePS").ToString.ToEntero > 0 Then
|
||||
Dim DtEquivalencias = GlobalDTProductosServiciosEquivalencias(e.Row.DBCampo("CvePS").ToString.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
|
||||
'SI UM NO ESTA REGISTRADA
|
||||
If e.Row.DBCampo("CveUM").ToString.ToEntero <= 0 Then
|
||||
@@ -10707,6 +10706,8 @@ Partial Class Compras_Compras
|
||||
|
||||
'EQUIVALENCIA
|
||||
If e.Row.DBCampo("CveUM").ToString.ToEntero > 0 And e.Row.DBCampo("CveTipoPS").ToString.ToEntero = 2 Then
|
||||
Dim DtEquivalencias As DataTable = GlobalDTProductosServiciosEquivalencias(e.Row.DBCampo("CvePS").ToString.ToEntero, e.Row.DBCampo("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa)
|
||||
|
||||
If DtEquivalencias.FiltraParametros($"CveUM = {e.Row.DBCampo("CveUM").ToString.ToEntero}").Rows.Count > 0 Then
|
||||
If Not DtEquivalencias.FiltraParametros($"CveUM = {e.Row.DBCampo("CveUM").ToString.ToEntero} AND UnidadBase = 1").Rows.Count > 0 Then
|
||||
'UM NO BASE
|
||||
@@ -10724,6 +10725,7 @@ Partial Class Compras_Compras
|
||||
e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("data-toggle", "tooltip")
|
||||
e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("title", "Unidad de medida SIN equivalencia")
|
||||
End If
|
||||
DtEquivalencias.Dispose()
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
@@ -92,14 +92,14 @@ public partial class General_PopUpPaqueteriasGuiasInternas : ClsPaginas
|
||||
|
||||
String Observaciones = TxtObservaciones.Text;
|
||||
|
||||
int CvePaqueteriaGuia = ObjGeneral.AddPaqueteriasGuias(-1, -1, CveEstatus, CveSubProyecto, Fecha, "-1", "-1", NoCajas, 0.00, "-1", FechaEstimada, Observaciones,
|
||||
int CvePaqueteriaGuia = ObjGeneral.AddPaqueteriasGuias(-1, 9, CveEstatus, CveSubProyecto, Fecha, "-1", "-1", NoCajas, 0.00, "-1", FechaEstimada, Observaciones,
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, EsEntregaInterna:true);
|
||||
|
||||
if (CvePaqueteriaGuia > 0)
|
||||
{
|
||||
if (CveVenta > 0 || CveSubProyecto > 0 )
|
||||
{
|
||||
TieneError = !ObjGeneral.AddPaqueteriasGuiasDetalles(CvePaqueteriaGuia, CveVenta, -1, CveSubProyecto, -1);
|
||||
TieneError = !ObjGeneral.AddPaqueteriasGuiasDetalles(CvePaqueteriaGuia, CveVenta, -1, -1, -1);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -235,7 +235,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
|
||||
{
|
||||
DdlUsuarios.DataSource = get_GlobalDTUsuarios(CveEmpresa:UsuarioActual.CveEmpresa);
|
||||
DdlUsuarios.DataBind();
|
||||
DdlUsuarios.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||
DdlUsuarios.Items.Insert(0, new ListItem("Todos ", "-1"));
|
||||
}
|
||||
|
||||
protected void InicializaFechas()
|
||||
|
||||
@@ -2231,7 +2231,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
GvM.Columns(9).Visible = DtTemp.MAX("Serie") <> ""
|
||||
GvM.Columns(10).Visible = DtTemp.MAX("Lote") <> ""
|
||||
GvM.Columns(11).Visible = DtTemp.MAX("FechaCaducidad").ToDate > MinFecha
|
||||
GvM.Columns(12).Visible = DtTemp.MAX("CveSeccionAlmacen") <> ""
|
||||
GvM.Columns(12).Visible = DtTemp.MAX("CveSeccionAlmacen").ToEntero > 0
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -242,11 +242,13 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div >
|
||||
<asp:RadioButton ID="RbSinEntrega" runat="server" OnCheckedChanged="EntregaRadioGroup_Click" Width="33%" GroupName="EntregaRadioGroup" Text="Sin Entrega" AutoPostBack="true"></asp:RadioButton>
|
||||
<asp:RadioButton ID="RbEntregaInterna" runat="server" OnCheckedChanged="EntregaRadioGroup_Click" Width="33%" GroupName="EntregaRadioGroup" Text="Entrega Interna" AutoPostBack="true"></asp:RadioButton>
|
||||
<asp:RadioButton ID="RbEntregaExterna" runat="server" OnCheckedChanged="EntregaRadioGroup_Click" Width="33%" GroupName="EntregaRadioGroup" Text="Entrega Externa" AutoPostBack="true"></asp:RadioButton>
|
||||
</div>
|
||||
|
||||
<asp:Panel ID="PnlEntrega" runat="server" Visible="false">
|
||||
<asp:RadioButton id="RbSinEntrega" runat="server" OnCheckedChanged="EntregaRadioGroup_Click" Width="25%" GroupName="EntregaRadioGroup" Text="Sin Entrega" AutoPostBack="true"></asp:RadioButton>
|
||||
<asp:RadioButton id="RbEntregaInterna" runat="server" OnCheckedChanged="EntregaRadioGroup_Click" Width="25%" GroupName="EntregaRadioGroup" Text="Entrega Interna" AutoPostBack="true"></asp:RadioButton>
|
||||
<asp:RadioButton id="RbEntregaExterna" runat="server" OnCheckedChanged="EntregaRadioGroup_Click" Width="25%" GroupName="EntregaRadioGroup" Text="Entrega Externa" AutoPostBack="true"></asp:RadioButton>
|
||||
</asp:Panel>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -718,7 +720,6 @@
|
||||
<div class="col-md-5" style="text-align: right;">
|
||||
Cantidad
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<asp:TextBox ClientIDMode="Static" ID="TxtCantidadEspecial" Text="" runat="server"></asp:TextBox>
|
||||
@@ -761,8 +762,6 @@
|
||||
<asp:Panel runat="server" DefaultButton="BtnGuardarCantidadEspecialDiv">
|
||||
Cant.:
|
||||
|
||||
|
||||
|
||||
<asp:TextBox ClientIDMode="Static" ID="TxtCantidadEspecialDiv" Text="1" onfocus="this.select();" Width="50px" runat="server"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtCantidadEspecialDiv" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<br />
|
||||
@@ -884,8 +883,7 @@
|
||||
<tr runat="server" id="RowDimensiones" align="left" visible="true">
|
||||
<td class="text-right" style="width: 140px"><b># Cajas:</b></td>
|
||||
<td style="width: 200px">
|
||||
<asp:TextBox ID="TxtNoCajas" runat="server" CssClass="form-control" Width="200px" Height="30px" Style="padding: 0px"></asp:TextBox>
|
||||
<ajax:MaskedEditExtender ID="MEENoCajas" runat="server" TargetControlID="TxtNoCajas" Mask="9999" MaskType="Number" AcceptNegative="None"></ajax:MaskedEditExtender>
|
||||
<asp:TextBox ID="TxtNoCajas" runat="server" CssClass="form-control" Width="200px" Height="30px" Style="padding: 0px"></asp:TextBox>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
@@ -2,16 +2,14 @@
|
||||
Option Explicit On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports System.Linq
|
||||
Imports CrystalDecisions.[Shared].Json
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Inventarios_EntregaAlmacen
|
||||
Inherits ClsPaginas
|
||||
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property CveVentaAD As Integer
|
||||
Get
|
||||
@@ -245,10 +243,10 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Set(value As Boolean)
|
||||
ViewState("EsDevolucionDirecta") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
@@ -256,9 +254,9 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
CargaParametrosAD()
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then DdlAlmacen.AutoPostBack = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " INICIALIZA VALORES "
|
||||
Private Sub InicializaValores()
|
||||
TipoEstatus = -1
|
||||
@@ -318,6 +316,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
DdlSubProyectos.SelectedValueExist(UsuarioActual.CveSubProyecto.ToString)
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(152) Then DdlSubProyectos.Enabled = False
|
||||
If UsuarioActual.Empresa.Funcionalidad(280) = "1" Then PnlEntrega.Visible = True
|
||||
|
||||
CreaDtDetalle()
|
||||
CreaDtDetalleLote()
|
||||
@@ -325,11 +324,11 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
|
||||
LimpiaCampos()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " CARGA PARAMETROS - EXCLUSIVO USO AD "
|
||||
Private Sub CargaParametrosAD()
|
||||
|
||||
@@ -347,9 +346,9 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
BtnGuardar.Visible = False
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " CARGA PENDIENTES POR SURTIR "
|
||||
Protected Sub DdlCliente_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaFolios()
|
||||
@@ -467,11 +466,11 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End Select
|
||||
UpPendientes.Update()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " CARGA VENTA POR SURTIR "
|
||||
Protected Sub BtnSurtir_Click(sender As Object, e As EventArgs)
|
||||
|
||||
@@ -917,14 +916,14 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
objInv.Dispose()
|
||||
GvDocs.DataBind()
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " AGREGAR "
|
||||
|
||||
|
||||
Protected Sub BtnSerie_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim Argumentos = CType(sender, Button).CommandArgument.Split("°"c)
|
||||
@@ -951,10 +950,10 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
UpLoteBatch.Update()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#Region " AGREGA POR SERIE/LOTE "
|
||||
|
||||
|
||||
Private Sub CreaDtDetalle()
|
||||
If DtDatosDetalle Is Nothing Then
|
||||
DtDatosDetalle = New DataTable
|
||||
@@ -1159,11 +1158,11 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
DtDatosDetalle.AcceptChanges()
|
||||
CargaSerie()
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " AGREGA CON LOTE BATCH "
|
||||
|
||||
|
||||
Private Sub CreaDtDetalleLote()
|
||||
If DtDatosDetalleLote Is Nothing Then
|
||||
DtDatosDetalleLote = New DataTable
|
||||
@@ -1351,9 +1350,9 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End Try
|
||||
DtDatosDetalleLote.AcceptChanges()
|
||||
CargaLote()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " AGREGA CON TXT | CODIGO - SERIE "
|
||||
Protected Sub BtnCodigoPS_Click(sender As Object, e As EventArgs)
|
||||
|
||||
@@ -1487,12 +1486,12 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
|
||||
TxtCantidadEspecialDiv.Text = "1"
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " GUARDAR "
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
@@ -2422,12 +2421,19 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Dim FechaEstimada As String = If(TxtFechaEstimada.Text = "", "-1", TxtFechaEstimada.Text)
|
||||
Dim NoCajas As Integer = TxtNoCajas.Text.ToEntero()
|
||||
Dim Observaciones As String = TxtObservacionesPaqInterna.Text
|
||||
Dim CvePaqueteriaGuia As Integer = ObjGeneral.AddPaqueteriasGuias(-1, -1, CveEstatus, CveSubProyecto, Fecha, "-1", "-1", NoCajas, 0.00, "-1", FechaEstimada, Observaciones, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, EsEntregaInterna:=True)
|
||||
Dim CvePaqueteria As Integer = GlobalDTPaqueterias().FiltroPrimeroValor("CvePaqueteria", String.Format("CveEmpresa={0} AND TipoPaqueteria = 0", UsuarioActual.CveEmpresa)).ToEntero
|
||||
|
||||
Dim CvePaqueteriaGuia As Integer = ObjGeneral.AddPaqueteriasGuias(CvePaqueteria, 9, CveEstatus, CveSubProyecto, Fecha, "", "", NoCajas, 0.00, "-1", FechaEstimada, Observaciones, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, EsEntregaInterna:=True)
|
||||
|
||||
If CvePaqueteriaGuia > 0 Then
|
||||
|
||||
If CveVentaSurtir > 0 OrElse CveSubProyecto > 0 Then
|
||||
ErrorMovInv = Not ObjGeneral.AddPaqueteriasGuiasDetalles(CvePaqueteriaGuia, CveVentaSurtir, -1, CveMovimiento, -1)
|
||||
If ObjGeneral.AddPaqueteriasGuiasDetalles(CvePaqueteriaGuia, CveVentaSurtir, -1, CveMovimiento, -1) Then
|
||||
''manda correo
|
||||
MandaCorreoEntrega(CveVentaSurtir)
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
If ErrorMovInv Then
|
||||
Alert("Error en el paqueteria guia detalle", TipoMensaje.MsgError)
|
||||
@@ -2754,6 +2760,53 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub MandaCorreoEntrega(tCveVenta As Integer)
|
||||
Dim Correo As New ClsSisMail()
|
||||
Dim SerieFolio As String = ""
|
||||
Dim Asunto As String = String.Format("{0} Envio de pedido: {1}", UsuarioActual.Empresa.NombreCorto, SerieFolio)
|
||||
Dim Cuerpo As New StringBuilder()
|
||||
Dim Destinatario As String = ""
|
||||
Dim MensajeEnviado = False
|
||||
Dim tCvecliente As Integer
|
||||
|
||||
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
|
||||
If (ObjVentas.GetVenta(tCveVenta, UsuarioActual.CveEmpresa)) Then
|
||||
Dim dr As DataRow = ObjVentas.DtResultados.FiltroPrimero("")
|
||||
Destinatario = String.Format("{0};{1}", dr("CorreoNotificacion"), dr("CorreoVendedorVenta"))
|
||||
|
||||
tCvecliente = dr("CveCliente").ToString.ToEntero
|
||||
|
||||
Dim drC As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=tCvecliente).FiltroPrimero("")
|
||||
Destinatario += String.Format("{0};{1}", drC("CorreoEntregaCompras"), drC("CorreoEntregaAlmacen"))
|
||||
|
||||
Cuerpo.AppendLine(String.Format("Estimado {0} le informamos que los productos de la factura {1} han sido enviados a entrega. <br><br>", dr("ClienteNombre"), dr("SerieFolio")))
|
||||
Cuerpo.AppendLine("<br><br>Dudas y aclaraciones con su coordinador empresarial.")
|
||||
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
|
||||
' Dim ArchivoAdjunto As New ClsSisMail.ArchivoMail()
|
||||
|
||||
'Dim ListaAdjuntos As New List(ClsSisMail.ArchivoMail)
|
||||
|
||||
|
||||
'If (File.Exists(RutaArchivoAdjunto))Then
|
||||
' {
|
||||
' ArchivoAdjunto.ArchivoBinario = File.ReadAllBytes(RutaArchivoAdjunto);
|
||||
' ArchivoAdjunto.Ruta = RutaArchivoAdjunto;
|
||||
' ArchivoAdjunto.NombreArchivo = new FileInfo(RutaArchivoAdjunto).Name;
|
||||
' ListaAdjuntos.Add(ArchivoAdjunto);
|
||||
' }
|
||||
|
||||
|
||||
MensajeEnviado = Correo.SendMail(UsuarioActual.Empresa, Destinatario, Asunto, Cuerpo.ToString())
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub Limpia()
|
||||
|
||||
'DATOS DE LA VENTA
|
||||
@@ -3050,7 +3103,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
If fi.Exists() Then
|
||||
linkDescarga = $"/Empresas/{UsuarioActual.CveEmpresa}/Documentacion/ventas/{fi.Name}"
|
||||
ImgDownLoad.Visible = True
|
||||
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' ><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga)
|
||||
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga)
|
||||
|
||||
|
||||
End If
|
||||
|
||||
@@ -15,9 +15,13 @@
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
<%--Paqueterías Guías--%>Entrega Interna
|
||||
Entregas por Realizar
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimir" runat="server" OnClick="LnkImprimir_Click"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAccionesComplementos">
|
||||
@@ -80,9 +84,10 @@
|
||||
<asp:CheckBox ID="ChkAsigna" runat="server" Checked="false" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Cons" DataField="Num" HeaderStyle-Width="25px" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:TemplateField HeaderText="Folio" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" HeaderStyle-Width="10%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblFolio" runat="server" Text='<%# Eval("Folio") %>'></asp:Literal>
|
||||
<asp:Literal ID="LblFolio" runat="server" Text='<%# Eval("SerieFolio") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -200,6 +200,10 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnSerie_Click(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
#Region " PROCESAR - VERIFICAR EXISTENCIAS "
|
||||
Protected Sub BtnVerificarExistenciasArmado_Click(sender As Object, e As EventArgs)
|
||||
TipoMovimiento = 1
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
<th width="40%">Clasificación<br />
|
||||
Producto </th>
|
||||
<th width="10%">U.M.</th>
|
||||
<th style="width: 20%" runat="server" id="ThSerie" visible="false">Serie - Lote</th>
|
||||
<th style="width: 20%" runat="server" id="ThSerie" visible="false">Serie</th>
|
||||
<th style="width: 10%;">Observaciones</th>
|
||||
<th width="10%"></th>
|
||||
</tr>
|
||||
|
||||
@@ -84,22 +84,6 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
End Property
|
||||
|
||||
|
||||
Private Property DtSeccionAlmacen As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtSeccionAlmacen"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtSeccionAlmacen") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property IndexSeccionAlmacen As Integer
|
||||
Get
|
||||
Return CType(ViewState("IndexSeccionAlmacen"), Integer)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("IndexSeccionAlmacen") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CantidadTotal As Decimal
|
||||
Get
|
||||
Return CType(ViewState("CantidadTotal"), Decimal)
|
||||
@@ -174,7 +158,6 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
GvM.DataBind()
|
||||
|
||||
CantidadTotal = 0
|
||||
IndexSeccionAlmacen = 0
|
||||
CvePS = 0
|
||||
TipoSeccionAlmacen = 0
|
||||
|
||||
@@ -379,7 +362,7 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " EISTENCIAS "
|
||||
#Region " EXISTENCIAS "
|
||||
Private Function GetExistencias(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer, CveAlmacen As Integer, Optional Serie As String = "-1") As Double
|
||||
Dim Inv As New ClsInventarios
|
||||
Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, CveEmpresa, CveAlmacen, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie)
|
||||
@@ -481,10 +464,10 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
|
||||
Protected Sub GvM_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {e.Row.RowIndex}").SUMD("CantidadSeccionAlmacen") > 0 Then
|
||||
e.Row.FCLinkButton("lnkRemove").Visible = False
|
||||
e.Row.FCLinkButton("lnkRemove").ToolTip = "Cuenta con sección almacen"
|
||||
End If
|
||||
'If DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {e.Row.RowIndex}").SUMD("CantidadSeccionAlmacen") > 0 Then
|
||||
' e.Row.FCLinkButton("lnkRemove").Visible = False
|
||||
' e.Row.FCLinkButton("lnkRemove").ToolTip = "Cuenta con sección almacen"
|
||||
'End If
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
@@ -502,7 +485,6 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
|
||||
DdlAlmacen.SelectedValueExist("-1")
|
||||
DdlAlmacenDestino.SelectedValueExist("-1")
|
||||
DtSeccionAlmacen.Rows.Clear()
|
||||
|
||||
TxtObservaciones.Text = ""
|
||||
TxtFecha.Text = Now.ToShortDateString
|
||||
@@ -595,8 +577,6 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
FechaLiberacion = TxtFechaLiberacion.Text
|
||||
BtnGuardarLiberacion.Visible = True
|
||||
|
||||
DtSeccionAlmacen.Rows.Clear()
|
||||
|
||||
UpGeneralesLibreacion.Update()
|
||||
Else
|
||||
Alert("Ocurrió un error al cargar los resguardos del personal. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
@@ -633,8 +613,6 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
LbFechaLiberacion.Text = ""
|
||||
FechaLiberacion = ""
|
||||
BtnGuardarLiberacion.Visible = False
|
||||
DtSeccionAlmacen.Rows.Clear()
|
||||
|
||||
DdlAlmacenDestinoLiberacion.SelectedValue = "-1"
|
||||
TxtObservacionesLiberacion.Text = ""
|
||||
|
||||
@@ -685,14 +663,6 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
Alert(TextoExistencia.ToString, TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
Dim TotalCantidad As Double = DtMovimientos.SUMD("Cantidad")
|
||||
If UsuarioActual.Empresa.Funcionalidad(563) = "1" Then
|
||||
If TotalCantidad <> DtSeccionAlmacen.FiltraParametros("TipoSeccionAlmacen = 1").SUMD("CantidadSeccionAlmacen") Then
|
||||
Alert("La seccion de almacen no ha sido agregada completamente.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
Guardar(23)
|
||||
|
||||
End Sub
|
||||
@@ -724,13 +694,6 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(563) = "1" Then
|
||||
If TotalCantidad <> DtSeccionAlmacen.FiltraParametros("TipoSeccionAlmacen = 2").SUMD("CantidadSeccionAlmacen") Then
|
||||
Alert("La seccion de almacen no ha sido agregada completamente.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
Guardar(24)
|
||||
|
||||
|
||||
@@ -824,7 +787,7 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
Dim Cont As Integer = 0
|
||||
For Each Gvr As GridViewRow In GvMLiberacion.Rows
|
||||
If Gvr.FCTextBox("TxtCantidad").Text.ToDouble > 0 Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.FCTextBox("TxtCantidad").Text.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, -1, Gvr.DataKey("SerieLote").ToString, Gvr.DataKey("Observaciones").ToString) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.FCTextBox("TxtCantidad").Text.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, -1, Gvr.DataKey("Serie").ToString, Gvr.DataKey("Observaciones").ToString) Then
|
||||
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de salida. Por favor vuelva a intentar."
|
||||
TieneError = True
|
||||
Exit For
|
||||
@@ -846,7 +809,7 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
Cont = 0
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Dr("Observaciones").ToString) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("Serie").ToString, Dr("Observaciones").ToString) Then
|
||||
TieneError = True
|
||||
MensajeError = "Ocurrió un error al guardar los movimientos de entrada"
|
||||
Exit For
|
||||
|
||||
@@ -605,12 +605,12 @@
|
||||
<label for="<%= DdlTipoCliente.ClientID.ToString()%>">Tipo de Cliente:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<div class="form-group form-md-line-input input-iconright" id="divCorreoEntregaCompras" runat="server" visible="false" >
|
||||
<asp:TextBox runat="server" ID="TxtCorreoEntregaCompras" CssClass="form-control"/>
|
||||
<label for="<%= TxtCorreoEntregaCompras.ClientID.ToString()%>">Correo de Entrega de Compras:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<div class="form-group form-md-line-input input-iconright" id="divCorreoEntregaAlmacen" runat="server" visible="false">
|
||||
<asp:TextBox runat="server" ID="TxtCorreoEntregaAlmacen" CssClass="form-control"/>
|
||||
<label for="<%= TxtCorreoEntregaAlmacen.ClientID.ToString()%>">Correo de Entrega de Almacén:</label>
|
||||
</div>
|
||||
|
||||
@@ -1667,7 +1667,7 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
TxtCorreoEntregaCompras.Text = ObjClientes.DtResultados(0)("CorreoEntregaCompras").ToString
|
||||
TxtCorreoEntregaAlmacen.Text = ObjClientes.DtResultados(0)("CorreoEntregaCompras").ToString
|
||||
TxtCorreoEntregaAlmacen.Text = ObjClientes.DtResultados(0)("CorreoEntregaAlmacen").ToString
|
||||
Else
|
||||
Existe = False
|
||||
Alert("El Cliente Solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia)
|
||||
@@ -5622,6 +5622,11 @@ Partial Class Clientes
|
||||
CobranzaTelefono = ""
|
||||
CodigoCliente = ""
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then
|
||||
divCorreoEntregaCompras.Visible = True
|
||||
divCorreoEntregaAlmacen.Visible = True
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcel.Click
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<asp:Button ID="BtnRefacturarDocumento" runat="server" ClientIDMode="Static" Text="Refacturar Documento" Style="display: none;" />
|
||||
<asp:HiddenField ID="HdnLigaRefacturar" runat="server" Value="" ClientIDMode="Static" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:Button ID="BtnEnviarMailCancelacion" runat="server" ClientIDMode="Static" Text="Enviar Mail Cliente" Style="display: none;" OnClick="BtnEnviarMailCancelacion_Click" />
|
||||
@@ -138,8 +138,8 @@
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="/Metronic/assets/global/plugins/jquery.pulsate.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
function BtnRefacturarDocumento() {
|
||||
$('#BtnRefacturarDocumento').click();
|
||||
function RefacturarDocumento() {
|
||||
window.location.replace(HdnLigaRefacturar.value);
|
||||
}
|
||||
|
||||
function BtnEnviarMailCancelacion() {
|
||||
|
||||
@@ -33,6 +33,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
}
|
||||
private void CargaDatos()
|
||||
{
|
||||
HdnLigaRefacturar.Value = "";
|
||||
if (Request["CveVenta"] != null)
|
||||
{
|
||||
this.CveVenta = Request["CveVenta"].ToString().ToEntero();
|
||||
@@ -63,7 +64,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
}
|
||||
protected void BtnValidar_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
HdnLigaRefacturar.Value = "";
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
int CveVenta = GvRow.DataKey("CveVenta").ToEntero();
|
||||
int CveCliente = GvRow.DataKey("CveCliente").ToEntero();
|
||||
@@ -91,7 +92,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
}
|
||||
protected void BtnValidarRefacturacion_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
HdnLigaRefacturar.Value = "";
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
int CveVenta = GvRow.DataKey("CveVenta").ToEntero();
|
||||
int CveCliente = GvRow.DataKey("CveCliente").ToEntero();
|
||||
@@ -106,10 +107,17 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
if (CveVenta > 0)
|
||||
{
|
||||
var respuesta = VerificarVigenciaSAT(CveVenta, CveCliente, Folio, TipoDocto, Uuid, UsuarioActual.Empresa.RFC, RFCCliente, Total, true);
|
||||
|
||||
Alert(respuesta.Mensaje);
|
||||
CargaDatos();
|
||||
|
||||
CargaDatos();
|
||||
if (respuesta.CveEstatus.Contiene(4,5))
|
||||
{
|
||||
HdnLigaRefacturar.Value = respuesta.LigaRefacturacion;
|
||||
Alert(respuesta.Mensaje, JSBtnAceptar: $"RefacturarDocumento();");
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert(respuesta.Mensaje,TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
|
||||
//if (respuesta.IrARefacturar)
|
||||
//{
|
||||
// Server.Transfer(respuesta.LigaRefacturacion);
|
||||
@@ -120,10 +128,12 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
// CargaDatos();
|
||||
//}
|
||||
}
|
||||
UPDatos.Update();
|
||||
|
||||
}
|
||||
private MRespuestaSAT VerificarVigenciaSAT(int CveVenta, int CveCliente, string Folio, string TipoDocto, string uuid, string emisor, string receptor, string total, bool EsRefacturacion = false)
|
||||
{
|
||||
HdnLigaRefacturar.Value = "";
|
||||
var retorno = new MRespuestaSAT()
|
||||
{
|
||||
Mensaje = "",
|
||||
@@ -161,14 +171,18 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
{
|
||||
var respCancelacion = CancelarDocumento(CveVenta, CveEstatus, CveCliente, Folio, uuid, CancelacionAcuse, CancelacionFecha, TipoDocto, total.ToDouble(), UsuarioActual.Empresa.CvePAC, EsRefacturacion: EsRefacturacion);
|
||||
|
||||
sb.AppendFormat("{0} <br/>", respCancelacion.Mensaje);
|
||||
//sb.AppendFormat("{0} <br/>", respCancelacion.Mensaje);
|
||||
if (!respCancelacion.HuboError)
|
||||
{
|
||||
CveEstatus = respCancelacion.CveEstatus;
|
||||
retorno.EnviarAcuse = true;
|
||||
|
||||
sb.Append("El Documento se canceló correctamente.");
|
||||
|
||||
sb.Append("El documento se canceló correctamente.");
|
||||
sb.Append($"</br> <a href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=CAN&CVEVTA={CveVenta}")}' class='Texto' target='_blank'>Imprimir Acuse</a>");
|
||||
sb.Append("</br></br> ¿Desea enviar el Acuse de Cancelación al Cliente?");
|
||||
if (!EsRefacturacion)
|
||||
{
|
||||
sb.Append("</br></br> ¿Desea enviar el Acuse de Cancelación al Cliente?");
|
||||
}
|
||||
}
|
||||
|
||||
if (respCancelacion.CveEstatus.Contiene(4, 5) && EsRefacturacion)
|
||||
@@ -192,12 +206,17 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
|
||||
var respCancelacion = CancelarDocumento(CveVenta, CveEstatus, CveCliente, Folio, uuid, CancelacionAcuse, CancelacionFecha, TipoDocto, total.ToDouble(), UsuarioActual.Empresa.CvePAC, EsRefacturacion: EsRefacturacion);
|
||||
|
||||
sb.AppendFormat("{0} <br/>", respCancelacion.Mensaje);
|
||||
//sb.AppendFormat("{0} <br/>", respCancelacion.Mensaje);
|
||||
if (!respCancelacion.HuboError)
|
||||
{
|
||||
sb.Append("El Documento se canceló correctamente.");
|
||||
retorno.EnviarAcuse = true;
|
||||
CveEstatus = respCancelacion.CveEstatus;
|
||||
sb.Append("El documento se canceló correctamente.");
|
||||
sb.Append($"</br> <a href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=CAN&CVEVTA={CveVenta}")}' class='Texto' target='_blank'>Imprimir Acuse</a>");
|
||||
sb.Append("</br></br> ¿Desea enviar el Acuse de Cancelación al Cliente?");
|
||||
if (!EsRefacturacion)
|
||||
{
|
||||
sb.Append("</br></br> ¿Desea enviar el Acuse de Cancelación al Cliente?");
|
||||
}
|
||||
}
|
||||
|
||||
if (respCancelacion.CveEstatus.Contiene(4, 5) && EsRefacturacion)
|
||||
@@ -237,6 +256,8 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
return retorno;
|
||||
}
|
||||
|
||||
retorno.CveEstatus = CveEstatus;
|
||||
|
||||
retorno.Mensaje = sb.ToString();
|
||||
return retorno;
|
||||
}
|
||||
@@ -413,10 +434,10 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public class MRespuestaSAT
|
||||
{
|
||||
public int CveEstatus { get; set; }
|
||||
public bool EnviarAcuse { get; set; }
|
||||
public string LigaRefacturacion { get; set; }
|
||||
public bool IrARefacturar { get; set; }
|
||||
|
||||
@@ -3259,7 +3259,7 @@
|
||||
<tr align="left">
|
||||
<td>
|
||||
<asp:TextBox ID="TxtObsFact" runat="server" Rows="3" TextMode="MultiLine" Width="250px" MaxLength="800" CssClass="form-control input-sm"></asp:TextBox></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr id="TrOC" runat="server">
|
||||
<td>Orden de Compra:
|
||||
<asp:TextBox ID="TxtOrdenCompra" runat="server" Width="100%" CssClass="form-control" CausesValidation="true"></asp:TextBox>
|
||||
@@ -3287,10 +3287,10 @@
|
||||
<td>Kilometraje
|
||||
<asp:TextBox ID="TxtKilometraje" runat="server" Width="250px" CssClass="form-control input-sm"></asp:TextBox></td>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<td id="Td1" runat="server">Correo Notificaciones: </td>
|
||||
<tr align="left" id="trCorreoNotif1" runat="server" visible="false">
|
||||
<td id="Td1" runat="server">Correo Notificacion: </td>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<tr align="left" id="trCorreoNotif2" runat="server" visible="false">
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCorreoNotificaciones" runat="server" Width="100%" CssClass="form-control"></asp:TextBox></td>
|
||||
</tr>
|
||||
|
||||
@@ -1854,8 +1854,10 @@ Partial Class Ventas
|
||||
thPredial2.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then ' PARA BUSCAR FOLIO DE OC, YA FACTURADA EN EL CAMPO ORDEN DE COMPRA
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then ' PARA BUSCAR FOLIO DE OC, YA FACTURADA EN EL CAMPO ORDEN DE COMPRA
|
||||
TxtOrdenCompra.Attributes.Add("onblur", "BuscarOCRegistrada();")
|
||||
trCorreoNotif1.Visible = True
|
||||
trCorreoNotif2.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(561).ToString() = "1" Then
|
||||
@@ -3936,6 +3938,8 @@ Partial Class Ventas
|
||||
TxtSubTotal2.Text = (TxtSubTotal.Text.Replace(",", "").Trim.Trim.ToDouble - LblDescuentos.Text.Replace(",", "").Trim.Trim.ToDouble - LblAmortizacion.Text.Replace(",", "").Trim.Trim.ToDouble).FormatoNumero(2)
|
||||
TxtIVA.Text = DbRowVenta("IVA").ToString().FormatoNumero(2)
|
||||
TxtRetIVA.Text = DbRowVenta("RetIVA").ToString().FormatoNumero(2)
|
||||
TxtCorreoNotificaciones.Text = DbRowVenta("CorreoNotificacion").ToString()
|
||||
|
||||
If TxtRetIVA.Text.ToDecimal() > 0 Then
|
||||
TrRetIVA.Style.Add("display", "")
|
||||
UsuarioActual.Empresa.MostrarRetIVA = True
|
||||
@@ -13775,7 +13779,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
Dim PorcentajePrecio As Double = 0
|
||||
If PrecioSugerido = 0 Then
|
||||
If PrecioSugerido = 0 AndAlso CveCliente > 0 Then
|
||||
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
||||
If CvePrecioListaPS > 0 Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
|
||||
Reference in New Issue
Block a user