This commit is contained in:
HECTOR RODRIGUEZ
2021-05-18 02:14:15 -07:00
parent a62940ac3a
commit 6078eb9855
17 changed files with 1239 additions and 1189 deletions

View File

@@ -458,7 +458,8 @@ Partial Class AF_CatAF
Dim params As New List(Of ReportParameter)
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\CatAF.rdlc", UsuarioActual.Empresa.Ruta))
Dim Ruta As String = ""
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
@@ -468,7 +469,13 @@ Partial Class AF_CatAF
Else
params.Add(New ReportParameter("LogoPath", ""))
End If
ImprimirPDF(String.Format("{0}Formatos\CatAF.rdlc", UsuarioActual.Empresa.Ruta), DtActivosFijos, params, "CatalogoActivosFijos", Formato:=Formato)
If Archivo.Exists Then
Ruta = UsuarioActual.Empresa.Ruta & "Formatos/CatAF.rdlc"
Else
Ruta = "Empresas/Grales/Formatos/CatAF.rdlc"
End If
ImprimirPDF(Ruta, DtActivosFijos, params, "CatalogoActivosFijos", Formato:=Formato)
Else
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)

View File

@@ -2445,7 +2445,7 @@ Public Class ClsContabilidad
End Function
Public Function UpdateConta_PlantillasPolizasDetalle(CveConcepto As Integer, TipoMovto As Integer, IdCtaContable As Integer, Orden As Integer,
CvePlantillaPolizaDetalle As Integer, CveSubProyecto As Integer, CveProveedor As Integer,
Optional CvePersonal As Integer = -1, Optional PorcentajeImpuesto As Decimal = 0) As Boolean
Optional CvePersonal As Integer = -1, Optional PorcentajeImpuesto As Decimal = 0, Optional CveCuenta As Integer = -1) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_Conta_PlantillasPolizasDetalleUpdate")
@@ -2460,6 +2460,8 @@ Public Class ClsContabilidad
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
.Add("@PorcentajeImpuesto", SqlDbType.SmallMoney).Value = PorcentajeImpuesto
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
End With
Try

View File

