Solicitud de devolucion en devoluciones,agregar agenda de resguardo
This commit is contained in:
@@ -372,7 +372,7 @@
|
||||
<div class="Widthall " style="min-width: 1082px;">
|
||||
<div class="table-VH">
|
||||
<div id="gv-container" class="table-VH-container">
|
||||
<asp:GridView ID="Gv" runat="server" CssClass="table table-smallpadding Widthall" BorderWidth="0" GridLines="None" AutoGenerateColumns="False" DataKeyNames="CveCompra,CveProveedor,Serie,Original,UUID,RFC,SerieFolio2,Descripcion,SerieFolio, CveProveedorSucursal" EmptyDataText="No se encontraron Cuentas X Pagar Pendientes" ClientIDMode="Static" ClientIDRowSuffix="CveMoneda,CveProveedor,CveProveedorSucursal,RowNum">
|
||||
<asp:GridView ID="Gv" runat="server" CssClass="table table-smallpadding Widthall" BorderWidth="0" GridLines="None" AutoGenerateColumns="False" DataKeyNames="CveCompra,CveProveedor,Serie,Original,UUID,RFC,SerieFolio2,Descripcion,SerieFolio, CveProveedorSucursal,Fecha" EmptyDataText="No se encontraron Cuentas X Pagar Pendientes" ClientIDMode="Static" ClientIDRowSuffix="CveMoneda,CveProveedor,CveProveedorSucursal,RowNum">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -688,8 +688,9 @@ Partial Class Bancos_RepProgramarRecursos
|
||||
Dim SerieFolio = gvr.DataKey("SerieFolio")
|
||||
Dim Importe = gvr.DataKey("Original").ToDouble.FormatoNumero()
|
||||
Dim ImporteProgramo = gvr.FCTextBox("TxtS").Text.ToDouble.FormatoNumero()
|
||||
Dim Fecha As String = gvr.DataKey("Fecha").ToDateTime().ToString("dd/MM/yyyy")
|
||||
|
||||
strBody.Append($"<tr class='Texto'><td>{SerieFolio}</td><td>{DateTime.Now}</td><td style='text-align: right;'><span >{Importe}</span></td><td style='text-align: right;'>{ImporteProgramo}</td></tr>")
|
||||
strBody.Append($"<tr class='Texto'><td>{SerieFolio}</td><td>{Fecha}</td><td style='text-align: right;'><span >{Importe}</span></td><td style='text-align: right;'>{ImporteProgramo}</td></tr>")
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
@@ -1902,6 +1902,13 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
ConceptoMovimiento = 8
|
||||
Almacen1 = CveAlmacenTraspasoDestino
|
||||
CveAlmacenTraspasoDestino = DdlAlmacen.SelectedValue.ToEntero
|
||||
End If
|
||||
|
||||
'CANCELACION DE DEVOLUCION
|
||||
If TipoMovimiento = 2 And TipoDocto = "Dev" And EsDevolucionVenta = 1 Then
|
||||
ConceptoMovimiento = 2
|
||||
Almacen1 = DdlAlmacen.SelectedValue.ToEntero
|
||||
CveAlmacenTraspasoDestino = DdlAlmacen.SelectedValue.ToEntero
|
||||
End If
|
||||
|
||||
CveMovimiento = ObjInventario.AddMovimiento(Almacen1, ConceptoMovimiento, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveAlmacenDestino:=CveAlmacenTraspasoDestino)
|
||||
@@ -1993,7 +2000,7 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
|
||||
'ENTRADA POR TRASPASO CUANDO ES REMISION
|
||||
If Not ErrorMovInv Then
|
||||
If CveAlmacenTraspasoDestino > 0 Then ' TRASPASO CUANDO ES REMISION
|
||||
If CveAlmacenTraspasoDestino > 0 AndAlso Not (TipoMovimiento = 2 And TipoDocto = "Dev" And EsDevolucionVenta = 1) Then ' TRASPASO CUANDO ES REMISION
|
||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacenTraspasoDestino, 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimiento, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero)
|
||||
FolioEntrada = ObjInventario.Folio
|
||||
|
||||
@@ -2064,8 +2071,8 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
End If
|
||||
|
||||
'AutoConta - El movimiento 1 es el de Venta
|
||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||
|
||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||
|
||||
If AutoConta And Not ErrorMovInv Then
|
||||
Dim ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
|
||||
@@ -142,7 +142,25 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4 truncate" style="max-width: 155px">Fecha de Vigencia:</label>
|
||||
<div class="col-md-8">
|
||||
<div style="display: inline-block; vertical-align: text-bottom;">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaVigencia" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaVigencia" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaV" runat="server" TargetControlID="TxtFechaVigencia" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaV" TargetControlID="TxtFechaVigencia" PopupButtonID="ImgFechaVigencia" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaV" runat="server" ControlToValidate="TxtFechaVigencia" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Vencimiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaV" runat="server" ControlToValidate="TxtFechaVigencia" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Vencimiento''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaV1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaV" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaV2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaV" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-4 truncate" style="max-width: 155px">
|
||||
Observaciones
|
||||
|
||||
@@ -734,7 +734,7 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
|
||||
Private Sub Guardar(Concepto As Integer)
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
ObjInventario.IniciaTransacSQL() 'Inicia la transacción
|
||||
Dim ObjEventos As New ClsOIEventos(ObjInventario.IniciaTransacSQL()) 'Inicia la transacción
|
||||
Dim TieneError = False
|
||||
Dim MensajeError As String = ""
|
||||
Dim ImporteConcepto = 0.0
|
||||
@@ -893,6 +893,9 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
|
||||
End Select
|
||||
|
||||
If Not TieneError Then
|
||||
TieneError = Not AgregarAgenda(ObjEventos, FolioEntrada, FolioSalida)
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
Dim Msg As New StringBuilder
|
||||
@@ -931,12 +934,29 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
End If
|
||||
|
||||
ObjInventario.Dispose()
|
||||
End Sub
|
||||
|
||||
ObjEventos.Dispose()
|
||||
End Sub
|
||||
Private Function AgregarAgenda(ByRef ObjEventos As ClsOIEventos, FolioEntrada As Integer, FolioSalida As Integer) As Boolean
|
||||
Dim TieneError As Boolean = False
|
||||
Dim RecurrenciaTipo = 0, Frecuencia = -1, DiasSemana = "-1", Dias = -1, Mes = -1, RecurrenciaFin = "-1", CveAgendaTipo = 4, Prioridad = 3, CveTipoEvento = 2, Importe = -1
|
||||
|
||||
Dim Asunto As String = $"Vencimiento de Resguardo de Material. FolioEntrada:{FolioEntrada}, FolioSalida:{FolioSalida}"
|
||||
Dim Descripcion As String = TxtObservaciones.Text.Trim()
|
||||
Dim Fecha As DateTime = TxtFechaVigencia.Text.Trim().ToDateTime()
|
||||
Dim FechaI As DateTime = Fecha
|
||||
Dim FechaF As DateTime = Fecha.AddHours(22)
|
||||
|
||||
TieneError = Not ObjEventos.AddEventoAgenda(CveAgendaTipo, Asunto, Descripcion, Prioridad, FechaI, FechaF, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
RecurrenciaTipo:=RecurrenciaTipo, Frecuencia:=Frecuencia, DiasSemana:=DiasSemana, Dia:=Dias, Mes:=Mes, RecurrenciaFin:=RecurrenciaFin, CveTipoEvento:=CveTipoEvento, Importe:=Importe)
|
||||
|
||||
Return Not TieneError
|
||||
End Function
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "TIPOS"
|
||||
|
||||
|
||||
Protected Sub RbTipo_CheckedChanged(sender As Object, e As EventArgs)
|
||||
DivCliente.Visible = False
|
||||
DivPersonal.Visible = False
|
||||
|
||||
@@ -16503,7 +16503,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
|
||||
If CveVenta > 0 AndAlso SaldoVenta = TxtTotal.Text.ToDecimal Then 'And (DdlTipoComprobante.SelectedValue.Contiene({"Rem", "Ped"}) Or (DdlTipoComprobante.SelectedValue.Contiene({"Ing"}) And TxtFecha.Text.ToDate.Month = Now.Month And TxtFecha.Text.ToDate.Year = Now.Year)) Then
|
||||
If CveVenta > 0 AndAlso (SaldoVenta = TxtTotal.Text.ToDecimal OrElse DdlTipoComprobante.SelectedValue = "Dev") Then 'And (DdlTipoComprobante.SelectedValue.Contiene({"Rem", "Ped"}) Or (DdlTipoComprobante.SelectedValue.Contiene({"Ing"}) And TxtFecha.Text.ToDate.Month = Now.Month And TxtFecha.Text.ToDate.Year = Now.Year)) Then
|
||||
|
||||
If Not DevolucionAlmacen = 2 Then
|
||||
'If UsuarioActual.Empresa.Funcionalidad(555) = "1" Then
|
||||
@@ -16537,8 +16537,8 @@ Partial Class Ventas
|
||||
If Me.DevolucionAlmacen.Contiene(2) Then
|
||||
InicializaDevolucionAlmacen()
|
||||
UpnTools.Update()
|
||||
Alert("El movimiento ya fue devuelto.", TipoMensaje.MsgAdvertencia)
|
||||
ObjVentas.Dispose()
|
||||
Alert("El movimiento ya fue devuelto.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
Reference in New Issue
Block a user