This commit is contained in:
2024-07-02 07:51:49 -07:00
parent cd803ff55b
commit 5d6b81888e
2 changed files with 31 additions and 15 deletions

View File

@@ -7942,7 +7942,7 @@
<label>Descripción:</label> <label>Descripción:</label>
</div> </div>
<div class="col-md-10"> <div class="col-md-10">
<asp:TextBox ID="TxtMotivoCancelacion" runat="server" Height="100" Width="100%" TextMode="MultiLine" CausesValidation="true" MaxLength="500"></asp:TextBox> <asp:TextBox ID="TxtMotivoCancelacion" runat="server" Height="100" Width="100%" TextMode="MultiLine" CausesValidation="true" MaxLength="500" Rows="3"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVDescripcionCancelacion" runat="server" CssClass="help-block errorimput" Display="Dynamic" ControlToValidate="TxtMotivoCancelacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalCancelarDocumento"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVDescripcionCancelacion" runat="server" CssClass="help-block errorimput" Display="Dynamic" ControlToValidate="TxtMotivoCancelacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalCancelarDocumento"></asp:RequiredFieldValidator>
</div> </div>
</div> </div>
@@ -7970,6 +7970,11 @@
<asp:CheckBox ID="ChkDevAlm" AutoPostBack="true" runat="server" OnCheckedChanged="ChkDevAlm_CheckedChanged" /><asp:Label ID="LblDevAlm" Text="Devolución Almacen" runat="server"></asp:Label> <asp:CheckBox ID="ChkDevAlm" AutoPostBack="true" runat="server" OnCheckedChanged="ChkDevAlm_CheckedChanged" /><asp:Label ID="LblDevAlm" Text="Devolución Almacen" runat="server"></asp:Label>
</h5> </h5>
</div> </div>
<div id="DivGeneraIxC" runat="server" visible="false">
<h5>
<asp:CheckBox ID="ChkGeneraIxC" runat="server" /><asp:Label ID="Label4" Text="Genera IxC" runat="server"></asp:Label>
</h5>
</div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<asp:UpdatePanel ID="UpFooterCancelarRemision" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpFooterCancelarRemision" runat="server" UpdateMode="Conditional">

View File