@@ -41,7 +41,7 @@
<label class="col-md-1 truncate" style="width: 40px;">F.I.:</label>
<div class="col-md-2">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important;">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding-top: 0px;">
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="80px"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
@@ -56,7 +56,7 @@
<label class="col-md-1 truncate" style="width: 40px;">F.F.:</label>
<div class="col-md-2">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 140px !important;">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 140px !important; padding-top: 0px;">
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="80px"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
@@ -110,7 +110,7 @@
</div>
<div class="col-md-3" runat="server" style="text-align: left;">
<div class="col-md-1" >
<label style="width:70px;">Fecha:</label>
<label style="width:70px; padding-top:5px;">Fecha:</label>
</div>
<div class="col-md-1" >
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="padding-top: 0; width: 140px !important;">
@@ -137,27 +137,26 @@
</div>
</div>
<div class="row">
<div class="col-md-2" runat="server" id="DivFaltante">
<asp:CheckBox ID="ChkFaltante" runat="server" Text="Faltante/Sobrante"/>
</div>
<div class="col-md-2" id="DivComision" style="display: none">
<label>Importe:</label>
<asp:TextBox runat="server" ID="TxtComision" Class=" input-sm " Width="75px"></asp:TextBox>
<div class="col-md-1 truncate" runat="server" id="DivFaltante" style ="width: 145px;" >
<asp:CheckBox ID="ChkFaltante" runat="server" Text="Faltante/Sobrante" />
</div>
<div class="col-md-10" id="DivComision" style="display: none;">
<div class="col-md-2" >
<label>Importe:</label>
<asp:TextBox runat="server" ID="TxtComision" Class=" input-sm " Width="75px"></asp:TextBox>
</div>
<div class="col-md-3" style="display: none" id="divSubProyecto">
<label class="col-md-1 truncate" style="width: 110px; display: none" id="LblSubproyecto" >SubProyecto:</label>
<asp:DropDownList ID="DdlSubProyectoDeposito" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
</asp:DropDownList>
<div class="col-md-3">
<label>SubProyecto:</label>
<asp:DropDownList ID="DdlSubProyectoDeposito" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
</asp:DropDownList>
</div>
<div class="col-md-5" style="display: none" id="divClasificacion">
<label class="col-md-1 truncate" style="width: 110px;" id="LblClasificacion">Clasificación:</label>
<asp:DropDownList ID="DdlClasificacion" AutoPostBack="false" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
</asp:DropDownList>
<div class="col-md-5">
<label>Clasificación:</label>
<asp:DropDownList ID="DdlClasificacion" AutoPostBack="false" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
</asp:DropDownList>
</div>
</div>
@@ -165,36 +164,36 @@
</div>
<div class="row" >
<div class="col-md-2" runat="server" id="Div1">
<div class="col-md-1" runat="server" id="Div1" style ="width: 145px">
<asp:CheckBox ID="ChkDescuento" runat="server" Text="Descuento"/>
</div>
<div class="col-md-2" id="DivDescuento" style="display: none">
<label>Importe:</label>
<asp:TextBox runat="server" ID="TxtDescuento" Class=" input-sm " Width="75px"></asp:TextBox>
</div>
<div class="col-md-10" id="DivDescuento" style="display: none">
<div class="col-md-2">
<label>Importe:</label>
<asp:TextBox runat="server" ID="TxtDescuento" Class=" input-sm " Width="75px"></asp:TextBox>
</div>
<div class="col-md-3" style="display: none" id="divSubProyectoDescuento">
<label class="col-md-1 truncate" style="width: 110px; display: none" id="LblSubproyectoDescuento" >SubProyecto:</label>
<asp:DropDownList ID="DdlSubProyectoDescuento" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
</asp:DropDownList>
<div class="col-md-3" >
<label>SubProyecto:</label>
<asp:DropDownList ID="DdlSubProyectoDescuento" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
</asp:DropDownList>
</div>
<div class="col-md-5" style="display: none" id="divClasificacionDescuento">
<label class="col-md-1 truncate" style="width: 110px;" id="LblClasificacionDescuento">Clasificación:</label>
<asp:DropDownList ID="DdlClasificacionDescuento" AutoPostBack="false" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
</asp:DropDownList>
<div class="col-md-5">
<label>Clasificación:</label>
<asp:DropDownList ID="DdlClasificacionDescuento" AutoPostBack="false" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
</asp:DropDownList>
</div>
</div>
</div>
<div class="row">
<div class="col-md-1" runat="server" id="Div2">
<div class="col-md-1" runat="server" id="Div2" style ="width: 145px">
<asp:CheckBox ID="ChkIntermediario" runat="server" Text="Intermediario"/>
</div>
<div class="col-md-11" id="DivInter" style="display: none">
<div class="col-md-10" id="DivInter" style="display: none">
<div class="col-md-2" id="dd">
<asp:Dropdownlist ID="DdlProveedorIntermediario" CssClassDdl="select2me" Width="100px" CssStyle="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" runat="server"></asp:Dropdownlist>
</div>
@@ -483,35 +482,17 @@
function CheckFaltante(chk) {
if (chk.checked == true) {
$('#DivComision').css("display", "block");
$('#LblSubproyecto').css("display", "block");
$('#divSubProyecto').css("display", "block");
$('#LblClasificacion').css("display", "block");
$('#divClasificacion').css("display", "block");
} else {
$('#DivComision').css("display", "none");
$('#LblSubproyecto').css("display", "none");
$('#divSubProyecto').css("display", "none");
$('#LblClasificacion').css("display", "none");
$('#divClasificacion').css("display", "none");
}
}
function CheckDescuento(chk) {
if (chk.checked == true) {
$('#DivDescuento').css("display", "block");
$('#LblSubproyectoDescuento').css("display", "block");
$('#divSubProyectoDescuento').css("display", "block");
$('#LblClasificacionDescuento').css("display", "block");
$('#divClasificacionDescuento').css("display", "block");
} else {
$('#DivDescuento').css("display", "none");
$('#LblSubproyectoDescuento').css("display", "none");
$('#divSubProyectoDescuento').css("display", "none");
$('#LblClasificacionDescuento').css("display", "none");
$('#divClasificacionDescuento').css("display", "none");
}
}

View File

