-- E119, que no se pueda refacturar cuando no se ha surtido
-- pesta;a de contabilidad -- subproyecto seleccionado en base al principal
This commit is contained in:
@@ -3016,53 +3016,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</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="RequiredFieldValidator13" 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="Button2" OnClick="BtnCancelarAux_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>
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
</ajax:TabContainer>
|
</ajax:TabContainer>
|
||||||
|
|||||||
@@ -1710,30 +1710,30 @@ Partial Class Ventas
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "AuxiliarConta"
|
'#Region "AuxiliarConta"
|
||||||
Property CvePrePolizaNegativa As Integer
|
' Property CvePrePolizaNegativa As Integer
|
||||||
Get
|
' Get
|
||||||
If ViewState("CvePrePolizaNegativa") Is Nothing Then
|
' If ViewState("CvePrePolizaNegativa") Is Nothing Then
|
||||||
Return -1
|
' Return -1
|
||||||
Else
|
' Else
|
||||||
Return ViewState("CvePrePolizaNegativa").ToString.ToEntero
|
' Return ViewState("CvePrePolizaNegativa").ToString.ToEntero
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
End Get
|
' End Get
|
||||||
Set(value As Integer)
|
' Set(value As Integer)
|
||||||
ViewState("CvePrePolizaNegativa") = value
|
' ViewState("CvePrePolizaNegativa") = value
|
||||||
End Set
|
' End Set
|
||||||
End Property
|
' End Property
|
||||||
|
|
||||||
Private Property DTDatos As DataTable
|
' Private Property DTDatos As DataTable
|
||||||
Get
|
' Get
|
||||||
Return CType(ViewState("DTDatos"), DataTable)
|
' Return CType(ViewState("DTDatos"), DataTable)
|
||||||
End Get
|
' End Get
|
||||||
Set(value As DataTable)
|
' Set(value As DataTable)
|
||||||
ViewState("DTDatos") = value
|
' ViewState("DTDatos") = value
|
||||||
End Set
|
' End Set
|
||||||
End Property
|
' End Property
|
||||||
#End Region
|
'#End Region
|
||||||
|
|
||||||
#Region " A C U M U L A D O R E S"
|
#Region " A C U M U L A D O R E S"
|
||||||
|
|
||||||
@@ -2477,7 +2477,9 @@ Partial Class Ventas
|
|||||||
CargaFletes()
|
CargaFletes()
|
||||||
|
|
||||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyectoHeader, LblSubProyecto, AplicaTodos:="")
|
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyectoHeader, LblSubProyecto, AplicaTodos:="")
|
||||||
|
DdlSubProyecto.SelectedValueExist(DdlSubProyectoDatos.SelectedValue)
|
||||||
CargarCentrosDeCosto(DdlProyectoPyME, DdlSubProyectoPyME, LblProyectoPyME, LblSubProyectoPyME, AplicaTodos:="")
|
CargarCentrosDeCosto(DdlProyectoPyME, DdlSubProyectoPyME, LblProyectoPyME, LblSubProyectoPyME, AplicaTodos:="")
|
||||||
|
DdlProyectoPyME.SelectedValueExist(DdlSubProyectoDatos.SelectedValue)
|
||||||
BrSubProyecto.Visible = DdlProyecto.Visible
|
BrSubProyecto.Visible = DdlProyecto.Visible
|
||||||
divProyectoPyME.Visible = DdlProyecto.Visible
|
divProyectoPyME.Visible = DdlProyecto.Visible
|
||||||
|
|
||||||
@@ -4078,6 +4080,8 @@ Partial Class Ventas
|
|||||||
DdlSubProyectoDatos.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlSubProyectoDatos.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
End If
|
End If
|
||||||
DdlSubProyectoDatos.SelectedValueExistInsert(DbRowVenta("CveSubProyecto").ToString(), DbRowVenta("SubProyecto").ToString())
|
DdlSubProyectoDatos.SelectedValueExistInsert(DbRowVenta("CveSubProyecto").ToString(), DbRowVenta("SubProyecto").ToString())
|
||||||
|
DdlSubProyecto.SelectedValueExist(DbRowVenta("CveSubProyecto").ToString())
|
||||||
|
|
||||||
CargarAlmacenes()
|
CargarAlmacenes()
|
||||||
|
|
||||||
If DdlSubProyectoCobranza.Items.Count = 0 Then
|
If DdlSubProyectoCobranza.Items.Count = 0 Then
|
||||||
@@ -18708,6 +18712,11 @@ Partial Class Ventas
|
|||||||
If ObjInv.GetInv_Mov(CveVenta, UsuarioActual.CveEmpresa) Then
|
If ObjInv.GetInv_Mov(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjInv.DtResultados.Rows.Count > 0 Then
|
If ObjInv.DtResultados.Rows.Count > 0 Then
|
||||||
CargaGVInv(ObjInv.DtResultados)
|
CargaGVInv(ObjInv.DtResultados)
|
||||||
|
Else
|
||||||
|
'si es la empresa 119, Candado, no permiter refacturar, si no se ha surtido, para que cancele la factura mejor.
|
||||||
|
If UsuarioActual.CveEmpresa = 119 AndAlso LkRefacturacion.Visible AndAlso ObjInv.DtResultados.Rows.Count = 0 Then
|
||||||
|
LkRefacturacion.Visible = False
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ObjInv.Dispose()
|
ObjInv.Dispose()
|
||||||
@@ -26165,7 +26174,7 @@ Partial Class Ventas
|
|||||||
Private Sub CargaAuxiliarClienteCxC(CveCliente As Integer, CveVenta As Integer)
|
Private Sub CargaAuxiliarClienteCxC(CveCliente As Integer, CveVenta As Integer)
|
||||||
Dim ObjMovtos As New ClsMovimientos()
|
Dim ObjMovtos As New ClsMovimientos()
|
||||||
If ObjMovtos.GetCxCClienteAuxiliar(CveCliente, CveVenta) Then
|
If ObjMovtos.GetCxCClienteAuxiliar(CveCliente, CveVenta) Then
|
||||||
DTDatos = ObjMovtos.DtResultados
|
' DTDatos = ObjMovtos.DtResultados
|
||||||
GVAuxiliar.DataSource = ObjMovtos.DtResultados
|
GVAuxiliar.DataSource = ObjMovtos.DtResultados
|
||||||
Else
|
Else
|
||||||
GVAuxiliar.DataSource = Nothing
|
GVAuxiliar.DataSource = Nothing
|
||||||
@@ -26174,48 +26183,48 @@ Partial Class Ventas
|
|||||||
GVAuxiliar.DataBind()
|
GVAuxiliar.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub BtnCancelarAux_Click(sender As Object, e As EventArgs)
|
''Protected Sub BtnCancelarAux_Click(sender As Object, e As EventArgs)
|
||||||
AgregaPolizaNegativo(CvePrePolizaNegativa)
|
'' 'AgregaPolizaNegativo(CvePrePolizaNegativa)
|
||||||
End Sub
|
''End Sub
|
||||||
|
|
||||||
Private Sub AgregaPolizaNegativo(CvePrePoliza As Integer)
|
''Private Sub AgregaPolizaNegativo(CvePrePoliza As Integer)
|
||||||
|
|
||||||
Dim ObjContabilidad As New ClsContabilidad
|
'' Dim ObjContabilidad As New ClsContabilidad
|
||||||
Dim TieneError As Boolean = False
|
'' Dim TieneError As Boolean = False
|
||||||
ObjContabilidad.IniciaTransacSQL()
|
'' ObjContabilidad.IniciaTransacSQL()
|
||||||
|
|
||||||
Dim CvePrePolizaNueva As Integer = ObjContabilidad.AddPrePolizasNegativa(CvePrePoliza, UsuarioActual.CveUsuario, TxtConceptoCancelacion.Text, UsuarioActual.CveEmpresa, TxtFechaCancelacion.Text.ToDate)
|
'' Dim CvePrePolizaNueva As Integer = ObjContabilidad.AddPrePolizasNegativa(CvePrePoliza, UsuarioActual.CveUsuario, TxtConceptoCancelacion.Text, UsuarioActual.CveEmpresa, TxtFechaCancelacion.Text.ToDate)
|
||||||
|
|
||||||
If Not CvePrePolizaNueva > 0 Then
|
'' If Not CvePrePolizaNueva > 0 Then
|
||||||
|
|
||||||
|
|
||||||
TieneError = True
|
'' TieneError = True
|
||||||
End If
|
'' End If
|
||||||
|
|
||||||
If Not TieneError Then
|
'' If Not TieneError Then
|
||||||
|
|
||||||
ObjContabilidad.Commit()
|
'' ObjContabilidad.Commit()
|
||||||
Dim Str As New StringBuilder
|
'' Dim Str As New StringBuilder
|
||||||
Str.Append("Se agrego la póliza de cancelación correctamente.<br/>")
|
'' Str.Append("Se agrego la póliza de cancelación correctamente.<br/>")
|
||||||
RegistraScript(" $('#DivCancelar').modal('hide'); ")
|
'' RegistraScript(" $('#DivCancelar').modal('hide'); ")
|
||||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
'' If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||||
If ObjContabilidad.ContabilizarPrePoliza(CvePrePolizaNueva, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
'' If ObjContabilidad.ContabilizarPrePoliza(CvePrePolizaNueva, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||||
Str.AppendFormat("<a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' target='_blank' class='Texto'>Ver Poliza</a>", ObjContabilidad.ContaIdPoliza)
|
'' Str.AppendFormat("<a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' target='_blank' class='Texto'>Ver Poliza</a>", ObjContabilidad.ContaIdPoliza)
|
||||||
|
|
||||||
End If
|
'' End If
|
||||||
End If
|
'' End If
|
||||||
Alert(Str.ToString)
|
'' Alert(Str.ToString)
|
||||||
Else
|
'' Else
|
||||||
ObjContabilidad.RollBack()
|
'' ObjContabilidad.RollBack()
|
||||||
|
|
||||||
End If
|
'' End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ObjContabilidad.Dispose()
|
'' ObjContabilidad.Dispose()
|
||||||
CargarSaldoAuxiliar(CveCliente)
|
'' CargarSaldoAuxiliar(CveCliente)
|
||||||
|
|
||||||
End Sub
|
''End Sub
|
||||||
|
|
||||||
Protected Sub GVAuxiliar_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAuxiliar.RowDataBound
|
Protected Sub GVAuxiliar_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAuxiliar.RowDataBound
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user