Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1316,7 +1316,7 @@ Public Class ClsBancos
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdateBancos_IE(FechaDocumento As DateTime, FechaAplicado As DateTime?, CveIE As Integer, Optional Folio As String = "-1", Optional CveCuentaDeposito As Integer = -1, Optional CveCuenta As Integer = -1,
|
||||
Optional Observaciones As String = "-1") As Boolean
|
||||
Optional Observaciones As String = "-1", Optional CveUsuarioModifico As Integer = -1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Banc_IEUpdate")
|
||||
@@ -1337,7 +1337,7 @@ Public Class ClsBancos
|
||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
||||
|
||||
|
||||
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
||||
|
||||
|
||||
End With
|
||||
|
||||
@@ -127,6 +127,7 @@ Public Class ClsContabilidad
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddPrePolizas(Modulo As String, CvePlantillaPoliza As Integer, Cargos As Double, Abonos As Double, CveMoneda As Integer, Fecha As Date, Concepto As String, CveUsuario As Integer, CveEmpresa As Integer, Optional FolioFijo As Integer = 0, Optional ReglaFolioPoliza As String = "", Optional CveTipoPoliza As Integer = -1) As Integer
|
||||
|
||||
Dim Retorno As Integer = -1
|
||||
@@ -225,6 +226,33 @@ Public Class ClsContabilidad
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Function AddPrePolizasNegativa(CvePrePoliza As Integer, CveUsuario As Integer, Concepto As String, CveEmpresa As Integer, Fecha As Date) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Conta_PrePolizasNegativaAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@Concepto", SqlDbType.VarChar).Value = Concepto
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Fecha", SqlDbType.Date).Value = Fecha
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
Public Function GetProveedorAuxiliar(CveProveedor As Integer, CveCompra As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
'Data = New DataTable
|
||||
|
||||
@@ -424,32 +424,6 @@ Partial Class Bancos_IE
|
||||
|
||||
End Property
|
||||
|
||||
Private Property CuentaOld As String
|
||||
Get
|
||||
Return CType(ViewState("CuentaOld"), String)
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("CuentaOld") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaOld As String
|
||||
Get
|
||||
Return CType(ViewState("FechaOld"), String)
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaOld") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property FolioOld As String
|
||||
Get
|
||||
Return CType(ViewState("FolioOld"), String)
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FolioOld") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
#Region "CANCELACIÓN COMPLEMENTO MODAL V2"
|
||||
@@ -1122,10 +1096,6 @@ Partial Class Bancos_IE
|
||||
|
||||
End If
|
||||
|
||||
' DATOS PARA LA BITACORA
|
||||
CuentaOld = LblCuenta.Text
|
||||
FechaOld = TxtFechaDocumento.Text
|
||||
FolioOld = TxtFolio.Text
|
||||
|
||||
End If
|
||||
|
||||
@@ -3724,45 +3694,23 @@ Partial Class Bancos_IE
|
||||
|
||||
Dim IE As New ClsBancos
|
||||
IE.IniciaTransacSQL()
|
||||
Dim ObjGral As New ClsGenerales
|
||||
ObjGral.IniciaTransacSQL()
|
||||
Dim FechaAplicado As DateTime? = Nothing
|
||||
Dim OcurrioError As Boolean = False
|
||||
|
||||
Dim CveCuentaDepositoUpdate As Integer = If(DdlCuentaDeposito.SelectedValue.ToEntero.ToEntero = 0, -1, DdlCuentaDeposito.SelectedValue.ToEntero.ToEntero)
|
||||
|
||||
If IE.UpdateBancos_IE(TxtFechaDocumento.Text.ToDate, FechaAplicado, CveIE, TxtFolio.Text, CveCuentaDeposito:=CveCuentaDepositoUpdate, CveCuenta:=DdlCuenta.SelectedValue.ToEntero,
|
||||
Observaciones:=TxtObservaciones.Text) Then
|
||||
'Agrega a la Bitacora
|
||||
If CuentaOld <> DdlCuenta.SelectedItem.Text Then
|
||||
If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, CveIE, DdlCuenta.SelectedItem.Text, CuentaOld, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, "Cuenta", "Banco", TxtFolio.Text + " / " + Cuenta) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
If FechaOld <> TxtFechaDocumento.Text.Trim Then
|
||||
If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, CveIE, TxtFechaDocumento.Text.Trim, FechaOld, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, "Fecha", "Banco", TxtFolio.Text + " / " + Cuenta) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
If FolioOld <> TxtFolio.Text.Trim Then
|
||||
If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, CveIE, TxtFolio.Text.Trim, FolioOld, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, "Número", "Banco", TxtFolio.Text + " / " + Cuenta) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If Not IE.UpdateBancos_IE(TxtFechaDocumento.Text.ToDate, FechaAplicado, CveIE, TxtFolio.Text, CveCuentaDeposito:=CveCuentaDepositoUpdate, CveCuenta:=DdlCuenta.SelectedValue.ToEntero,
|
||||
Observaciones:=TxtObservaciones.Text, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
If OcurrioError Then
|
||||
IE.RollBack()
|
||||
ObjGral.RollBack()
|
||||
Else
|
||||
IE.Commit()
|
||||
ObjGral.Commit()
|
||||
Alert("La Actualización del documento se realizó correctamente", TipoMensaje.MsgInformacion, $"document.location.href=""IE.aspx?CveIE={CveIE}""")
|
||||
End If
|
||||
IE.Dispose()
|
||||
ObjGral.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub ImgUpdateCuentaDeposito_Click(sender As Object, e As ImageClickEventArgs)
|
||||
@@ -4356,6 +4304,12 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorCompra Then
|
||||
If Not ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
|
||||
ErrorCompra = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorCompra Then
|
||||
Alert("La poliza ha sido desvinculada y eliminada con exito.", TipoMensaje.MsgInformacion)
|
||||
ObjAC.Commit()
|
||||
@@ -4713,7 +4667,7 @@ Partial Class Bancos_IE
|
||||
If Borrar = True Then
|
||||
Dim ObjAC As ClsContPAQi = Nothing
|
||||
Dim Banc As New ClsBancos
|
||||
Banc.IniciaTransacSQL()
|
||||
Dim ObjConta As New ClsContabilidad(Banc.IniciaTransacSQL())
|
||||
|
||||
Dim ErrorCompra = False
|
||||
|
||||
@@ -4732,6 +4686,13 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorCompra Then
|
||||
If Not ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
|
||||
ErrorCompra = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorCompra Then
|
||||
If Not Banc.EliminarBancos_IE(UsuarioActual.CveUsuario, CveIE) Then
|
||||
ErrorCompra = True
|
||||
@@ -4750,6 +4711,7 @@ Partial Class Bancos_IE
|
||||
|
||||
If ObjAC IsNot Nothing Then ObjAC.Dispose()
|
||||
Banc.Dispose()
|
||||
ObjConta.Dispose()
|
||||
End If
|
||||
Else
|
||||
Alert("Tiene que decir el motivo de su eliminacion.", TipoMensaje.MsgInformacion)
|
||||
@@ -4888,6 +4850,8 @@ Partial Class Bancos_IE
|
||||
|
||||
If e.Row.DataKey("Estatus").Contiene("1", "3") Then
|
||||
e.Row.FCLinkButton("LnkCancelarComplemetno").Visible = True
|
||||
Else
|
||||
e.Row.FCLinkButton("LnkCancelarComplemetno").Visible = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -7760,6 +7760,7 @@ Partial Class Compras_Compras
|
||||
Dim ObjAC As ClsContPAQi = Nothing
|
||||
Dim Comp As New ClsCompras()
|
||||
Dim ObjEventos As New ClsOIEventos(Comp.IniciaTransacSQL())
|
||||
Dim ObjConta As New ClsContabilidad(Comp.IniciaTransacSQL())
|
||||
|
||||
|
||||
Dim ErrorCompra = False
|
||||
@@ -7781,6 +7782,12 @@ Partial Class Compras_Compras
|
||||
Next
|
||||
End If
|
||||
|
||||
If Not ErrorCompra Then
|
||||
If Not ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
|
||||
ErrorCompra = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorCompra Then
|
||||
If Not Comp.DeleteCompra(CveCompra, False) Then
|
||||
ErrorCompra = True
|
||||
@@ -7799,6 +7806,7 @@ Partial Class Compras_Compras
|
||||
|
||||
If ObjAC IsNot Nothing Then ObjAC.Dispose()
|
||||
Comp.Dispose()
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAceptarAnticipos_Click(sender As Object, e As System.EventArgs) Handles BtnAceptarAnticipos.Click
|
||||
@@ -12857,6 +12865,12 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorCompra Then
|
||||
If Not ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
|
||||
ErrorCompra = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorCompra Then
|
||||
Alert("La poliza ha sido desvinculada y eliminada con exito.", TipoMensaje.MsgInformacion)
|
||||
ObjAC.Commit()
|
||||
|
||||
@@ -78,7 +78,10 @@
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:GridView ID="GVAuxiliar" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePrePoliza, Cargo, Abono, CveReferencia, IdPoliza,CvePrePolizaOriginal" EmptyDataText="No se encontraron Movimientos de Auxiliar" ToolTip="Listado de Auxiliar Contable" CssClass="table table-striped table-advance table-hover mysmallbtn Widthall" Style="text-align: center;" GridLines="None">
|
||||
|
||||
<asp:UpdatePanel UpdateMode="Conditional" runat="server" ID="UpDatos">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVAuxiliar" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePrePoliza, Cargo, Abono, CveReferencia, IdPoliza,CvePrePolizaOriginal" EmptyDataText="No se encontraron Movimientos de Auxiliar" ToolTip="Listado de Auxiliar Contable" CssClass="table table-striped table-advance table-hover mysmallbtn Widthall" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Fecha</HeaderTemplate>
|
||||
@@ -142,21 +145,34 @@
|
||||
</asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Eliminar" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" Visible='<%# Eval("Eliminable").ToString() = "1" AndAlso Eval("CvePrePoliza").ToString.Length > 0 %>' AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Cancelar" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgE" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Update" ImageUrl="/Imagenes/Btn_Delete.png" Visible='<%# Eval("Cancelable").ToString.ToEntero > 0 And Eval("CvePrePoliza").ToString.ToEntero > 0 And Eval("CveReferencia").ToString.ToEntero > 0 And (Eval("Cargo").ToString.ToDecimal > 0 OrElse Eval("Abono").ToString.ToDecimal > 0) %>' OnClientClick="javascript:return C();" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Cancelar" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgCancelar" runat="server" CausesValidation="False" OnClick="imgCancelar_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -168,6 +184,66 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="DivCancelar" class="modal fade">
|
||||
<div class="modal-dialog" style="max-height: 500px; max-width: 500px;">
|
||||
<asp:UpdatePanel ID="UpEliminarCotizacion" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
|
||||
<h3 class="modal-title">Cancelar Movimiento</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row" style="align-items: center; vertical-align: middle;">
|
||||
<label class="col-md-4" style="max-width: 155px;">Concepto:</label>
|
||||
<asp:TextBox ID="TxtConceptoCancelacion" runat="server" CssClass="form-control input-sm" Width="90%" CausesValidation="true" MaxLength="100" ValidationGroup="GrpCancelarPrepoliza"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtConceptoCancelacion" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoCancelacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpCancelarPrepoliza"></asp:RequiredFieldValidator>
|
||||
|
||||
</div>
|
||||
<div class="row" style="align-items: center; vertical-align: middle;">
|
||||
<label class="col-md-4" style="max-width: 155px;">Fecha de Cancelación:</label>
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="input-group date date-picker" data-date-format="dd/mm/yyyy" style="width: 85px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaCancelacion" runat="server" CssClass="form-control input-sm" Width="80px" CausesValidation="true" MaxLength="10" ValidationGroup="GrpCancelarPrepoliza"></asp:TextBox>
|
||||
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default input-sm" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEEFechaCancelacion" runat="server" TargetControlID="TxtFechaCancelacion" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioCancelacion" runat="server" TargetControlID="TxtFechaCancelacion" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
<asp:CompareValidator ID="CVFechaCancelacion" runat="server" ControlToValidate="TxtFechaCancelacion" Display="None" Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpCancelarPrepoliza" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Cancelación''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)."></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha2Cancelacion" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaCancelacion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtFechaCancelacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpCancelarPrepoliza"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnCancelar" OnClick="BtnCancelar_Click" runat="server" CssClass="btn btn-success" Text="Cancelar Movimiento" ValidationGroup="GrpCancelarPrepoliza" />
|
||||
<button type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -78,6 +78,7 @@ Partial Class PopUpAuxiliar
|
||||
Private Sub CargaDatos()
|
||||
GVAuxiliar.Columns(10).Visible = UsuarioActual.TienePermisoProceso(94)
|
||||
'GVAuxiliar.Columns(11).Visible = UsuarioActual.TienePermisoProceso(94)
|
||||
GVAuxiliar.Columns(12).Visible = UsuarioActual.TienePermisoProceso(94)
|
||||
|
||||
Select Case Tipo
|
||||
Case "CxCClientes"
|
||||
@@ -102,6 +103,9 @@ Partial Class PopUpAuxiliar
|
||||
LtlTipo2.Text = "Folio de la Compra"
|
||||
LtlTipo3.Text = "Fecha de la Compra"
|
||||
End Select
|
||||
|
||||
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaAuxiliarClienteCxC(CveCliente As Integer, CveVenta As Integer)
|
||||
@@ -159,6 +163,10 @@ Partial Class PopUpAuxiliar
|
||||
End Sub
|
||||
|
||||
Protected Sub GVAuxiliar_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAuxiliar.RowDataBound
|
||||
|
||||
|
||||
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.BackColor = Drawing.Color.LightGray
|
||||
@@ -171,6 +179,7 @@ Partial Class PopUpAuxiliar
|
||||
e.Row.Cells(6).Visible = False
|
||||
e.Row.Cells(7).Visible = False
|
||||
e.Row.Cells(8).Visible = False
|
||||
e.Row.Cells(12).Visible = False
|
||||
ElseIf e.Row.RowIndex = 1 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(95)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(180)
|
||||
@@ -238,6 +247,12 @@ Partial Class PopUpAuxiliar
|
||||
|
||||
Dim TieneError = False
|
||||
|
||||
If Not TieneError Then
|
||||
If Not Conta.UpdatePrePolizasDetalleBloquear(ClavePrePoliza, False) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not Conta.RemovePrePolizas(ClavePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||
TieneError = True
|
||||
End If
|
||||
@@ -257,6 +272,7 @@ Partial Class PopUpAuxiliar
|
||||
If Not ObjContPaq.RemovePoliza(IdPoliza) Then
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -351,4 +367,61 @@ Partial Class PopUpAuxiliar
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Property CvePrePolizaNegativa As Integer
|
||||
Get
|
||||
If ViewState("CvePrePolizaNegativa") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CvePrePolizaNegativa").ToString.ToEntero
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CvePrePolizaNegativa") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Private Sub AgregaPolizaNegativo(CvePrePoliza As Integer)
|
||||
|
||||
Dim ObjContabilidad As New ClsContabilidad
|
||||
Dim TieneError As Boolean = False
|
||||
ObjContabilidad.IniciaTransacSQL()
|
||||
|
||||
If ObjContabilidad.AddPrePolizasNegativa(CvePrePoliza, UsuarioActual.CveUsuario, TxtConceptoCancelacion.Text, UsuarioActual.CveEmpresa, TxtFechaCancelacion.Text.ToDate) Then
|
||||
Alert("Se agrego polzia negativa correctamente.")
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If TieneError Then
|
||||
ObjContabilidad.RollBack()
|
||||
Else
|
||||
ObjContabilidad.Commit()
|
||||
RegistraScript(" $('#DivCancelar').modal('hide'); ")
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
ObjContabilidad.Dispose()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnCancelar_Click(sender As Object, e As EventArgs)
|
||||
AgregaPolizaNegativo(CvePrePolizaNegativa)
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub imgCancelar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).BindingContainer, GridViewRow)
|
||||
CvePrePolizaNegativa = GvRow.DataKey("CvePrePoliza").ToString.ToEntero
|
||||
|
||||
RegistraScript(" $('#DivCancelar').modal('show'); ")
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
BIN
Empresas/137/Formatos/RepClientesCxC.rpt
Normal file
BIN
Empresas/137/Formatos/RepClientesCxC.rpt
Normal file
Binary file not shown.
5555
Empresas/143/Formatos/Remision.rdlc
Normal file
5555
Empresas/143/Formatos/Remision.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -33,6 +33,7 @@
|
||||
<RightBorder>
|
||||
<Style>None</Style>
|
||||
</RightBorder>
|
||||
<BackgroundColor>LightGrey</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
@@ -47,19 +48,19 @@
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>2.71123cm</Width>
|
||||
<Width>2.36727cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.71123cm</Width>
|
||||
<Width>2.63186cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.71123cm</Width>
|
||||
<Width>2.55248cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.71123cm</Width>
|
||||
<Width>2.12915cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.71123cm</Width>
|
||||
<Width>2.49956cm</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
@@ -77,13 +78,15 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!Cantidad.Value</Value>
|
||||
<Style>
|
||||
<FontWeight>=IIF(Fields!GPO.Value.Equals("Total"),"Bold","Normal")</FontWeight>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=IIF(Fields!Orden.Value.Equals(""),"Bold","Normal")</FontWeight>
|
||||
<Format>#.##</Format>
|
||||
<Color>=IIF(Fields!Orden.Value = "","White","Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
@@ -92,6 +95,7 @@
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=IIF(Fields!Orden.Value = "","CornflowerBlue","Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
@@ -111,12 +115,16 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!SubTotal.Value</Value>
|
||||
<Style>
|
||||
<FontWeight>=IIF(Fields!GPO.Value.Equals("Total"),"Bold","Normal")</FontWeight>
|
||||
<Format>#,0.00;(#,0.00)</Format>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=IIF(Fields!Orden.Value.Equals(""),"Bold","Normal")</FontWeight>
|
||||
<Format>#,0.00</Format>
|
||||
<Color>=IIF(Fields!Orden.Value = "","White","Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>SubTotal</rd:DefaultName>
|
||||
@@ -124,6 +132,7 @@
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=IIF(Fields!Orden.Value = "","CornflowerBlue","Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
@@ -143,12 +152,16 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!Descuento.Value</Value>
|
||||
<Style>
|
||||
<FontWeight>=IIF(Fields!GPO.Value.Equals("Total"),"Bold","Normal")</FontWeight>
|
||||
<Format>#,0.00;(#,0.00)</Format>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=IIF(Fields!Orden.Value.Equals(""),"Bold","Normal")</FontWeight>
|
||||
<Format>#,0.00</Format>
|
||||
<Color>=IIF(Fields!Orden.Value = "","White","Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Descuento</rd:DefaultName>
|
||||
@@ -156,6 +169,7 @@
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=IIF(Fields!Orden.Value = "","CornflowerBlue","Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
@@ -175,12 +189,16 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!IVA.Value</Value>
|
||||
<Style>
|
||||
<FontWeight>=IIF(Fields!GPO.Value.Equals("Total"),"Bold","Normal")</FontWeight>
|
||||
<Format>#,0.00;(#,0.00)</Format>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=IIF(Fields!Orden.Value.Equals(""),"Bold","Normal")</FontWeight>
|
||||
<Format>#,0.00</Format>
|
||||
<Color>=IIF(Fields!Orden.Value = "","White","Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>IVA</rd:DefaultName>
|
||||
@@ -188,6 +206,7 @@
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=IIF(Fields!Orden.Value = "","CornflowerBlue","Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
@@ -207,12 +226,16 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!Total.Value</Value>
|
||||
<Style>
|
||||
<FontWeight>=IIF(Fields!GPO.Value.Equals("Total"),"Bold","Normal")</FontWeight>
|
||||
<Format>#,0.00;(#,0.00)</Format>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=IIF(Fields!Orden.Value.Equals(""),"Bold","Normal")</FontWeight>
|
||||
<Format>#,0.00</Format>
|
||||
<Color>=IIF(Fields!Orden.Value = "","White","Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Total</rd:DefaultName>
|
||||
@@ -220,6 +243,7 @@
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=IIF(Fields!Orden.Value = "","CornflowerBlue","Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
@@ -260,6 +284,7 @@
|
||||
<Color>DimGray</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<BackgroundColor>LightGrey</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
@@ -295,6 +320,7 @@
|
||||
<Color>DimGray</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<BackgroundColor>LightGrey</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
@@ -330,6 +356,7 @@
|
||||
<Color>DimGray</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<BackgroundColor>LightGrey</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
@@ -365,6 +392,7 @@
|
||||
<Color>DimGray</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<BackgroundColor>LightGrey</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
@@ -400,6 +428,7 @@
|
||||
<Color>DimGray</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<BackgroundColor>LightGrey</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
@@ -419,13 +448,8 @@
|
||||
<GroupExpression>=Fields!GPO.Value</GroupExpression>
|
||||
</GroupExpressions>
|
||||
</Group>
|
||||
<SortExpressions>
|
||||
<SortExpression>
|
||||
<Value>=Fields!GPO.Value</Value>
|
||||
</SortExpression>
|
||||
</SortExpressions>
|
||||
<TablixHeader>
|
||||
<Size>5.42245cm</Size>
|
||||
<Size>6.79828cm</Size>
|
||||
<CellContents>
|
||||
<Textbox Name="GPO">
|
||||
<CanGrow>true</CanGrow>
|
||||
@@ -436,7 +460,9 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!GPO.Value</Value>
|
||||
<Style>
|
||||
<FontWeight>=IIF(Fields!GPO.Value.Equals("Total"),"Bold","Normal")</FontWeight>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=IIF(Fields!Orden.Value.Equals(""),"Bold","Normal")</FontWeight>
|
||||
<Color>=IIF(Fields!Orden.Value = "","White","Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -448,6 +474,7 @@
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>=IIF(Fields!Orden.Value = "","CornflowerBlue","Transparent")</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
@@ -893,6 +920,10 @@
|
||||
<DataField>Total</DataField>
|
||||
<rd:TypeName>System.Double</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Orden">
|
||||
<DataField>Orden</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
</Fields>
|
||||
<rd:DataSetInfo>
|
||||
<rd:DataSetName>DataSet</rd:DataSetName>
|
||||
|
||||
@@ -1524,20 +1524,28 @@ Partial Class General_SaldosIniciales
|
||||
Dim ObjMovimientos As New ClsInventarios
|
||||
ObjMovimientos.IniciaTransacSQL()
|
||||
Dim OcurrioError As Boolean = False
|
||||
Dim contadorMovimientos As Integer = 0
|
||||
Dim listadoMovimientos As String = ""
|
||||
Try
|
||||
For Each almacenSinRepetir As DataRow In dt.FiltraParametros("", DistinctColumns:={"Almacen"}).Rows
|
||||
Dim almacenActual As String = almacenSinRepetir("Almacen").ToString
|
||||
Dim CveAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"Almacen = '{almacenActual}'").ToEntero
|
||||
Dim movimientoCabecera As Integer = ObjMovimientos.AddMovimiento(CveAlmacen, 1, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1)
|
||||
listadoMovimientos += $"movimiento con folio <a href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={movimientoCabecera}' target='_blank' style='color:blue'>{ObjMovimientos.Folio}</a><br/>"
|
||||
If CveAlmacen > 0 Then
|
||||
contadorMovimientos += 1
|
||||
For Each nuevaEntrada As DataRow In dt.FiltraParametros($"Almacen = '{almacenActual}'").Rows
|
||||
Dim CvePS As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePS", $"Codigo = '{nuevaEntrada("CodigoPS")}'").ToEntero
|
||||
Dim CveUM As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $"Codigo = '{nuevaEntrada("CodigoPS")}'").ToEntero
|
||||
If CvePS > 0 Then
|
||||
Dim Cantidad As Decimal = nuevaEntrada("Existencia").ToString.ToDecimal
|
||||
Dim Valor As Decimal = nuevaEntrada("Valor").ToString.ToDecimal
|
||||
If CveUM > 0 Then
|
||||
Dim Cantidad As Decimal = nuevaEntrada("Existencia").ToString.ToDecimal
|
||||
Dim Valor As Decimal = nuevaEntrada("Valor").ToString.ToDecimal
|
||||
|
||||
If Not ObjMovimientos.AddMovimientoDetalle(movimientoCabecera, Cantidad, CveUM, CvePS, (Valor / Cantidad), -1, -1) Then
|
||||
If Not ObjMovimientos.AddMovimientoDetalle(movimientoCabecera, Cantidad, CveUM, CvePS, (Valor / Cantidad), -1, -1) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
Else
|
||||
@@ -1559,7 +1567,7 @@ Partial Class General_SaldosIniciales
|
||||
|
||||
If Not OcurrioError Then
|
||||
ObjMovimientos.Commit()
|
||||
Alert("Se cargó correctamente #movimientos")
|
||||
Alert($"Se cargaron correctamente {contadorMovimientos} movimientos<br/><br/>{listadoMovimientos}")
|
||||
Else
|
||||
Alert("Ocurrió un error al cargar las existencias", TipoMensaje.MsgError)
|
||||
ObjMovimientos.RollBack()
|
||||
|
||||
@@ -244,6 +244,14 @@ Partial Class Inventarios_EntradasSalidas
|
||||
ViewState("Tipo") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CvePrePoliza As Integer
|
||||
Get
|
||||
Return CType(ViewState("CvePrePoliza"), Integer)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CvePrePoliza") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
@@ -256,6 +264,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
EstatusAlmacenCompra = -1
|
||||
EsConsumoInterno = False
|
||||
EsNuevoMov = False
|
||||
CvePrePoliza = -1
|
||||
|
||||
CreaDT()
|
||||
CargaCombos()
|
||||
@@ -579,6 +588,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
If DtMov.Rows(0)("CvePrePoliza").ToString.ToEntero > 0 Then
|
||||
HplPrePoliza.Visible = True
|
||||
HplPrePoliza.NavigateUrl = String.Format("/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}", DtMov.Rows(0)("CvePrePoliza"))
|
||||
CvePrePoliza = DtMov.Rows(0)("CvePrePoliza").ToString.ToEntero
|
||||
Else
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
BtnGeneraPrepoliza.Visible = True
|
||||
@@ -1035,14 +1045,10 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Private Sub BtnRemove_Click(sender As Object, e As EventArgs) Handles BtnRemove.Click
|
||||
Dim Borrar As Boolean = False
|
||||
If Not TxtDescripcion.Text = "" Then
|
||||
Dim ObjGral As New ClsGenerales
|
||||
ObjGral.IniciaTransacSQL()
|
||||
If ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, TxtDescripcion.Text, "Inventarios", TxtFolio.Text + " / " + DdlConcepto.SelectedItem.Text) Then
|
||||
Borrar = True
|
||||
End If
|
||||
|
||||
Dim Inv As New ClsInventarios
|
||||
Inv.IniciaTransacSQL()
|
||||
Dim Conta As New ClsContabilidad(Inv.IniciaTransacSQL())
|
||||
Dim ObjGral As New ClsGenerales(Inv.IniciaTransacSQL())
|
||||
|
||||
Dim TieneError = False
|
||||
|
||||
@@ -1052,6 +1058,9 @@ Partial Class Inventarios_EntradasSalidas
|
||||
ObjConta.IniciaTransacSQL()
|
||||
End If
|
||||
|
||||
If ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, TxtDescripcion.Text, "Inventarios", TxtFolio.Text + " / " + DdlConcepto.SelectedItem.Text) Then
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If Inv.MovimientoRemove(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
If HdnIdPoliza.Value.ToEntero > 0 Then
|
||||
@@ -1063,10 +1072,15 @@ Partial Class Inventarios_EntradasSalidas
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
If Not Conta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
If ObjConta IsNot Nothing Then ObjConta.Commit()
|
||||
Inv.Commit()
|
||||
ObjGral.Commit()
|
||||
|
||||
Alert("Movimientos Eliminado", TipoMensaje.MsgInformacion)
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "divDescripcion"))
|
||||
@@ -1074,7 +1088,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Else
|
||||
If ObjConta IsNot Nothing Then ObjConta.RollBack()
|
||||
Inv.RollBack()
|
||||
ObjGral.RollBack()
|
||||
|
||||
Alert("Ocurrió un error al eliminar el movimiento. Por favor vuelva a intetar.", TipoMensaje.MsgError)
|
||||
End If
|
||||
@@ -1083,6 +1096,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
If ObjConta IsNot Nothing Then ObjConta.Dispose()
|
||||
Inv.Dispose()
|
||||
ObjGral.Dispose()
|
||||
Conta.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -633,7 +633,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs) Handles BtnEliminar.Click
|
||||
Dim Inv As New ClsInventarios
|
||||
Inv.IniciaTransacSQL()
|
||||
Dim Conta As New ClsContabilidad(Inv.IniciaTransacSQL())
|
||||
|
||||
Dim TieneError = False
|
||||
|
||||
@@ -654,6 +654,12 @@ Partial Class Inventarios_RecepcionUsados
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
'If Not TieneError Then
|
||||
' If Not Conta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
|
||||
' TieneError = True
|
||||
' End If
|
||||
'End If
|
||||
|
||||
If Not TieneError Then
|
||||
If ObjConta IsNot Nothing Then ObjConta.Commit()
|
||||
Inv.Commit()
|
||||
@@ -670,6 +676,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
If ObjConta IsNot Nothing Then ObjConta.Dispose()
|
||||
Inv.Dispose()
|
||||
Conta.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -291,17 +291,17 @@ Partial Class RepNotasSinAlmacen
|
||||
If UsuarioActual.TienePermisoProceso(278) Then
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
Dim CveCompraDetalle As Integer = GvRow.DataKey("CveCompraDetalle")
|
||||
Dim CveCompra As Integer = GvRow.DataKey("CveCompra")
|
||||
Dim CvePS As Integer = GvRow.DataKey("CveCompra")
|
||||
Dim CveCompraDetalle As Integer = GvRow.DataKey("CveCompraDetalle").ToEntero()
|
||||
Dim CveCompra As Integer = GvRow.DataKey("CveCompra").ToEntero()
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero()
|
||||
|
||||
Dim PS = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("PSCodigo", $"CvePS = {CvePS}")
|
||||
|
||||
Dim ObjCompras As New ClsCompras
|
||||
Dim ObjEventos As New ClsOIEventos
|
||||
If ObjCompras.UpdateEstatusAlmacenDetalle(CveCompraDetalle, 1) Then
|
||||
If ObjEventos.AddEventoBitacora(String.Format("Se cambio el estatus de almacen del producto/servicio: {0} a 'No Recibir'", PS), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=CveCompra) Then
|
||||
Alert("El producto se desmarco correctamente.")
|
||||
If ObjEventos.AddEventoBitacora(String.Format("El producto: {0} se marcó como no recibido", PS), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=CveCompra) Then
|
||||
Alert("El producto se marcó como 'no recibido' correctamente.")
|
||||
End If
|
||||
End If
|
||||
ObjCompras.Dispose()
|
||||
|
||||
@@ -476,8 +476,8 @@ Partial Class Ventas_RepProductosServicios
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("FechaInicio", FechaI.ToShortDateString))
|
||||
params.Add(New ReportParameter("FechaFin", FechaF.ToShortDateString))
|
||||
params.Add(New ReportParameter("FechaInicio", If(txtFechaI.Text <> "", FechaI.ToShortDateString, "")))
|
||||
params.Add(New ReportParameter("FechaFin", If(txtFechaF.Text <> "", FechaF.ToShortDateString, "")))
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
|
||||
@@ -2781,6 +2781,9 @@ Partial Class Ventas
|
||||
|
||||
If DrContrato("CveSucursalCliente").ToString.ToEntero > 0 Then
|
||||
DdlSucursalCliente.SelectedValueExist(DrContrato("CveSucursalCliente"))
|
||||
DdlSucursalCliente_SelectedIndexChanged(DdlSucursalCliente, EventArgs.Empty)
|
||||
DdlSucursalCliente.Enabled = False
|
||||
DdlSucursalCliente.Attributes.Add("disabled", "")
|
||||
End If
|
||||
|
||||
Dim CveAlmacenDestino As Integer = DrContrato("CveAlmacenDestino").ToString.ToEntero
|
||||
@@ -14609,6 +14612,12 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorMovimiento Then
|
||||
If Not ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
|
||||
ErrorMovimiento = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorMovimiento Then
|
||||
Alert("La póliza ha sido desvinculada y eliminada con éxito.", TipoMensaje.MsgInformacion)
|
||||
ObjAC.Commit()
|
||||
@@ -14906,9 +14915,9 @@ Partial Class Ventas
|
||||
Try
|
||||
'If ValorInventario <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ValorInventario, ObjFactura.SerieFolio, 69, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
'End If
|
||||
Catch ex As Exception
|
||||
OcurrioError = True
|
||||
|
||||
Reference in New Issue
Block a user