@@ -1556,7 +1556,39 @@
</div>
</div>
</div>
<div id="DModalDesconciliar" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpDesconciliar" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content">
<div class="modal-header ">
<h4 class="modal-title">
<asp:Literal ID="LtlDesconciliar" Text="Desconciliar" runat="server"> </asp:Literal></h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-2" style="text-align: left">Fecha Desconciliado:</div>
<div class="col-md-2">
<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="TxtFechaDesconciliado" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaDesconciliado" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MeeFechaDesconciliado" runat="server" TargetControlID="TxtFechaDesconciliado" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CeFechaDesconciliado" TargetControlID="TxtFechaDesconciliado" PopupButtonID="LnkFechaDesconciliado" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RfvFechaDesconciliado" runat="server" ControlToValidate="TxtFechaDesconciliado" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Desconciliado''</b> es necesario, por favor ingréselo." ValidationGroup="VGMModalDesconciliado"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VceFechaDesconciliado" runat="server" HighlightCssClass="vco" TargetControlID="RfvFechaDesconciliado"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<asp:Button ID="BtnDesconciliar" OnClick="BtnDesconciliar_Click" runat="server" Text="Desconciliar" CssClass="btn btn-primary" ValidationGroup="VGMModalDesconciliado" />
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</asp:Content>

View File

