Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -6489,14 +6489,16 @@ Namespace Modelos
|
||||
|
||||
For Each RowDevolucion As DataRow In DtDevMovs.Rows
|
||||
CveAlmacen = RowDevolucion("CveAlmacen").ToString().ToEntero()
|
||||
Dim tdtt As DataTable = DtMovRemision.FiltraParametros($"CveMovimiento={RowDevolucion("CveMovimiento")} AND CvePS > 0 AND SaldoAlmacen <> 0")
|
||||
|
||||
If Not CancelarMovimientosRemision(CveVenta, CveAlmacen, CveAlmacenGeneral, DtMovRemision.FiltraParametros($"CveMovimiento={RowDevolucion("CveMovimiento")} AND CvePS > 0"), ObjVentas, ObjInventario, ObjConta) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al cancelar los movimientos de la remisión."
|
||||
Exit For
|
||||
If tdtt IsNot Nothing AndAlso tdtt.Rows.Count > 0 Then
|
||||
If Not CancelarMovimientosRemision(CveVenta, CveAlmacen, CveAlmacenGeneral, tdtt, ObjVentas, ObjInventario, ObjConta) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al cancelar los movimientos de la remisión."
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
'CANCELAR MOVIMIENTOS DE USADOS SI TIENE
|
||||
@@ -6513,7 +6515,6 @@ Namespace Modelos
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'VERIFICAR MOVIMIENTOS DE APARTADOS
|
||||
@@ -6531,7 +6532,6 @@ Namespace Modelos
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
Dim CveEmpresa As Integer = -1
|
||||
Dim FI As Date
|
||||
Dim FF As Date
|
||||
If UsuarioActual(context) Is Nothing Then Exit Sub
|
||||
|
||||
If context.Request("METODO") IsNot Nothing Then
|
||||
|
||||
|
||||
@@ -3654,15 +3654,15 @@ Partial Class Compras_Compras
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(560) = "1" Then
|
||||
If ObjProveedor.GetProveedoresEvaluacionPediente(Me.CveProveedor, UsuarioActual.CveEmpresa) Then
|
||||
If ObjProveedor.DtResultados.Rows.Count > 0 Then
|
||||
Me.RequiereEvaluacion = ObjProveedor.DtResultados.Rows(0)("RequiereEvaluacion").ToString() = "1"
|
||||
Me.CveUsuarioEvaluador = ObjProveedor.DtResultados.Rows(0)("CveUsuarioEvaluador").ToString().ToEntero()
|
||||
End If
|
||||
End If
|
||||
If ObjProveedor.GetProveedoresEvaluacionPediente(Me.CveProveedor, UsuarioActual.CveEmpresa) Then
|
||||
If ObjProveedor.DtResultados.Rows.Count > 0 Then
|
||||
Me.RequiereEvaluacion = ObjProveedor.DtResultados.Rows(0)("RequiereEvaluacion").ToString() = "1"
|
||||
Me.CveUsuarioEvaluador = ObjProveedor.DtResultados.Rows(0)("CveUsuarioEvaluador").ToString().ToEntero()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjProveedor.Dispose()
|
||||
ObjProveedor.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaAnticipos(CveProveedor As Integer, Optional FiltroTipo As String = "-1")
|
||||
@@ -4406,7 +4406,7 @@ Partial Class Compras_Compras
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(121) Then
|
||||
If UsuarioActual.TienePermisoProceso(121) And Not (CveImportacion > 0 Or CveFlete > 0) Then 'valida que de salida, pero sino es importación o costoindirecto
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
|
||||
If Not NCDevolucion And Not ChkNCInvNC.Checked Then
|
||||
Alert("Favor de seleccionar un producto en la pestaña de almacen", TipoMensaje.MsgAdvertencia)
|
||||
@@ -13801,10 +13801,10 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
@@ -18128,11 +18128,13 @@ Partial Class Compras_Compras
|
||||
Dr("CveUM") = DtEquivalencia.FiltroPrimeroValor("CveUM", "UnidadBase = 1")
|
||||
Dr("UM") = DtEquivalencia.FiltroPrimeroValor("UM", "UnidadBase = 1")
|
||||
Dr("Cantidad") = Dr("Cantidad").ToString.ToDouble * Equivalencia
|
||||
Dr("CantidadF") = Dr("CantidadF").ToString.ToDouble * Equivalencia
|
||||
Dr("PU") = Math.Round(Dr("PU").ToString.ToDouble / Equivalencia, 6)
|
||||
|
||||
TmpDT.AcceptChanges()
|
||||
GvPS.DataSource = TmpDT
|
||||
GvPS.DataBind()
|
||||
CargaGvInv()
|
||||
UpPS.Update()
|
||||
Else
|
||||
Alert("La cantidad de equivalencia de la unidad de medida debe ser mayor a 0", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
Imports System.Data
|
||||
Imports System.Runtime.CompilerServices
|
||||
Imports System.Runtime.Remoting
|
||||
|
||||
'Imports DocumentFormat.OpenXml
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
|
||||
|
||||
@@ -781,7 +781,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
'DEVOLUCION REMISION
|
||||
If TipoMovimiento = 2 And TipoDocto.Contiene("Rem", "Ped") And Not CveAlmacenTraspasoDestino > 0 Then
|
||||
Alert("La remisión que se intenta devolver presenta inconsistencias. Comuniquese con servicio tecnico SIG.", TipoMensaje.MsgError)
|
||||
Alert("La remisión que se intenta devolver presenta inconsistencias. Comuniquese con servicio técnico SIG.", TipoMensaje.MsgError)
|
||||
BtnGuardar.Visible = False
|
||||
End If
|
||||
|
||||
@@ -2059,12 +2059,6 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
|
||||
'ValidaSeccion = False
|
||||
'ValidaCaducidad = False
|
||||
'ValidaLote = False
|
||||
|
||||
If ValidaSeccion Then
|
||||
Alert("La sección de almacen no ha sido especificada en todos los productos.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -2081,10 +2075,17 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
If Not Cantidad > 0 Then
|
||||
Alert("No se detecto ningun movimiento por hacer. Por favor verifique e intente nuevamente.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso TipoDocto = "Ped" Then
|
||||
VerificaCancelada = False
|
||||
End If
|
||||
|
||||
'PROCESO , si tiene proceso "176" no lo valida
|
||||
If Not UsuarioActual.TienePermisoProceso(176) Then
|
||||
Dim ValidaEntregaCompleto As Boolean = Not UsuarioActual.TienePermisoProceso(176)
|
||||
If CveTipoVenta = 3 Then ValidaEntregaCompleto = False
|
||||
|
||||
'PROCESO , si tiene proceso "176" no lo valida
|
||||
If ValidaEntregaCompleto Then 'Tipoventa diferente a A-vista
|
||||
If Not TipoDocto.Contiene("Dev") Then 'para devoluciones debe de aceptar parcialidades
|
||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||
If Gvr.DataKey("CantidadF").ToDecimal <> Gvr.FCTextBox("TbCantidadF").Text.ToDecimal Then
|
||||
@@ -3403,17 +3404,12 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Msg.AppendFormat("<br/><br/>Recibir Usado: <b><a href=""/Inventarios/RecepcionUsados.aspx?CveRemision={0}"" target=""_blank"" class=""Texto"">Ir a Recepción de Usados</a></b>", CveVentaSurtir)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Alert(Msg.ToString(), TipoMensaje.MsgInformacion)
|
||||
|
||||
Limpia()
|
||||
CargaPendientes()
|
||||
LimpiaCampos()
|
||||
|
||||
CargaBitacora = False
|
||||
|
||||
|
||||
Else
|
||||
ObjInventario.RollBack()
|
||||
Alert(TextoError.ToString(), TipoMensaje.MsgError)
|
||||
@@ -3539,7 +3535,6 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Cantidad = Gvr.FCTextBox("TbCantidadF").Text.ToDecimal
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If ValidaSeccion Then
|
||||
|
||||
@@ -2028,19 +2028,20 @@ Partial Class ProductosyServicios
|
||||
Dim ObjProductosServicios As New ClsProductosServicios()
|
||||
ObjProductosServicios.IniciaTransacSQL()
|
||||
Dim TieneError As Boolean = False
|
||||
Dim CodigoAdicional As String = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPSAdicional.SelectedValue.ToEntero).FiltroPrimeroValor("Codigo", "")
|
||||
|
||||
If CvePSAdicional < 0 Then
|
||||
If Not ObjProductosServicios.AddPSAdicionales(CvePS, DdlPSAdicional.SelectedValue.ToEntero, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0), Tipo:=RblTipoAdicional.SelectedValue.ToEntero()) Then
|
||||
TieneError = True
|
||||
Else
|
||||
TieneError = GuardarProductosEquivalenteEnFranquicia(ObjProductosServicios, True)
|
||||
TieneError = GuardarProductosEquivalenteEnFranquicia(ObjProductosServicios, True, CodigoAdicional)
|
||||
End If
|
||||
Else
|
||||
|
||||
If Not ObjProductosServicios.UpdatePSAdicionales(CvePS, DdlPSAdicional.SelectedValue.ToEntero, CvePSAdicional, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0), Tipo:=RblTipoAdicional.SelectedValue.ToEntero()) Then
|
||||
TieneError = True
|
||||
Else
|
||||
TieneError = GuardarProductosEquivalenteEnFranquicia(ObjProductosServicios, False, PSAdicionalAnterior)
|
||||
TieneError = GuardarProductosEquivalenteEnFranquicia(ObjProductosServicios, False, CodigoAdicional, PSAdicionalAnterior)
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -3292,14 +3293,14 @@ Partial Class ProductosyServicios
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function GuardarProductosEquivalenteEnFranquicia(ObjPS As ClsProductosServicios, Agregar As Boolean, Optional PSAdicionalAnterior As String = "") As Boolean
|
||||
Private Function GuardarProductosEquivalenteEnFranquicia(ObjPS As ClsProductosServicios, Agregar As Boolean, CodigoAdicional As String, Optional PSAdicionalAnterior As String = "") As Boolean
|
||||
If UsuarioActual.Empresa.Funcionalidad(563) <> "" Then
|
||||
|
||||
Dim StrEmpresas As String = UsuarioActual.Empresa.Funcionalidad(563)
|
||||
Dim EmpresasFranquicia As List(Of Integer) = StrEmpresas.Split(","c).ToList().ConvertAll(Function(x) Convert.ToInt32(x))
|
||||
For Each Franquicia As Integer In EmpresasFranquicia
|
||||
Dim CvePSPagina As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("Codigo = '{0}'", TxtCodigo.Text.Trim)).ToEntero
|
||||
Dim CvePSAdicional As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("PS = '{0}'", DdlPSAdicional.txtText.Value)).ToEntero
|
||||
Dim CvePSAdicional As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("Codigo = '{0}'", CodigoAdicional)).ToEntero
|
||||
|
||||
If CvePSPagina <= 0 Then
|
||||
Alert(String.Format("El producto de la página no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
||||
@@ -3323,8 +3324,6 @@ Partial Class ProductosyServicios
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
@@ -85,37 +85,29 @@
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas con los filtros especificados"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" Style="text-align: center;" GridLines="None" Width="99%">
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" DataKeyNames="CveCliente,CveVendedor,CveSubProyecto,CvePS,CveUnidadMedida,Cantidad,PU,CveVentaDetalle" data-sort="true" GridLines="None" Width="99%">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Grupo" DataField="GPO" ItemStyle-Width="40%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-Width="20%">
|
||||
<HeaderTemplate>
|
||||
<asp:Literal runat="server" Text='<%# NowADS().Year %>'></asp:Literal>
|
||||
</HeaderTemplate>
|
||||
<asp:BoundField HeaderText="Cliente" DataField="NombreComercial" ItemStyle-Width="30%" />
|
||||
<asp:BoundField HeaderText="SerieFolio" DataField="SerieFolio" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-Width="7.5%" />
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-Width="30%" />
|
||||
<asp:BoundField HeaderText="Vendedor" DataField="Vendedor" ItemStyle-Width="20%" />
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="2.5%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Anio1", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="20%">
|
||||
<HeaderTemplate>
|
||||
<asp:Literal runat="server" Text='<%# (NowADS().Year - 1) %>'></asp:Literal>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Anio2", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="20%">
|
||||
<HeaderTemplate>
|
||||
<asp:Literal runat="server" Text='<%# (NowADS().Year - 2) %>'></asp:Literal>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Anio3", "{0:N2}") %>'></asp:Literal>
|
||||
<asp:Checkbox runat="server" ID="chk" ></asp:Checkbox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align:center;">
|
||||
<asp:Button ID="BtnEntregar" runat="server" Text="Entregado" class="btn btn-primary" OnClick="BtnEntregar_Click" />
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel runat="server" ID="UpTipoCambio" UpdateMode="Conditional">
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Partial Class Ventas_RepPedidosSTF
|
||||
Inherits ClsPaginas
|
||||
@@ -20,6 +21,8 @@ Partial Class Ventas_RepPedidosSTF
|
||||
DdlVendedor.DataBind()
|
||||
DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlVendedor.Items.Insert(1, New ListItem("Sin Vendedor", "-2"))
|
||||
|
||||
If UsuarioActual.CveVendedor > 0 Then DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor)
|
||||
End Sub
|
||||
|
||||
Protected Sub CargaDatos()
|
||||
@@ -32,19 +35,101 @@ Partial Class Ventas_RepPedidosSTF
|
||||
GvDatos.DataBind()
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Select Case e.Row.DBCampo("TipoFila")
|
||||
Case "1"
|
||||
e.Row.CssClass = "Totales"
|
||||
Case "2"
|
||||
e.Row.CssClass = "SubTotales"
|
||||
Case "3"
|
||||
e.Row.CssClass = "Texto"
|
||||
End Select
|
||||
End If
|
||||
'If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
' Select Case e.Row.DBCampo("TipoFila")
|
||||
' Case "1"
|
||||
' e.Row.CssClass = "Totales"
|
||||
' Case "2"
|
||||
' e.Row.CssClass = "SubTotales"
|
||||
' Case "3"
|
||||
' e.Row.CssClass = "Texto"
|
||||
' End Select
|
||||
'End If
|
||||
End Sub
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnEntregar_Click(sender As Object, e As EventArgs)
|
||||
'validar que están seleccionados
|
||||
Dim TmpDTRemis As New DataTable
|
||||
TmpDTRemis.Columns.Add("CveVentaDetalle", GetType(Integer))
|
||||
TmpDTRemis.Columns.Add("CveCliente", GetType(Integer))
|
||||
TmpDTRemis.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||
TmpDTRemis.Columns.Add("CvePS", GetType(Integer))
|
||||
TmpDTRemis.Columns.Add("Cantidad", GetType(Integer))
|
||||
TmpDTRemis.Columns.Add("CveUnidadMedida", GetType(Integer))
|
||||
TmpDTRemis.Columns.Add("PU", GetType(Decimal))
|
||||
TmpDTRemis.Columns.Add("CveVendedor", GetType(Decimal))
|
||||
'agruparo por cliente
|
||||
For Each gvr As GridViewRow In GvDatos.Rows
|
||||
If gvr.FCCheckBox("chk").Checked Then
|
||||
Dim drp As DataRow = TmpDTRemis.NewRow
|
||||
drp("CvePS") = gvr.DataKey("CvePS").ToEntero
|
||||
drp("Cantidad") = gvr.DataKey("Cantidad").ToEntero
|
||||
drp("PU") = gvr.DataKey("PU").ToEntero
|
||||
drp("CveUnidadMedida") = gvr.DataKey("CveUnidadMedida").ToEntero
|
||||
drp("CveSubProyecto") = gvr.DataKey("CveSubProyecto").ToEntero
|
||||
drp("CveCliente") = gvr.DataKey("CveCliente").ToEntero
|
||||
drp("CveVendedor") = gvr.DataKey("CveVendedor").ToEntero
|
||||
drp("CveVentaDetalle") = gvr.DataKey("CveVentaDetalle").ToEntero
|
||||
TmpDTRemis.Rows.Add(drp)
|
||||
End If
|
||||
Next
|
||||
|
||||
If TmpDTRemis IsNot Nothing AndAlso TmpDTRemis.Rows.Count = 0 Then
|
||||
Alert("No se ha seleccionado ninguna partida, favor de seleccionar", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim ObjA As New ClsInventarios
|
||||
ObjA.IniciaTransacSQL()
|
||||
Dim TieneError As Boolean = False
|
||||
Dim StrAlerta As New StringBuilder
|
||||
|
||||
For Each drt As DataRow In TmpDTRemis.FiltraParametros("", DistinctColumns:={"CveCliente", "CveSubProyecto", "CveVendedor"}).Rows
|
||||
|
||||
Dim ObjFactura As Modelos.Factura = Modelos.Factura.CrearVentaNueva(UsuarioActual, drt("CveSubProyecto").ToString.ToEntero, drt("CveCliente").ToString.ToEntero, 1, "Rem")
|
||||
ObjFactura.CveVendedor = drt("CveVendedor").ToString.ToEntero
|
||||
For Each dr As DataRow In TmpDTRemis.FiltraParametros($"CveCliente ={drt("CveCliente")} AND CveVendedor = {drt("CveVendedor")} AND CveSubProyecto = {drt("CveSubProyecto")}").Rows
|
||||
|
||||
If ObjFactura IsNot Nothing Then
|
||||
If Not ObjFactura.AgregarPS(dr("CvePS").ToString.ToEntero, dr("Cantidad").ToString.ToDecimal, dr("PU").ToString.ToDecimal, 0, "", CveSubProyecto:=dr("CveSubProyecto").ToString.ToEntero, CveVentaDetallePadre:=dr("CveVentaDetalle").ToString.ToEntero) Then
|
||||
Alert("Error al agregar producto", TipoMensaje.MsgAdvertencia)
|
||||
TieneError = True
|
||||
Exit For
|
||||
Else
|
||||
If Not ObjA.UpdateEstatusAlmacen(dr("CveVentaDetalle").ToString.ToEntero, 0) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
If Not TieneError Then
|
||||
ObjFactura.CalculaTotales()
|
||||
Dim Resp As New Modelos.Factura.MMensajeFactura
|
||||
Resp = ObjFactura.EmitirFactura(False, Transac:=ObjA.IniciaTransacSQL)
|
||||
|
||||
If Resp.CveVenta > 0 Then
|
||||
Dim a As String = "a"
|
||||
StrAlerta.AppendFormat("<a href = '/Ventas/Ventas.aspx?CveVenta={0}' class='Texto'>{1}</a><br/>", Resp.CveVenta, Resp.SerieFolio)
|
||||
'Respuesta.CveVenta = Resp.CveVenta
|
||||
'Respuesta.SerieFolio = Resp.SerieFolio
|
||||
'Respuesta.dtdetalle = TmpDTMat
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not TieneError Then
|
||||
ObjA.Commit()
|
||||
Alert("Se registraron las siguientes remisiones: <br/>" & StrAlerta.ToString)
|
||||
CargaDatos()
|
||||
Else
|
||||
ObjA.RollBack()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -577,9 +577,6 @@
|
||||
<td colspan="3">
|
||||
<asp:TextBox ID="TxtDescripcionVenta" runat="server" Rows="2" TextMode="MultiLine" Width="100%" MaxLength="300" CssClass="form-control input-sm" Enabled="false"></asp:TextBox></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr runat="server" id="TrVentasMedicas1" visible="false">
|
||||
<td><b>Médico:</b></td>
|
||||
<td>
|
||||
|
||||
@@ -6170,7 +6170,7 @@ Partial Class Ventas
|
||||
|
||||
TrVentasMedicas3.Visible = True
|
||||
|
||||
If DbRowVenta("CveMedico").ToString.ToEntero > 0 AndAlso CveTipoVenta.Contiene(1, 2, 3, 5) Then
|
||||
If DbRowVenta("CveMedico").ToString.ToEntero > 0 AndAlso CveTipoVenta.Contiene(1, 2, 3, 5, 6) Then
|
||||
TrVentasMedicas1.Visible = True
|
||||
|
||||
DdlMedico.SelectedValueExist(DbRowVenta("CveMedico").ToString)
|
||||
@@ -35173,7 +35173,7 @@ Partial Class Ventas
|
||||
DdlUsoCFDI.Enabled = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso CveTipoVenta.Contiene(1, 3, 5) Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso CveTipoVenta.Contiene(1, 2, 3, 5, 6) Then
|
||||
TrVentasMedicas1.Visible = True
|
||||
DdlMedico.Enabled = True
|
||||
DdlProcedimiento.Enabled = True
|
||||
|
||||
Reference in New Issue
Block a user