@@ -7080,6 +7080,7 @@ Partial Class Ventas
DdlSucursalCliente.Items.Clear() DdlSucursalCliente.Items.Clear()
Dim dtts As DataTable = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente).FiltraParametros("CveClienteSucursal > 0") Dim dtts As DataTable = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente).FiltraParametros("CveClienteSucursal > 0")
If dtts IsNot Nothing AndAlso dtts.Rows.Count > 0 Then If dtts IsNot Nothing AndAlso dtts.Rows.Count > 0 Then
DdlSucursalCliente.DataSource = dtts DdlSucursalCliente.DataSource = dtts
DdlSucursalCliente.Items.Insert(0, New ListItem("Matriz", "-1")) DdlSucursalCliente.Items.Insert(0, New ListItem("Matriz", "-1"))
@@ -13882,9 +13883,11 @@ Partial Class Ventas
End If End If
End If End If
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso EsVentaMedica Then
If DdlSucursalCliente.SelectedValue.ToEntero > 0 Then If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso EsVentaMedica Then
Dim CveClientesucursatTemp As Integer = DdlClienteSucursalSucursal()
If CveClientesucursatTemp > 0 Then
Dim drr As DataRow = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente).FiltroPrimero($" CveClienteSucursal = {DdlSucursalCliente.SelectedValue.ToEntero}") Dim drr As DataRow = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente).FiltroPrimero($" CveClienteSucursal = {DdlSucursalCliente.SelectedValue.ToEntero}")
If drr IsNot Nothing Then If drr IsNot Nothing Then
If RBLTipoVenta.SelectedValue.Contiene("3") Then 'cuando es A-vista If RBLTipoVenta.SelectedValue.Contiene("3") Then 'cuando es A-vista
@@ -25160,9 +25163,13 @@ Partial Class Ventas
Else Else
DdlPS_SelectedIndexChanged(Nothing, Nothing) DdlPS_SelectedIndexChanged(Nothing, Nothing)
Dim drr As DataRow = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente).FiltroPrimero($"CveClienteSucursal={DdlSucursalCliente.SelectedValue}") End If
End Sub
Protected Sub OrdenarGvPS(ByVal sender As Object, ByVal e As EventArgs)
For Each row As GridViewRow In GvPS.Rows
TmpDT.Rows(row.RowIndex)("Orden") = row.FCTextBox("TxtOrden").Text.ToEntero() TmpDT.Rows(row.RowIndex)("Orden") = row.FCTextBox("TxtOrden").Text.ToEntero()
Next Next
Dim resultados = From OrdenDT In TmpDT Dim resultados = From OrdenDT In TmpDT
Order By OrdenDT("Orden").ToString().ToEntero() Order By OrdenDT("Orden").ToString().ToEntero()
@@ -25354,6 +25361,10 @@ Partial Class Ventas
Exit Sub Exit Sub
End If End If
If UsuarioActual.CveRol = 1 Then
DivGeneraIxC.Visible = False
End If
If SaldoAlmacen <> 0 Then If SaldoAlmacen <> 0 Then
If UsuarioActual.TienePermisoProceso(269) Then If UsuarioActual.TienePermisoProceso(269) Then
@@ -25747,7 +25758,6 @@ Partial Class Ventas
End If End If
Next Next
End If End If
ObjFacturaCancelacion.CveAlmacenDevolucion = CveAlmacenDevolucion ObjFacturaCancelacion.CveAlmacenDevolucion = CveAlmacenDevolucion
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ObjFacturaCancelacion.TipoDocto.Contiene("Rem", "Dev") Then If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ObjFacturaCancelacion.TipoDocto.Contiene("Rem", "Dev") Then
@@ -25785,7 +25795,6 @@ Partial Class Ventas
End If End If
End Using End Using
If DtBonificaciones IsNot Nothing AndAlso DtBonificaciones.Rows.Count > 0 Then If DtBonificaciones IsNot Nothing AndAlso DtBonificaciones.Rows.Count > 0 Then
For Each RowBon As DataRow In DtBonificaciones.Rows For Each RowBon As DataRow In DtBonificaciones.Rows
Try Try
@@ -25802,13 +25811,10 @@ Partial Class Ventas
OnError("Ocurrió un error al cancelar la bonificación", ex) OnError("Ocurrió un error al cancelar la bonificación", ex)
strMensaje.Append("<br/> Ocurrió un error al cancelar la bonificación") strMensaje.Append("<br/> Ocurrió un error al cancelar la bonificación")
End Try End Try
Next Next
DtBonificaciones.Dispose() DtBonificaciones.Dispose()
End If End If
End If End If
End If End If
SWatch.Stop() SWatch.Stop()
@@ -25839,17 +25845,14 @@ Partial Class Ventas
End If End If
End If End If
End If End If
Else Else
Alert("Ocurrió un error al generar la cancelación", TipoMensaje.MsgError) Alert("Ocurrió un error al generar la cancelación", TipoMensaje.MsgError)
End If End If
Catch ex As Exception Catch ex As Exception
OnError("Ocurrío un error al cancelar", ex) OnError("Ocurrió un error al cancelar", ex)
End Try End Try
ObjFacturaCancelacion.Dispose() ObjFacturaCancelacion.Dispose()
UpEstatus.Update() UpEstatus.Update()
If Not String.IsNullOrEmpty(LigaRedirigir) Then If Not String.IsNullOrEmpty(LigaRedirigir) Then
@@ -37656,27 +37659,32 @@ Partial Class Ventas
End Sub End Sub
Private Sub CargaDdlClientesSucursal() Private Sub CargaDdlClientesSucursal()
DdlClienteSucursal.DataSource = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa) DdlClienteSucursal.DataSource = GlobalDTClientesTodosSucursales(UsuarioActual.CveEmpresa)
DdlClienteSucursal.DataBind() DdlClienteSucursal.DataBind()
DdlClienteSucursal.Items.Insert(0, New ListItem("Seleccione uno", "-1")) DdlClienteSucursal.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False) Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
If EsWS Then If EsWS Then
DdlClientesModal.setEsWebService(True) DdlClientesModal.setEsWebService(True)
Else Else
DdlClientesModal.setEsWebService(False) DdlClientesModal.setEsWebService(False)
DdlClientesModal.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) DdlClientesModal.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
DdlClientesModal.DataBind() DdlClientesModal.DataBind()
DdlClientesModal.ddl.Items.Insert(0, New ListItem("Seleccione Uno", "-1")) DdlClientesModal.ddl.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
End If End If
End Sub End Sub
Protected Sub ChkRequiereTecnico_CheckedChanged(sender As Object, e As EventArgs) Protected Sub ChkRequiereTecnico_CheckedChanged(sender As Object, e As EventArgs)
TdFechaOS1.Visible = ChkRequiereTecnico.Checked TdFechaOS1.Visible = ChkRequiereTecnico.Checked
UpCliente.Update() UpCliente.Update()
End Sub End Sub
@@ -37692,6 +37700,7 @@ Partial Class Ventas
ChkRequiereTecnicoModal.Checked = True ChkRequiereTecnicoModal.Checked = True
ChkRequiereTecnicoModal.Enabled = True ChkRequiereTecnicoModal.Enabled = True
DvModalRequiereOSFecha.Visible = True DvModalRequiereOSFecha.Visible = True
'If CveCliente > 0 Then 'If CveCliente > 0 Then
' CargaSucursalesModal(CveCliente) ' CargaSucursalesModal(CveCliente)
'End If 'End If
@@ -38160,7 +38169,9 @@ Partial Class Ventas
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
If DdlSucursalCliente.SelectedValue.ToEntero > 0 Then If DdlSucursalCliente.SelectedValue.ToEntero > 0 Then
Dim drr As DataRow = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente).FiltroPrimero($"CveClienteSucursal={DdlSucursalCliente.SelectedValue}") Dim drr As DataRow = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente).FiltroPrimero($"CveClienteSucursal={DdlSucursalCliente.SelectedValue}")
If drr IsNot Nothing Then If drr IsNot Nothing Then
If RBLTipoVenta.SelectedValue.Contiene("6") Then If RBLTipoVenta.SelectedValue.Contiene("6") Then
tCveAlmacenExistencia = drr("CveAlmacenAlterno").ToString.ToEntero tCveAlmacenExistencia = drr("CveAlmacenAlterno").ToString.ToEntero