@@ -179,10 +179,19 @@ Partial Class Bancos_IE
ViewState("FechaCompra") = value
End Set
End Property
Private Property CveIECancelacion As Integer
Get
If ViewState("CveIECancelacion") Is Nothing Then
Return -1
Else
Return ViewState("CveIECancelacion").ToString().ToEntero()
End If
End Get
Set(value As Integer)
ViewState("CveIECancelacion") = value
End Set
End Property
Private Property ImporteOriginalDevDin As Decimal
Get
@@ -1002,9 +1011,6 @@ Partial Class Bancos_IE
Select Case ObjIE.CveEstatusIE
Case 1
If Not ObjIE.FueConciliado Then
'If UsuarioActual.TienePermisoProceso(85) Then ImgCancelarMovimiento.Visible = True
If UsuarioActual.TienePermisoProceso(85) Then LnkCancelar.Visible = True
'ELIMINAR IE SIN VALIDACIONES
If UsuarioActual.TienePermisoProceso(80) AndAlso NumComplementos = 0 Then LnkEliminar.Visible = True
@@ -1014,6 +1020,8 @@ Partial Class Bancos_IE
End If
End If
If UsuarioActual.TienePermisoProceso(85) Then LnkCancelar.Visible = True
''COMENTAR - solo para pruebas
'If UsuarioActual.TienePermisoProceso(85) Then LnkCancelar.Visible = True
'If UsuarioActual.TienePermisoProceso(80) Then LnkEliminar.Visible = True
@@ -1134,6 +1142,7 @@ Partial Class Bancos_IE
LbMovimientoCancelado.Text = "Movimiento de Cancelación:"
HLIECancelacion.NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", ObjIE.CveIECancelacion)
HLIECancelacion.Text = ObjIE.FolioIECancelacion
CveIECancelacion = ObjIE.CveIECancelacion
End If
'MOVIMIENTO CANCELADO
@@ -1233,7 +1242,7 @@ Partial Class Bancos_IE
End If
LnkEliminar.Visible = False
LnkCancelar.Visible = False
'LnkCancelar.Visible = False
LnkCancelarComplemento.Visible = True
LnkCancelarComplementoImporte.Visible = True
@@ -1243,7 +1252,7 @@ Partial Class Bancos_IE
Else
BtnEditar.Visible = False
LnkEliminar.Visible = False
'LnkEliminar.Visible = False
LnkCancelarComplemento.Visible = False
LnkCancelarComplementoImporte.Visible = False
DVGenerarComplementoModal.Visible = False
@@ -4753,7 +4762,11 @@ Partial Class Bancos_IE
End Sub
Protected Sub LnkEliminar_Click(sender As Object, e As EventArgs) Handles LnkEliminar.Click
RegistraScript(String.Format("$('#{0}').modal('show');", "divDescripcion"))
If CveIECancelacion > 0 Then
Alert("El Movimiento no se puede eliminar porque tiene una cancelación relacionada, se tiene que eliminar primero la cancelación", TipoMensaje.MsgAdvertencia)
Else
RegistraScript(String.Format("$('#{0}').modal('show');", "divDescripcion"))
End If
End Sub
#End Region
@@ -5990,11 +6003,36 @@ Partial Class Bancos_IE
Protected Sub LnkCancelar_Click(sender As Object, e As EventArgs)
If ChkConciliado.Checked Then
Alert("El documento seleccionado no se puede eliminar porque se encuentra conciliado.", TipoMensaje.MsgError)
Exit Sub
TxtFechaDesconciliado.Text = Now.ToShortDateString
UpDesconciliar.Update()
RegistraScript("$('#DModalDesconciliar').modal()")
End If
RegistraScript("ShowDivCancelarIE();")
End Sub
Protected Sub BtnDesconciliar_Click(sender As Object, e As EventArgs)
Dim ObjBancos As New ClsBancos
Dim ObjOI As New ClsOIEventos(ObjBancos.IniciaTransacSQL())
Dim ErrorTrans As Boolean = False
If ObjBancos.DesconciliarIE(CveIE, TxtFechaDesconciliado.Text.ToDate(), UsuarioActual.CveUsuario) Then
If Not ObjOI.AddEventoBitacora("El pago ha sido desconciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIE) Then
ErrorTrans = True
End If
Else
ErrorTrans = True
End If
If Not ErrorTrans Then
ObjBancos.Commit()
Alert("Desconciliado correctamente")
RegistraScript("$('#DModalDesconciliar').modal('hide')")
Else
ObjBancos.RollBack()
End If
ObjBancos.Dispose()
ObjOI.Dispose()
End Sub
Private Sub LnkEmitirComplemento_Click(sender As Object, e As EventArgs) Handles LnkEmitirComplemento.Click
GeneraTimbre()

View File

@@ -748,7 +748,7 @@
<div class="btn-group">
<asp:UpdatePanel ID="UpAddCotizacion" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:HyperLink ID="HplAgregarCotizacion" Visible="true" Target="_blank" runat="server" data-toggle="tooltip" title="Agregar Cotizacion" class="btn btn-circle btn-sm btn-default"><i class="fa fa-plus"></i></asp:HyperLink>
<asp:HyperLink ID="HplAgregarCotizacion" Visible="true" Target="_blank" runat="server" data-toggle="tooltip" title="Agregar Cotización" class="btn btn-circle btn-sm btn-default"><i class="fa fa-plus"></i></asp:HyperLink>
</ContentTemplate>
</asp:UpdatePanel>
</div>

View File

@@ -345,10 +345,6 @@ Partial Class Contabilidad_FiltraPolizas
Alert(PolizasSinComprobante, TipoMensaje.MsgAdvertencia)
Else
MergePdfFiles(Pathpdf.ToArray)
If File.Exists(pathPoliza) Then
Directory.Delete(String.Format("{0}/{1}", AppDomain.CurrentDomain.BaseDirectory, Tick), True)
End If
End If
Else
Alert("No hay polizas seleccionadas para imprimir", TipoMensaje.MsgAdvertencia)
@@ -358,6 +354,11 @@ Partial Class Contabilidad_FiltraPolizas
Else
Alert("No hay informacion cargada", TipoMensaje.MsgAdvertencia)
End If
If File.Exists(pathPoliza) Then
Directory.Delete(String.Format("{0}/{1}", AppDomain.CurrentDomain.BaseDirectory, Tick), True)
End If
Catch ex As Exception
Alert("Error al descargar el paquete", TipoMensaje.MsgError)
If File.Exists(pathPoliza) Then

View File

@@ -160,7 +160,7 @@
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePlantillaPolizaDetalle, TipoMovimiento, CveSubProyecto, CveProveedor, CvePersonal, CveConcepto, IdCtaContable, Orden,PorcentajeImpuesto" EmptyDataText="No se encontraron Plantilla de Pólizas Registradas" ToolTip="Listado de Plantilla de Pólizas" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePlantillaPolizaDetalle, TipoMovimiento, CveSubProyecto, CveProveedor, CvePersonal, CveConcepto, IdCtaContable, Orden,PorcentajeImpuesto, CveCuenta" EmptyDataText="No se encontraron Plantilla de Pólizas Registradas" ToolTip="Listado de Plantilla de Pólizas" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Concepto Contable">
<ItemTemplate>
@@ -176,7 +176,7 @@
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Cuenta Contable">
<ItemTemplate>
&nbsp;<asp:Literal ID="LtlCtaContable" runat="server" Text='<%# Eval("NombreCuenta", "{0}") %>'>></asp:Literal>
&nbsp;<asp:Literal ID="LtlCtaContable" runat="server" Text='<%# Eval("NombreCuenta") %>'>></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
@@ -268,25 +268,24 @@
<div class="form-group form-md-line-input input-iconright">
<asp:Label ID="LblCuenta" runat="server" Text=""></asp:Label>
<asp:DropDownList ID="DdlCtaContable" CssClass="form-control input-sm select2me js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
<label for="<%= DdlCtaContable.ClientID.ToString()%>">Cuenta Contable:</label>
<asp:DropDownList ID="DdlCuentas" CssClass="form-control input-sm select2me js-cuenta-programmatic" runat="server" Visible="false" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
<label for="<%= DdlCtaContable.ClientID.ToString()%>">Cuenta Contable:</label>
<asp:DropDownList ID="DdlCuentas" CssClass="form-control input-sm select2me js-cuenta-programmatic" runat="server" Visible="false" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
<label for="<%= DdlCtaContable.ClientID.ToString()%>">Cuenta Contable:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DDLSubProyecto" CssClass="form-control input-sm select2me js-subproyecto-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DDLSubProyecto" CssClass="form-control input-sm select2me js-subproyecto-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
<label for="<%= DDLSubProyecto.ClientID.ToString()%>">SubProyecto:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DDLProveedor" CssClass="form-control input-sm select2me js-referencia-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
<asp:DropDownList ID="DDLProveedor" CssClass="form-control input-sm select2me js-referencia-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
<label ID="LblProveedor" runat="server" for="<%= DDLProveedor.ClientID.ToString()%>">Razón Social:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtOrden" CssClass="form-control " runat="server" MaxLength="4" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="TxtOrden" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Orden''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>
<label for="<%= TxtOrden.ClientID.ToString()%>">Orden:</label>
<label for="<%= TxtOrden.ClientID.ToString()%>">Orden:</label>
</div>
<div class="form-group form-md-line-input input-iconright">

View File

@@ -141,7 +141,7 @@ Partial Class Contabilidad_PlantillasPolizasDetalle
DdlCtaContable.Items.Insert(0, New ListItem("Seleccione", "-1"))
If UsuarioActual.Empresa.TipoContabilizacion = 2 Then
If UsuarioActual.Empresa.TipoContabilizacion = 2 Or UsuarioActual.Empresa.TipoContabilidad = 1 Then
Dim Conta As New ClsContabilidad
Dim dtt As New DataTable
@@ -248,12 +248,13 @@ Partial Class Contabilidad_PlantillasPolizasDetalle
Dim Row As DataRow
Dim ErrorActualizar = False
Dim ErrorDetalle = False
Dim Cuenta As Integer = -1
If HdnModalidad.Value = "I" Then
If CvePlantillaPoliza > 0 Then
If ObjPlantillaPolizaDetalle.AddConta_PlantillasPolizasDetalles(CvePlantillaPoliza, DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, TxtOrden.Text.Trim.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlPorcentajeImpuesto.SelectedValue.ToDecimal,
CveCuenta:=DdlCuentas.SelectedValue.ToEntero) Then
If ObjPlantillaPolizaDetalle.AddConta_PlantillasPolizasDetalles(CvePlantillaPoliza, DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedItem.ToEntero, TxtOrden.Text.Trim.ToEntero,
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
DdlPorcentajeImpuesto.SelectedValue.ToDecimal, CveCuenta:=DdlCuentas.SelectedValue.ToEntero) Then
TxtOrden.Text = ""
If Not ChkSeguirAgregando.Checked Then
updatatos()
@@ -289,8 +290,9 @@ CveCuenta:=DdlCuentas.SelectedValue.ToEntero) Then
Else
If HdnID.Value.ToEntero <> -1 Then
If CvePlantillaPoliza > 0 Then
If ObjPlantillaPolizaDetalle.UpdateConta_PlantillasPolizasDetalle(DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, TxtOrden.Text.Trim.ToEntero,
HdnID.Value.ToEntero, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlPorcentajeImpuesto.SelectedValue.ToDecimal) Then
If ObjPlantillaPolizaDetalle.UpdateConta_PlantillasPolizasDetalle(DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedItem.ToEntero, TxtOrden.Text.Trim.ToEntero,
HdnID.Value.ToEntero, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
DdlPorcentajeImpuesto.SelectedValue.ToDecimal, CveCuenta:=DdlCuentas.SelectedValue.ToEntero) Then
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
updatatos()
Else
@@ -328,8 +330,11 @@ CveCuenta:=DdlCuentas.SelectedValue.ToEntero) Then
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim Cuenta As Integer = e.Row.DataKey("IdCtaContable").ToString.ToEntero
e.Row.FCLiteral("LtlCtaContable").Text = DTCuentasContables.FiltroPrimeroValor("Nombre", $"Id = {Cuenta}")
If UsuarioActual.Empresa.TipoContabilidad <> 1 Then
Dim Cuenta As Integer = e.Row.DataKey("IdCtaContable").ToString.ToEntero
e.Row.FCLiteral("LtlCtaContable").Text = DTCuentasContables.FiltroPrimeroValor("Nombre", $"Id = {Cuenta}")
End If
End If
End Sub
@@ -438,6 +443,7 @@ CveCuenta:=DdlCuentas.SelectedValue.ToEntero) Then
DdlConcepto.SelectedValueExist(GvRow.DataKey("CveConcepto"))
DdlTipoMovimiento.SelectedValueExist(IIf(GvRow.DataKey("TipoMovimiento") = "Abono", 1, 0).ToString)
DdlCtaContable.SelectedValueExist(GvRow.DataKey("IdCtaContable"))
DdlCuentas.SelectedValueExist(GvRow.DataKey("CveCuenta"))
DDLSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto"))
TxtOrden.Text = GvRow.DataKey("Orden")
LbAgregar.Text = "Actualizar"

