--NuevaColumna en PS. NumeroParte
En ventas.aspx: --poner por default, cantidad 1. --especificar el cliente, publico general por defecto, RFC XAXX010101000 --poner focus en producto con ya con funcionalidad de escritura --quitar txtdescripción, y usar AtenciónA --bug. al clonar y cuando se tiene activada la lista de precio, marca error ( Ener Elec)
This commit is contained in:
@@ -2425,13 +2425,6 @@ Partial Class Ventas
|
||||
If Not (UsuarioActual.Empresa.Funcionalidad(558) = "1") Then '
|
||||
LnkAgregarCliente.Visible = False
|
||||
End If
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
LnkAgregarCliente.Visible = True
|
||||
'ocultar la columna de subproyecto
|
||||
GvPS.Columns(ColumnaSubProyecto).Visible = False
|
||||
ThProyecto.Visible = False
|
||||
ThProyecto2.Visible = False
|
||||
End If
|
||||
|
||||
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Pedido", "Ped"))
|
||||
|
||||
@@ -2601,6 +2594,13 @@ Partial Class Ventas
|
||||
Else
|
||||
ViewState("CveCliente") = -1
|
||||
HdnCveCliente.Value = "-1"
|
||||
|
||||
'SI TIENE UN CLIENTE POR DEFECTO DEBE CARGARLO AL INICIAR
|
||||
If UsuarioActual.Empresa.Funcionalidad(714).ToEntero() > 0 Then
|
||||
ViewState("CveCliente") = UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
|
||||
HdnCveCliente.Value = UsuarioActual.Empresa.Funcionalidad(714)
|
||||
CargaCliente(CveCliente)
|
||||
End If
|
||||
End If
|
||||
|
||||
'Carga empresa CRM
|
||||
@@ -3404,37 +3404,22 @@ Partial Class Ventas
|
||||
HLFAgregarOS.NavigateUrl = $"/OS/OrdenesServicios.aspx?CveVenta={CveVenta}"
|
||||
End If
|
||||
|
||||
End If
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
LnkAgregarCliente.Visible = True
|
||||
'ocultar la columna de subproyecto
|
||||
GvPS.Columns(ColumnaSubProyecto).Visible = False
|
||||
ThProyecto.Visible = False
|
||||
ThProyecto2.Visible = False
|
||||
|
||||
TxtCantidad.Text = "1"
|
||||
TxtCantidad.Focus()
|
||||
TrDescripcionVenta.Visible = False
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(189, 190) Then
|
||||
Dim jsFocus As String = "$(document).ready(function () {
|
||||
|
||||
$('#TxtCantidad').on('keydown', function (e) {
|
||||
if (e.which == 13 || e.which == 9 ) {
|
||||
let valorNumericoCantidad = parseFloat($('#TxtCantidad').val());
|
||||
e.preventDefault();
|
||||
if(valorNumericoCantidad > 0){
|
||||
$('#C_Tab_TabGenerales_DdlPS > select').select2('open').next().find(':input.select2-search__field').focus();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
UpPS.Update()
|
||||
|
||||
$('#TxtPrecio').on('keydown', function (e) {
|
||||
if (e.which == 13 || e.which == 9 ) {
|
||||
let valorNumericoPrecio = parseFloat($('#TxtCantidad').val());
|
||||
e.preventDefault();
|
||||
if(valorNumericoPrecio > 0){
|
||||
$('#LbAgregar').focus();
|
||||
}
|
||||
}
|
||||
});
|
||||
RegistraScript("$('#TxtCantidad').focus();", "A1")
|
||||
End If
|
||||
|
||||
|
||||
});"
|
||||
RegistraScript(jsFocus)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -18133,8 +18118,9 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(186, 189) Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
TxtCantidad.Focus()
|
||||
TxtCantidad.Text = "1"
|
||||
End If
|
||||
|
||||
UpPS.Update()
|
||||
@@ -23828,18 +23814,33 @@ Partial Class Ventas
|
||||
If e.CommandName = "Clonar" Then
|
||||
Dim RowNum As Integer = Convert.ToInt32(e.CommandArgument)
|
||||
Dim GvRow As GridViewRow = GvPS.Rows(RowNum)
|
||||
TxtCantidad.Text = GvPS.Rows(RowNum).FCLiteral("LtlCantidad").Text
|
||||
DdlClasificacion.SelectedValue = GvRow.DataKey("CveClasificacion")
|
||||
DdlPS.SelectedValue = GvRow.DataKey("CvePS")
|
||||
DdlPS_SelectedIndexChanged(Nothing, Nothing)
|
||||
DdlUnidadMedida.SelectedValue = GvRow.DataKey("CveUM")
|
||||
TxtObsPS.Text = GvRow.FCLiteral("LtlObsPS").Text
|
||||
|
||||
|
||||
If (GvRow.RowState = DataControlRowState.Edit OrElse GvRow.RowState = 5) Then
|
||||
TxtCantidad.Text = GvRow.FCTextBox("TxtCantidad").Text
|
||||
DdlClasificacion.SelectedValue = GvRow.FCDropDownList("DdlClasificacion").SelectedValue
|
||||
DdlPS.SelectedValue = GvRow.FCDropDownLost("DdlPS").SelectedValue
|
||||
DdlPS_SelectedIndexChanged(Nothing, Nothing)
|
||||
DdlUnidadMedida.SelectedValue = GvRow.FCDropDownList("DdlUnidadMedida").SelectedValue
|
||||
TxtObsPS.Text = GvRow.FCTextBox("TxtObsPS").Text
|
||||
TxtPrecio.Text = GvRow.FCTextBox("TxtPrecio").Text
|
||||
Else
|
||||
TxtCantidad.Text = GvPS.Rows(RowNum).FCLiteral("LtlCantidad").Text
|
||||
DdlClasificacion.SelectedValueExistInsert(GvRow.DataKey("CveClasificacion"), GvRow.DataKey("Clasificacion"))
|
||||
DdlPS.SelectedValue = GvRow.DataKey("CvePS")
|
||||
DdlPS_SelectedIndexChanged(Nothing, Nothing)
|
||||
DdlUnidadMedida.SelectedValueExistInsert(GvRow.DataKey("CveUM"), GvRow.DataKey("UM"))
|
||||
TxtObsPS.Text = GvRow.FCLiteral("LtlObsPS").Text
|
||||
TxtPrecio.Text = GvRow.FCLiteral("LtlPU").Text
|
||||
End If
|
||||
|
||||
DdlProyecto.SelectedValue = GvRow.DataKey("CveProyecto")
|
||||
DdlProyecto_SelectedIndexChanged(Nothing, Nothing)
|
||||
DdlSubProyecto.SelectedValue = GvRow.DataKey("CveSubProyecto")
|
||||
TxtPrecio.Text = GvRow.FCLiteral("LtlPU").Text
|
||||
|
||||
RegistraScript("Recalcula();")
|
||||
LbAgregar_Click(Nothing, Nothing)
|
||||
|
||||
Else
|
||||
DdlPS_SelectedIndexChanged(Nothing, Nothing)
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user