Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -460,7 +460,8 @@ Public Class ClsVentas
|
|||||||
Optional TipoDocto As String = "Cot", Optional Vigencia As Date = MinFecha, Optional CondicionesPago As Integer = -1,
|
Optional TipoDocto As String = "Cot", Optional Vigencia As Date = MinFecha, Optional CondicionesPago As Integer = -1,
|
||||||
Optional AtencionA As String = "-1", Optional PedidoContrato As String = "-1", Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1,
|
Optional AtencionA As String = "-1", Optional PedidoContrato As String = "-1", Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1,
|
||||||
Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional OrdenCompra As String = "-1", Optional RetIVA As Double = -1,
|
Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional OrdenCompra As String = "-1", Optional RetIVA As Double = -1,
|
||||||
Optional RetISR As Double = -1, Optional Kilometraje As Double = 0) As Boolean
|
Optional RetISR As Double = -1, Optional Kilometraje As Double = 0, Optional CveVendedor As Integer = -1, Optional ObsAlm As String = "", Optional FormaPaqueteria As Integer = -1,
|
||||||
|
Optional CorreoNot As String = "-1") As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Vta_VentasUpdate")
|
DataAdapter("PA_Vta_VentasUpdate")
|
||||||
|
|
||||||
@@ -491,6 +492,10 @@ Public Class ClsVentas
|
|||||||
.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
|
.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
|
||||||
.Add("@OrdenCompra", SqlDbType.VarChar).Value = OrdenCompra
|
.Add("@OrdenCompra", SqlDbType.VarChar).Value = OrdenCompra
|
||||||
.Add("@Kilometraje", SqlDbType.Float).Value = Kilometraje
|
.Add("@Kilometraje", SqlDbType.Float).Value = Kilometraje
|
||||||
|
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||||
|
.Add("@ObservacionesAlm", SqlDbType.NVarChar).Value = ObsAlm
|
||||||
|
.Add("@FormaPaqueteria", SqlDbType.Int).Value = FormaPaqueteria
|
||||||
|
.Add("@CorreoNotificacion", SqlDbType.NVarChar).Value = CorreoNot
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -15,6 +15,17 @@ using System.Text;
|
|||||||
|
|
||||||
public class SIGGPSRCService : IHttpHandler, IRequiresSessionState
|
public class SIGGPSRCService : IHttpHandler, IRequiresSessionState
|
||||||
{
|
{
|
||||||
|
public bool EsProduccion
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (System.Configuration.ConfigurationManager.AppSettings["EsProduccion"] == null)
|
||||||
|
return false;
|
||||||
|
else
|
||||||
|
return (System.Configuration.ConfigurationManager.AppSettings["EsProduccion"].ToString() == "1");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private Usuario ValidaUsuarioSistema(int CveEmpresa)
|
private Usuario ValidaUsuarioSistema(int CveEmpresa)
|
||||||
{
|
{
|
||||||
Usuario UsuarioActual = null;
|
Usuario UsuarioActual = null;
|
||||||
@@ -85,8 +96,28 @@ public class SIGGPSRCService : IHttpHandler, IRequiresSessionState
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
context.Response.ContentType = "application/json";
|
context.Response.ContentType = "text/plain";
|
||||||
IniciarTransmision(context);
|
bool retorno = false;
|
||||||
|
string Metodo = context.Request["Metodo"] == null ? "" : context.Request["Metodo"];
|
||||||
|
switch (Metodo)
|
||||||
|
{
|
||||||
|
case "EjecutaServicio":
|
||||||
|
ModExtensiones.GuardaLogAD("Servicio Ejecutado...........", "LogServicioConfiable");
|
||||||
|
IniciarTransmision(context);
|
||||||
|
retorno = true;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (retorno)
|
||||||
|
{
|
||||||
|
context.Response.Write("True");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
context.Response.Write("False");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -147,16 +178,26 @@ public class SIGGPSRCService : IHttpHandler, IRequiresSessionState
|
|||||||
this.OnError("Ocurrió un error al enviar los datos", ex);
|
this.OnError("Ocurrió un error al enviar los datos", ex);
|
||||||
}
|
}
|
||||||
ObjGPS.Dispose();
|
ObjGPS.Dispose();
|
||||||
|
|
||||||
DtTrackings.Dispose();
|
DtTrackings.Dispose();
|
||||||
DtTrackings = null;
|
DtTrackings = null;
|
||||||
|
|
||||||
var respuesta = WS.GPSAssetTracking(Token.token, ListaEventos.ToArray());
|
if (ListaEventos.Count > 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
var respuesta = WS.GPSAssetTracking(Token.token, ListaEventos.ToArray());
|
||||||
|
context.Response.Write(JsonConvert.SerializeObject(respuesta));
|
||||||
|
}
|
||||||
|
|
||||||
WS.Close();
|
WS.Close();
|
||||||
context.Response.Write(JsonConvert.SerializeObject(respuesta));
|
//context.Response.Write(JsonConvert.SerializeObject(new { idJob = "1", exception = "" }));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private string UserService => "demo_cedis_corp";
|
|
||||||
private string PasswordService => "xxxxxxxx";
|
|
||||||
|
|
||||||
|
|
||||||
|
private string UserService => EsProduccion ? "ws_avl_opsat" : "demo_cedis_corp";
|
||||||
|
private string PasswordService => EsProduccion ? "eiHv##889iWfz#&2" : "xxxxxxxx";
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -29,7 +29,7 @@ Partial Class GPS_RecursoConfiableTracking
|
|||||||
DdlDispositivoFiltro.DataBind()
|
DdlDispositivoFiltro.DataBind()
|
||||||
DdlDispositivoFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlDispositivoFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
DdlDispositivo.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario).FiltraParametros("PlacasVehiculo <> ''")
|
DdlDispositivo.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario).FiltraParametros("PlacasVehiculo IS NOT NULL AND PlacasVehiculo <> ''")
|
||||||
DdlDispositivo.DataBind()
|
DdlDispositivo.DataBind()
|
||||||
DdlDispositivo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlDispositivo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
|
|||||||
@@ -216,18 +216,38 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<asp:GridView ID="GvDatosArmado" DataKeyNames="Cantidad,CvePS,CveUM,Consec,Inv_CveMetodoInventario" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
<asp:GridView ID="GvDatosArmado" DataKeyNames="Cantidad,CvePS,CveUM,Consec,Inv_CveMetodoInventario,AplicaSeccion,AplicaSerie,AplicaCaducidad,AplicaLote" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="Cant. Necesaria" DataField="Cantidad" ItemStyle-Width="15%" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Cant. Necesaria" DataField="Cantidad" ItemStyle-Width="15%" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Cant. Disponible" DataField="CantidadDisponible2" ItemStyle-Width="15%" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Cant. Disponible" DataField="CantidadDisponible2" ItemStyle-Width="15%" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-Width="40%" />
|
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-Width="40%" />
|
||||||
<asp:BoundField HeaderText="Unidad Medida" DataField="UnidadMedida" ItemStyle-Width="20%" />
|
<asp:BoundField HeaderText="Unidad Medida" DataField="UnidadMedida" ItemStyle-Width="20%" />
|
||||||
<asp:TemplateField HeaderText="Serie">
|
<asp:TemplateField HeaderText="Serie Paquete">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-xs btn-primary" runat="server" Style="float: left;" />
|
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-xs btn-primary" runat="server" Style="float: left;" />
|
||||||
<asp:LinkButton Text="<i class='fa fa-star'></i>" ID="BtnSeriePaquete" OnClick="BtnSeriePaquete_Click" CssClass="btn btn-xs btn-primary" runat="server" Visible="false" Style="float: left;" data-toggle="tooltip" title="Seleccionar como serie del paquete" />
|
<asp:LinkButton Text="<i class='fa fa-star'></i>" ID="BtnSeriePaquete" OnClick="BtnSeriePaquete_Click" CssClass="btn btn-xs btn-primary" runat="server" Visible="false" Style="float: left;" data-toggle="tooltip" title="Seleccionar como serie del paquete" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Sección Almacén">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="Seccion" AppendDataBoundItems="true" DataValueField="CveSeccion" CssClass="select2me" runat="server"/>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Fecha Caducidad">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:TextBox ID="TxtCaducidad" CssClass="form-control input-sm" runat="server" Width="80px" Style="text-align: right;"></asp:TextBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Lote">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Width="80px" Style="text-align: right;"></asp:TextBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Serie">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:TextBox ID="TxtSerie" CssClass="form-control input-sm" runat="server" Width="80px" Style="text-align: right;"></asp:TextBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -240,14 +240,15 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
Dim AplicaSerie As String = ""
|
||||||
If ErrorExistencias Then
|
If ErrorExistencias Then
|
||||||
Alert(TextoExistencias, TipoMensaje.MsgAdvertencia)
|
Alert(TextoExistencias, TipoMensaje.MsgAdvertencia)
|
||||||
Else
|
Else
|
||||||
CveTipoPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPaqueteArmado.SelectedValue.ToEntero).FiltroPrimeroValor("Inv_CveMetodoInventario").ToEntero
|
AplicaSerie = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPaqueteArmado.SelectedValue.ToEntero).FiltroPrimeroValor("AplicaSerie")
|
||||||
BtnGuadarArmado.Visible = True
|
BtnGuadarArmado.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveTipoPS = 5 Then
|
If AplicaSerie = "True" Then
|
||||||
DivSeriesPaqueteArmado.Visible = True
|
DivSeriesPaqueteArmado.Visible = True
|
||||||
Dim Dt As New DataTable
|
Dim Dt As New DataTable
|
||||||
Dt.Columns.Add("Row", GetType(Integer))
|
Dt.Columns.Add("Row", GetType(Integer))
|
||||||
@@ -468,6 +469,9 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
|
|
||||||
For Each Gvr As GridViewRow In GvDatosArmado.Rows
|
For Each Gvr As GridViewRow In GvDatosArmado.Rows
|
||||||
If Gvr.DataKey("Cantidad").ToString.ToDouble > 0 Then
|
If Gvr.DataKey("Cantidad").ToString.ToDouble > 0 Then
|
||||||
|
Dim Lote As String = If(Gvr.FCTextBox("TxtLote").Text = "", "-1", Gvr.FCTextBox("TxtLote").Text)
|
||||||
|
Dim FechaCaducidad As String = If(Gvr.FCTextBox("TxtCaducidad").Text = "", "-1", Gvr.FCTextBox("TxtCaducidad").Text)
|
||||||
|
Dim CveSeccionAlmacen As Integer = Gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero()
|
||||||
If Gvr.DataKey("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then
|
If Gvr.DataKey("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then
|
||||||
For Each Dr As DataRow In DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec").ToEntero)).Rows
|
For Each Dr As DataRow In DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec").ToEntero)).Rows
|
||||||
If Not ObjInventario.GetExistenciasPS(Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenArmado.SelectedValue.ToEntero, FechaMovto:=Fecha.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Dr("Serie").ToString, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente)) >= 1 Then
|
If Not ObjInventario.GetExistenciasPS(Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenArmado.SelectedValue.ToEntero, FechaMovto:=Fecha.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Dr("Serie").ToString, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente)) >= 1 Then
|
||||||
@@ -476,7 +480,8 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1, Serie:=Dr("Serie").ToString) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1,
|
||||||
|
CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Dr("Serie").ToString, Lote:=Lote, FechaCaducidad:=FechaCaducidad.ToDate) Then
|
||||||
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida. Por favor vuelva a intentar."
|
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida. Por favor vuelva a intentar."
|
||||||
TieneError = True
|
TieneError = True
|
||||||
Exit For
|
Exit For
|
||||||
@@ -488,7 +493,9 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.DataKey("Cantidad").ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.DataKey("Cantidad").ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero,
|
||||||
|
Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1, CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote,
|
||||||
|
FechaCaducidad:=FechaCaducidad.ToDate) Then
|
||||||
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de salida. Por favor vuelva a intentar."
|
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de salida. Por favor vuelva a intentar."
|
||||||
TieneError = True
|
TieneError = True
|
||||||
Exit For
|
Exit For
|
||||||
@@ -661,44 +668,44 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
'If Tipo = 1 Then
|
'If Tipo = 1 Then
|
||||||
|
|
||||||
BtnGuadarArmado.Visible = False
|
BtnGuadarArmado.Visible = False
|
||||||
DivSeriesPaqueteArmado.Visible = False
|
DivSeriesPaqueteArmado.Visible = False
|
||||||
GvDatosArmado.Columns(4).Visible = False
|
GvDatosArmado.Columns(4).Visible = False
|
||||||
|
|
||||||
LbPaqueteArmado.Text = ""
|
LbPaqueteArmado.Text = ""
|
||||||
CvePaqueteArmado = -1
|
CvePaqueteArmado = -1
|
||||||
LbCantidadArmado.Text = ""
|
LbCantidadArmado.Text = ""
|
||||||
LbAlmacenArmado.Text = ""
|
LbAlmacenArmado.Text = ""
|
||||||
CveAlmacenArmado = -1
|
CveAlmacenArmado = -1
|
||||||
LbFechaArmado.Text = ""
|
LbFechaArmado.Text = ""
|
||||||
TxtObservacionesArmado.Text = ""
|
TxtObservacionesArmado.Text = ""
|
||||||
UpGeneralesArmado.Update()
|
UpGeneralesArmado.Update()
|
||||||
|
|
||||||
GvDatosArmado.DataBind()
|
GvDatosArmado.DataBind()
|
||||||
UpDatosArmado.Update()
|
UpDatosArmado.Update()
|
||||||
UpSeriesPaqueteArmado.Update()
|
UpSeriesPaqueteArmado.Update()
|
||||||
'Else
|
'Else
|
||||||
|
|
||||||
LbPaqueteDesarmado.Text = ""
|
LbPaqueteDesarmado.Text = ""
|
||||||
CvePaqueteDesarmado = -1
|
CvePaqueteDesarmado = -1
|
||||||
LbCantidadDesarmado.Text = ""
|
LbCantidadDesarmado.Text = ""
|
||||||
LbAlmacenDesarmado.Text = ""
|
LbAlmacenDesarmado.Text = ""
|
||||||
CveAlmacenDesarmado = -1
|
CveAlmacenDesarmado = -1
|
||||||
LbFechaDesarmado.Text = ""
|
LbFechaDesarmado.Text = ""
|
||||||
TxtObservacionesDesarmado.Text = ""
|
TxtObservacionesDesarmado.Text = ""
|
||||||
UpGeneralesDesarmado.Update()
|
UpGeneralesDesarmado.Update()
|
||||||
|
|
||||||
BtnGuadarDesarmado.Visible = False
|
BtnGuadarDesarmado.Visible = False
|
||||||
TotalDesarmado.Visible = False
|
TotalDesarmado.Visible = False
|
||||||
|
|
||||||
DtSeriesDesarmado.Clear()
|
DtSeriesDesarmado.Clear()
|
||||||
GvDatosDesarmado.Columns(4).Visible = False
|
GvDatosDesarmado.Columns(4).Visible = False
|
||||||
DivSeriesPaqueteDesarmado.Visible = False
|
DivSeriesPaqueteDesarmado.Visible = False
|
||||||
GvSeriesPaqueteDesarmado.DataBind()
|
GvSeriesPaqueteDesarmado.DataBind()
|
||||||
BtnAgregarSerieDesarmado.Enabled = True
|
BtnAgregarSerieDesarmado.Enabled = True
|
||||||
|
|
||||||
LbTotalCalculado.Text = "0.00"
|
LbTotalCalculado.Text = "0.00"
|
||||||
|
|
||||||
GvDatosDesarmado.DataBind()
|
GvDatosDesarmado.DataBind()
|
||||||
UpDatosDesarmado.Update()
|
UpDatosDesarmado.Update()
|
||||||
UpSeriesPaqueteDesarmado.Update()
|
UpSeriesPaqueteDesarmado.Update()
|
||||||
|
|
||||||
@@ -730,6 +737,19 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
e.Row.FCButton("BtnSerie").Visible = False
|
e.Row.FCButton("BtnSerie").Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If e.Row.DataKey("AplicaSeccion") = "False" Then
|
||||||
|
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
|
||||||
|
Else
|
||||||
|
e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
||||||
|
e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
|
||||||
|
e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
e.Row.FCTextBox("TxtCaducidad").Visible = e.Row.DataKey("AplicaCaducidad") = "True"
|
||||||
|
|
||||||
|
e.Row.FCTextBox("TxtLote").Visible = e.Row.DataKey("AplicaLote") = "True"
|
||||||
|
|
||||||
|
e.Row.FCTextBox("TxtSerie").Visible = e.Row.DataKey("AplicaSerie") = "True"
|
||||||
''FUNCIONALIDAD PISTOLA DE CODIGOS
|
''FUNCIONALIDAD PISTOLA DE CODIGOS
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
|
'If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
|
||||||
' e.Row.FCTextBox("TbCantidadF").Enabled = False
|
' e.Row.FCTextBox("TbCantidadF").Enabled = False
|
||||||
|
|||||||
@@ -3403,6 +3403,8 @@
|
|||||||
<asp:Button ID="BtnMandaMail" runat="server" Text="MandaMail" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
<asp:Button ID="BtnMandaMail" runat="server" Text="MandaMail" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
||||||
<asp:Button ID="BtnCrearApartirDe" runat="server" Text="Crear a partir de" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
<asp:Button ID="BtnCrearApartirDe" runat="server" Text="Crear a partir de" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
||||||
|
|
||||||
|
<asp:Button ID="BtnEditar" runat="server" Text="Editar" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -2049,6 +2049,7 @@ Partial Class Ventas
|
|||||||
DdlSubProyectoDatos.Enabled = False
|
DdlSubProyectoDatos.Enabled = False
|
||||||
BtnEmitirImprimir.Visible = False
|
BtnEmitirImprimir.Visible = False
|
||||||
BtnCrearApartirDe.Visible = True
|
BtnCrearApartirDe.Visible = True
|
||||||
|
BtnEditar.Visible = True
|
||||||
'DdlEstatus.Enabled = True
|
'DdlEstatus.Enabled = True
|
||||||
|
|
||||||
DivFechaAnticipoCliente.Visible = True
|
DivFechaAnticipoCliente.Visible = True
|
||||||
@@ -4450,36 +4451,41 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(280) = "1" Then
|
||||||
|
RblPaqueteria.SelectedValue = If(DbRowVenta("FormaPaqueteria").ToString = "", "1", DbRowVenta("FormaPaqueteria").ToString)
|
||||||
|
RblPaqueteria.Enabled = False
|
||||||
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 48 Then
|
If UsuarioActual.CveEmpresa = 48 Then
|
||||||
TxtFecha.AutoPostBack = True
|
TxtFecha.AutoPostBack = True
|
||||||
End If
|
|
||||||
|
|
||||||
CargaCodigoUnico()
|
|
||||||
|
|
||||||
'SI ES COTIZACION PUEDE GENERAR UNA OC PARA MODIFICAR LOS IMPORTES
|
|
||||||
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(583) = "1" Then
|
|
||||||
Dim DtOCGeneradas As DataTable = Nothing
|
|
||||||
If ObjVentas.GetVentasCotizacionesOC(Me.CveVenta, -1, UsuarioActual.CveEmpresa) Then
|
|
||||||
DtOCGeneradas = ObjVentas.DtResultados.Copy()
|
|
||||||
End If
|
End If
|
||||||
If DtOCGeneradas IsNot Nothing AndAlso DtOCGeneradas.Rows.Count > 0 Then
|
|
||||||
LtGenerarOC.Visible = False
|
CargaCodigoUnico()
|
||||||
Else
|
|
||||||
LtGenerarOC.Visible = True
|
'SI ES COTIZACION PUEDE GENERAR UNA OC PARA MODIFICAR LOS IMPORTES
|
||||||
|
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(583) = "1" Then
|
||||||
|
Dim DtOCGeneradas As DataTable = Nothing
|
||||||
|
If ObjVentas.GetVentasCotizacionesOC(Me.CveVenta, -1, UsuarioActual.CveEmpresa) Then
|
||||||
|
DtOCGeneradas = ObjVentas.DtResultados.Copy()
|
||||||
|
End If
|
||||||
|
If DtOCGeneradas IsNot Nothing AndAlso DtOCGeneradas.Rows.Count > 0 Then
|
||||||
|
LtGenerarOC.Visible = False
|
||||||
|
Else
|
||||||
|
LtGenerarOC.Visible = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
DdlTipoRetencion.SelectedValueExist(DbRowVenta("CveTipoRetencion").ToString())
|
DdlTipoRetencion.SelectedValueExist(DbRowVenta("CveTipoRetencion").ToString())
|
||||||
|
|
||||||
CargaPS(-1, DdlPS)
|
CargaPS(-1, DdlPS)
|
||||||
|
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
UpContado.Update()
|
UpContado.Update()
|
||||||
UpEstatus.Update()
|
UpEstatus.Update()
|
||||||
Retorno = True
|
Retorno = True
|
||||||
|
|
||||||
Else
|
Else
|
||||||
ViewState("CveVenta") = -1
|
ViewState("CveVenta") = -1
|
||||||
Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia)
|
Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -4747,7 +4753,7 @@ Partial Class Ventas
|
|||||||
End Function
|
End Function
|
||||||
Private Sub CargarAlmacenes()
|
Private Sub CargarAlmacenes()
|
||||||
|
|
||||||
If CveVenta > 0 And DdlTipoComprobante.SelectedValue <> "Cot" Then
|
If (CveVenta > 0 And DdlTipoComprobante.SelectedValue <> "Cot") AndAlso Not (UsuarioActual.CveEmpresa = 141 AndAlso EsCreaApartirDe) Then
|
||||||
DivAlmacen.Visible = False
|
DivAlmacen.Visible = False
|
||||||
Else
|
Else
|
||||||
Dim DTAlmacen As DataTable
|
Dim DTAlmacen As DataTable
|
||||||
@@ -6340,6 +6346,10 @@ Partial Class Ventas
|
|||||||
e.Row.FCCheckBox("cbInv").Visible = False
|
e.Row.FCCheckBox("cbInv").Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If (CveVenta > 0 AndAlso EsCreaApartirDe AndAlso UsuarioActual.CveEmpresa = 141) Then
|
||||||
|
e.Row.FCCheckBox("cbInv").Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -15907,7 +15917,7 @@ Partial Class Ventas
|
|||||||
GvPS.DataBind()
|
GvPS.DataBind()
|
||||||
|
|
||||||
'RECARGA GV INVENTARIO
|
'RECARGA GV INVENTARIO
|
||||||
If Not CveVenta > 0 Or DdlTipoComprobante.SelectedValue = "Cot" Then
|
If (Not CveVenta > 0 Or DdlTipoComprobante.SelectedValue = "Cot") OrElse (UsuarioActual.CveEmpresa = 141 AndAlso EsCreaApartirDe) Then
|
||||||
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
||||||
CargaGVInv(DtInv)
|
CargaGVInv(DtInv)
|
||||||
End If
|
End If
|
||||||
@@ -24989,6 +24999,19 @@ Partial Class Ventas
|
|||||||
GvPS.Columns(17).Visible = True
|
GvPS.Columns(17).Visible = True
|
||||||
GvPS.Columns(18).Visible = True
|
GvPS.Columns(18).Visible = True
|
||||||
|
|
||||||
|
CambiaTipoDocto()
|
||||||
|
CambiaSucursalGeneral()
|
||||||
|
CargaAnticipos(CveCliente)
|
||||||
|
CargaRestriccionesCreditoCliente(CveVenta:=-1)
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa = 141 Then
|
||||||
|
TabAlmacen.Visible = True
|
||||||
|
DivAlmacen.Visible = True
|
||||||
|
CargaGVInv(TmpDT.FiltraParametros("CveTipoPS = 2"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
BloqueaCondiconesPago()
|
||||||
|
|
||||||
UpnTools.Update()
|
UpnTools.Update()
|
||||||
UpCliente.Update()
|
UpCliente.Update()
|
||||||
UpParametros.Update()
|
UpParametros.Update()
|
||||||
@@ -24999,13 +25022,8 @@ Partial Class Ventas
|
|||||||
UPCondicionesPago.Update()
|
UPCondicionesPago.Update()
|
||||||
UpDetalle.Update()
|
UpDetalle.Update()
|
||||||
UpEstatus.Update()
|
UpEstatus.Update()
|
||||||
|
|
||||||
CambiaTipoDocto()
|
|
||||||
CambiaSucursalGeneral()
|
|
||||||
CargaAnticipos(CveCliente)
|
|
||||||
CargaRestriccionesCreditoCliente(CveVenta:=-1)
|
|
||||||
BloqueaCondiconesPago()
|
|
||||||
UpParametros.Update()
|
UpParametros.Update()
|
||||||
|
UpINV.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
@@ -25953,4 +25971,48 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnEditar_Click() Handles BtnEditar.Click
|
||||||
|
Dim Opcion As String = BtnEditar.Text
|
||||||
|
If Opcion = "Editar" Then
|
||||||
|
EditarHabilitarCampos()
|
||||||
|
ElseIf Opcion = "Guardar" Then
|
||||||
|
GuardarValoresEditados()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub EditarHabilitarCampos()
|
||||||
|
'Datos de emisión
|
||||||
|
DdlVendedor.Enabled = True
|
||||||
|
|
||||||
|
'Observaciones
|
||||||
|
TxtObsFact.Enabled = True
|
||||||
|
TxtOrdenCompra.Enabled = True
|
||||||
|
TxtPedidoContrato.Enabled = True
|
||||||
|
TxtObsAlmacen.Enabled = True
|
||||||
|
RblPaqueteria.Enabled = True
|
||||||
|
|
||||||
|
'Acciones
|
||||||
|
BtnEditar.Text = "Guardar"
|
||||||
|
|
||||||
|
UpParametros.Update()
|
||||||
|
UPObservaciones.Update()
|
||||||
|
UpFacturar.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub GuardarValoresEditados()
|
||||||
|
Dim ObjVentas As New ClsVentas()
|
||||||
|
If ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtIEPS.Text.ToDecimal, TxtTotal.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero(),
|
||||||
|
TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim, UsuarioActual.CveEmpresa, CveVenta, DdlMetodoPago33.SelectedValue.ToEntero, DdlFormaPago33.SelectedValue.ToEntero,
|
||||||
|
TipoDocto:=DdlTipoComprobante.SelectedValue, OrdenCompra:=TxtOrdenCompra.Text, PedidoContrato:=TxtPedidoContrato.Text, ObsAlm:=TxtObsAlmacen.Text, FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero,
|
||||||
|
CorreoNot:=TxtCorreoNotificaciones.Text) Then
|
||||||
|
CargaVenta()
|
||||||
|
BtnEditar.Text = "Editar"
|
||||||
|
Alert("Actualizado correctamente")
|
||||||
|
UpParametros.Update()
|
||||||
|
UPObservaciones.Update()
|
||||||
|
UpFacturar.Update()
|
||||||
|
End If
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
Reference in New Issue
Block a user