View File

@@ -1861,14 +1861,12 @@ Partial Class ContabilidadC_RegPrePoliza
End If
Next
MergePdfFiles(Pathpdf.ToArray)
If File.Exists(pathPoliza) Then
Directory.Delete(String.Format("{0}/{1}", AppDomain.CurrentDomain.BaseDirectory, Tick), True)
End If
Else
Alert("No se tiene cargado comprobante de pago", TipoMensaje.MsgAdvertencia)
End If
If File.Exists(pathPoliza) Then
Directory.Delete(String.Format("{0}/{1}", AppDomain.CurrentDomain.BaseDirectory, Tick), True)
End If
Catch ex As Exception
Alert("Error al descargar el paquete", TipoMensaje.MsgError)
If File.Exists(pathPoliza) Then

View File

@@ -1880,7 +1880,7 @@ Partial Class ContabilidadC_RegPrePolizaS
' Conexion As Odbc.OdbcConnection = Nothing
Dim ErrorArchivo = False
Dim ErrorExcel = False
DdlPlantilla.SelectedValue = DdlPlantilla2.SelectedValue
dt = ReadExcelFile(Ruta + FileName, True)
@@ -1922,35 +1922,21 @@ Partial Class ContabilidadC_RegPrePolizaS
If Not ErrorArchivo Then
DtMovimientos.Clear()
Dim ObjConta As New ClsContabilidad()
ObjConta.IniciaTransacSQL()
Try
Dim TieneError As Boolean = False
Dim ContadorUpdate As Integer = 0
Dim ContadorError As Integer = 0
Dim NombreCuenta As String = ""
Dim CvePrePoliza As Integer = 0
Dim Cuenta As String = ""
Dim Reporte As New StringBuilder
Dim TotalCargos As Integer = 0
Dim TotalAbonos As Integer = 0
CvePrePoliza = ObjConta.AddPrePolizas("Contabilidad/RegPrePolizaExcel", DdlPlantilla2.SelectedValue.ToEntero, TotalCargos, TotalAbonos, 1, TxtFecha.Text.ToDate, DdlPlantilla2.SelectedItem.Text.ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=DdlTipoPolizaAdd.SelectedValue.ToEntero)
For Each Row As DataRow In dt.Rows
NombreCuenta = Row("NombreCuenta").ToString
Cuenta = Row("Cuenta").ToString
Dim Importe As Decimal = If(Row("Cargo").ToString.ToDecimal <> 0, Row("Cargo").ToString.ToDecimal, Row("Abono").ToString.ToDecimal)
Dim Concepto As String = Row("Concepto").ToString
Dim Referencia As String = Row("Referencia").ToString
Dim CveCuenta As Integer = -1
Dim NombreCuenta As String = Row("NombreCuenta").ToString
Dim Cuenta As String = Row("Cuenta").ToString
Dim ConceptoAdministrativo As String = Row("ConceptoAdministrativo").ToString
Dim CveSubProyecto As Integer = Row("CveSubProyecto").ToString.ToEntero
Dim TipoMovto As Boolean = If(Row("Cargo").ToString.ToDecimal <> 0, False, True)
Dim YaExiste As Boolean = False
Dim CveConceptoContable As Integer = Row("CveConceptoContable").ToString.ToEntero
Dim IdCtaContable As Integer = Row("IdCtaContable").ToString.ToEntero
Dim CveClasificacion As Integer = -1
@@ -1963,56 +1949,44 @@ Partial Class ContabilidadC_RegPrePolizaS
If CveSubProyecto = 0 Then CveSubProyecto = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", String.Format("SubProyecto = '{0}'", Row("SubProyecto"))).ToEntero
Dim dr As DataRow = DtMovimientos.NewRow
Dim CodigoCuenta As String = ""
dr("IdCuenta") = IdCtaContable
dr("CodigoCuenta") = Cuenta & "<br>" & NombreCuenta
dr("Cuenta") = ConceptoAdministrativo
dr("Referencia") = Row("Referencia").ToString
dr("Concepto") = Row("Concepto").ToString
dr("TipoMovto") = TipoMovto
dr("EsComodin") = 0
dr("CveConcepto") = CveConceptoContable
dr("CveConceptoContable") = CveConceptoContable
dr("ConceptoContable") = ""
dr("Cargo") = Row("Cargo").ToString.ToDecimal
dr("Abono") = Row("Abono").ToString.ToDecimal
dr("Descripcion") = ""
dr("CveSubProyecto") = CveSubProyecto
dr("CveProveedor") = -1
dr("CveCompra") = -1
dr("CvePersonal") = -1
dr("CveClasificacion") = CveClasificacion
dr("CveCliente") = -1
dr("CveVenta") = -1
If Importe <> 0 Then
If ObjConta.GetCuentas(-1, Cuenta.Replace("-", ""), 1, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjConta.DtResultados().FiltroPrimeroValor("CveCuenta").ToEntero
'TipoCuenta = ObjConta.DtResultados().FiltroPrimeroValor("Tipo")
Else
Reporte.AppendLine($"{Cuenta} - {NombreCuenta} - {Importe} </br>")
TieneError = True
YaExiste = True
End If
Else
TieneError = True
Exit For
End If
If YaExiste = False Then
If CveCuenta > 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, "", CveConceptoContable, Concepto, Now.ToDate, IdCtaContable, -1, ImporteMX:=Importe, CveSubProyecto:=CveSubProyecto, CveClasificacion:=CveClasificacion, CveCuenta:=CveCuenta) Then
TieneError = True
Exit For
End If
Else
CveCuenta = -2
End If
End If
End If
TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDouble + TxtAbono.Text.ToDouble).ToString.FormatoNumero
TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDouble + TxtCargo.Text.ToDouble).ToString.FormatoNumero
DtMovimientos.Rows.Add(dr)
DtMovimientos.AcceptChanges()
Next
If Not TieneError Then
ObjConta.Commit()
Alert(String.Format("<br/><br/>Prepóliza: <b><a href = ""/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CvePrePoliza, "Ver"))
Alert($"Se agregó la póliza {ObjConta.ContaFolio}")
Else
Alert($"No encontraron las siguientes cuentas: {Reporte.ToString} ", TipoMensaje.MsgError)
ObjConta.RollBack()
End If
GvMov.DataSource = DtMovimientos
GvMov.DataBind()
UPMovs.Update()
Catch ex As Exception
ObjConta.RollBack()
Alert("No se pudo cargar el excel")
End Try
ObjConta.Dispose()
End If
End Sub
#End Region

File diff suppressed because it is too large Load Diff

View File

@@ -35,7 +35,7 @@
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="EstatusSiguiente" HeaderText="Estatus siguiente" />
<asp:BoundField DataField="TipoTerminoDesc" HeaderText="Tipo Termino" />
<asp:BoundField DataField="TipoTerminoDesc" HeaderText="Tipo Término" />
<asp:BoundField DataField="Cancelable" HeaderText="Cancelable" />
<asp:TemplateField>
<HeaderTemplate>Estatus</HeaderTemplate>
@@ -628,7 +628,7 @@
<asp:ListItem Text="Es Autorizado" Value="1"></asp:ListItem>
<asp:ListItem Text="Es Rechazado" Value="2"></asp:ListItem>
</asp:DropDownList>
<label for="<%= DdlTipoTermino.ClientID.ToString()%>">Tipo Termino:</label>
<label for="<%= DdlTipoTermino.ClientID.ToString()%>">Tipo Término:</label>
</div>
<div class="form-group form-md-line-input input-iconright" id="DivCancelable" runat="server" visible="false">

View File

@@ -1241,7 +1241,7 @@
<div class="col-md-6" style="text-align: right!important">
<asp:HyperLink ID="hplCargarCotExcel" Font-Size="13" CssClass="Texto" NavigateUrl="#" data-toggle="modal" data-target="#DivCargaExcelCotizaciones" runat="server" Text="<i class='fa fa-file-excel-o'></i>&nbsp; Cargar Cotización"></asp:HyperLink>
&nbsp;&nbsp;
<asp:HyperLink ID="hplAgregarCotizacion" Font-Size="13" CssClass="Texto thickbox" runat="server" Text="<i class='fa fa-plus'></i>&nbsp;Agregar Cotizacion" Style="cursor: pointer;" ToolTip="Agregar Cotizacion"></asp:HyperLink>
<asp:HyperLink ID="hplAgregarCotizacion" Font-Size="13" CssClass="Texto thickbox" runat="server" Text="<i class='fa fa-plus'></i>&nbsp;Agregar Cotización" Style="cursor: pointer;" ToolTip="Agregar Cotización"></asp:HyperLink>
&nbsp;&nbsp;
<asp:HyperLink ID="hplEnviarCorreo" Font-Size="13" CssClass="Texto thickbox" runat="server" Text="<i class='fa fa-envelope'></i>&nbsp;Enviar cotización por correo" Style="cursor: pointer;" ToolTip="Enviar cotización por correo"></asp:HyperLink>
</div>
@@ -1254,7 +1254,7 @@
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:HyperLink ID="HplFolio" CssClass="Texto thickbox" runat="server" Text='<%# Eval("Folio")%>' Style="cursor: pointer;" ToolTip="Ver Cotizacion" NavigateUrl='<%# String.Format("/OC/RepCotizacionesDetalle.aspx?CveOrdenCompra={0}&CveCotizacion={1}&TB_iframe=true&height=370&width=600;", Eval("CveOrdenCompra"), Eval("CveCotizacion"))%>'></asp:HyperLink>
<asp:HyperLink ID="HplFolio" CssClass="Texto thickbox" runat="server" Text='<%# Eval("Folio")%>' Style="cursor: pointer;" ToolTip="Ver Cotización" NavigateUrl='<%# String.Format("/OC/RepCotizacionesDetalle.aspx?CveOrdenCompra={0}&CveCotizacion={1}&TB_iframe=true&height=370&width=600;", Eval("CveOrdenCompra"), Eval("CveCotizacion"))%>'></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Folio" HeaderText="Folio"></asp:BoundField>

View File

@@ -85,7 +85,7 @@
</tr>
<tr>
<td colspan="4" align="right">
<asp:HyperLink ID="HplAgregar" CssClass="Texto thickbox" runat="server" Text="Agregar Cotizacion" Style="cursor: pointer;" ToolTip="Agregar Cotizacion" Visible="False">Agregar Cotización</asp:HyperLink>
<asp:HyperLink ID="HplAgregar" CssClass="Texto thickbox" runat="server" Text="Agregar Cotización" Style="cursor: pointer;" ToolTip="Agregar Cotización" Visible="False">Agregar Cotización</asp:HyperLink>
</td>
</tr>
<tr>

View File

@@ -163,11 +163,12 @@
<asp:DropDownList ID="DdlSubProyectos" runat="server" CssClass="form-control input-sm select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
</asp:DropDownList>
</div>
<div class="colf-3">
<label>Estatus</label>
<label class="colf-1">Estatus</label>
<div class="colf-2">
<asp:DropDownList ID="DdlEstatus" runat="server" CssClass="form-control input-sm " DataTextField="Estatus" DataValueField="CveEstatus" Style="width: 95px; height: 30px; display: inline-block;">
</asp:DropDownList>
</div>
</div>
</div>
</div>

View File

@@ -240,6 +240,10 @@