Merge branch 'master' of http://agonzalez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1005,13 +1005,13 @@ Public Class ClsContratos
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function AddContratosAvance(CveContratoDetalle As Integer, Cantidad As Double, Fecha As DateTime, CveUsuario As Integer, Optional CveEstimacion As Integer = -1) As Boolean
|
||||
Public Function AddContratosAvance(CveContratoDetalle As Integer, Cantidad As Double, Fecha As Date, CveUsuario As Integer, Optional CveEstimacion As Integer = -1) As Boolean
|
||||
Dim Retorno = False
|
||||
DataAdapter("PA_Con_ContratosAvanceAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle
|
||||
.Add("@Cantidad", SqlDbType.Int).Value = Cantidad
|
||||
.Add("@Fecha", SqlDbType.Date).Value = Fecha.ToString("yyyy/MM/dd")
|
||||
.Add("@Fecha", SqlDbType.Date).Value = Fecha
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEstimacion", SqlDbType.Int).Value = CveEstimacion
|
||||
End With
|
||||
@@ -1078,9 +1078,32 @@ Public Class ClsContratos
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "ESTIMACION"
|
||||
|
||||
Public Function GetContratosAvanceEstimacion(CveContrato As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Con_ContratosAvanceEstimacionGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al cargar los avances del Contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " S E C C I O N E S "
|
||||
Public Function GetSecciones() As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -5259,13 +5259,13 @@ Public Class ClsInventarios
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function DeleteMovimientosProyectados(TipoMovto As Integer) As Boolean
|
||||
Public Function DeleteMovimientosProyectados(TipoMovto As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("Inv_MovimientosProyectadosDelete")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@TipoMovto", SqlDbType.TinyInt).Value = TipoMovto
|
||||
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -17669,7 +17669,7 @@ Partial Class Compras_Compras
|
||||
ViewState("IVAPS") = Drr("IVA").ToString().ToDouble()
|
||||
DdlProyecto.SelectedValueExist(Drr("CveProyecto"))
|
||||
|
||||
'DdlIVA.Enabled = True
|
||||
DdlIVA.Enabled = True
|
||||
|
||||
If Not Modalidad = "U" Then
|
||||
|
||||
@@ -17989,13 +17989,13 @@ Partial Class Compras_Compras
|
||||
Row("IEPSPSPorcentaje") = PorcentajeIEPS
|
||||
Else
|
||||
'If DdlIVA.SelectedValue.ToDouble = 0 Then Row("IVA") = 0 Else Row("IVA") = Math.Round(IVA * Total, DecimalesPermitidos)
|
||||
Row("IVA") = Math.Round(IVA * Total, DecimalesPermitidos)
|
||||
Row("IVA") = Math.Round(IVA * Total, 2)
|
||||
Row("IVAPorcentaje") = IVA
|
||||
Row("RetIVA") = Math.Round(RetIVA * Total, DecimalesPermitidos)
|
||||
Row("RetIVA") = Math.Round(RetIVA * Total, 2)
|
||||
Row("RetIVAPorcentaje") = RetIVA
|
||||
Row("RetISR") = Math.Round(RetISR * Total, DecimalesPermitidos)
|
||||
Row("RetISR") = Math.Round(RetISR * Total, 2)
|
||||
Row("RetISRPorcentaje") = RetISR
|
||||
Row("IEPSPS") = Math.Round(IEPSPS * Total, DecimalesPermitidos)
|
||||
Row("IEPSPS") = Math.Round(IEPSPS * Total, 2)
|
||||
Row("IEPSPSPorcentaje") = IEPSPS
|
||||
End If
|
||||
Row("ImporteConImpuestos") = (Row("Cantidad").ToString.ToDouble * Row("PU").ToString.ToDouble) + Row("IVA").ToString.ToDouble + Row("IEPSPS").ToString.ToDouble - (Row("RetIVA").ToString.ToDouble + Row("RetISR").ToString.ToDouble)
|
||||
@@ -18133,9 +18133,9 @@ Partial Class Compras_Compras
|
||||
Dim IEPSPS = (TxtIEPSModal.Text.ToDouble / 100)
|
||||
Dim IEPSPSIVA = 0
|
||||
|
||||
If Not (CveCompra > 0 Or CveFactura > 0 Or OCVinculada) Then
|
||||
'If DdlIVA.SelectedValue.ToDouble = 0 Then DrPS("IVA") = 0 Else DrPS("IVA") = IVA * Total
|
||||
DrPS("IVA") = IVA * Total
|
||||
'If Not (CveCompra > 0 Or CveFactura > 0 Or OCVinculada) Then
|
||||
'If DdlIVA.SelectedValue.ToDouble = 0 Then DrPS("IVA") = 0 Else DrPS("IVA") = IVA * Total
|
||||
DrPS("IVA") = IVA * Total
|
||||
DrPS("IVAPorcentaje") = IVA
|
||||
DrPS("RetIVA") = RetIVA * Total
|
||||
DrPS("RetIVAPorcentaje") = RetIVA
|
||||
@@ -18146,9 +18146,9 @@ Partial Class Compras_Compras
|
||||
DrPS("IEPSPSIVA") = IEPSPSIVA * Total
|
||||
DrPS("IEPSPSIVAPorcentaje") = IEPSPSIVA
|
||||
AplicaCalculaTotales = True
|
||||
End If
|
||||
'End If
|
||||
|
||||
TmpDT.AcceptChanges()
|
||||
TmpDT.AcceptChanges()
|
||||
|
||||
AddPS2(AplicaCalculaTotales)
|
||||
CargaGvInv()
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<asp:TemplateField HeaderText="Importe" ItemStyle-Width="125px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTotal" runat="server" Text='<%# String.Format("{0} {1}", Eval("Total", "{0:N2}"), Eval("Abreviatura")) %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
@@ -555,7 +555,7 @@
|
||||
<hr style="border: 0; height: 1px; background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));" />
|
||||
|
||||
<asp:GridView ID="GVPDocumentosRelacionadosPagos" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD mysmallbtn"
|
||||
DataKeyNames="CveFactura,CveCompra,CveIE,Fecha,FechaPago"
|
||||
DataKeyNames="CveFactura,CveCompra,CveIE,Fecha,FechaPago,ImpPagado,CvePrePolizaDetalle"
|
||||
data-sort="true" Width="100%" EmptyDataText="No se encontró registros con la información del complemento de pago"
|
||||
ShowHeaderWhenEmpty="true" AutoGenerateColumns="False">
|
||||
<Columns>
|
||||
|
||||
@@ -2697,17 +2697,36 @@ Partial Class Compras_eFacturas
|
||||
|
||||
namespaces.AddNamespace(XMLDoc.DocumentElement.Prefix, "http://www.sat.gob.mx/cfd/3")
|
||||
namespaces.AddNamespace("tfd", "http://www.sat.gob.mx/TimbreFiscalDigital")
|
||||
namespaces.AddNamespace("pago10", "http://www.sat.gob.mx/Pagos")
|
||||
|
||||
' namespaces.AddNamespace("pago10", "http://www.sat.gob.mx/Pagos")
|
||||
nodeComp = XMLDoc.SelectSingleNode(String.Format("//{0}:Complemento", XMLDoc.DocumentElement.Prefix), namespaces)
|
||||
|
||||
|
||||
nodeaGral = XMLDoc.SelectSingleNode(String.Format("//{0}:Comprobante", XMLDoc.DocumentElement.Prefix), namespaces)
|
||||
|
||||
nodeTFD = nodeComp.SelectSingleNode(String.Format("//{0}:TimbreFiscalDigital", "tfd"), namespaces)
|
||||
nodePagos = nodeComp.SelectSingleNode(String.Format("//{0}:Pagos/{0}:Pago", "pago10"), namespaces)
|
||||
nodePagos2 = nodeComp.SelectSingleNode(String.Format("//{0}:Pagos", "pago10"), namespaces)
|
||||
'Monto = ValorXML(nodePagos, "Monto").ToDecimal
|
||||
|
||||
Dim nodePago As XmlNodeList = nodePagos.SelectNodes(String.Format("//{0}:DoctoRelacionado", "pago10"), namespaces)
|
||||
Dim PrefijoPagos As String = ""
|
||||
|
||||
For Each nodoPrefijo As XmlNode In nodeComp.ChildNodes
|
||||
If nodoPrefijo.Prefix <> "tfd" Then
|
||||
PrefijoPagos = nodoPrefijo.Prefix
|
||||
End If
|
||||
Next
|
||||
|
||||
namespaces.AddNamespace(PrefijoPagos, "http://www.sat.gob.mx/Pagos")
|
||||
nodeComp = XMLDoc.SelectSingleNode(String.Format("//{0}:Complemento", XMLDoc.DocumentElement.Prefix), namespaces)
|
||||
|
||||
|
||||
nodePagos = nodeComp.SelectSingleNode(String.Format("//{0}:Pagos/{0}:Pago", PrefijoPagos), namespaces)
|
||||
nodePagos2 = nodeComp.SelectSingleNode(String.Format("//{0}:Pagos", PrefijoPagos), namespaces)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
' Dim nodePago As XmlNodeList = nodePagos.SelectNodes(String.Format("//{0}:DoctoRelacionado", "pago10"), namespaces)
|
||||
|
||||
SeriePago = ValorXML(nodeaGral, "Serie")
|
||||
FolioPago = ValorXML(nodeaGral, "Folio")
|
||||
@@ -2735,11 +2754,12 @@ Partial Class Compras_eFacturas
|
||||
DTDocumentosRelacionados.Columns.Add("FechaPago", GetType(Date))
|
||||
DTDocumentosRelacionados.Columns.Add("CveMetodoPago", GetType(Integer))
|
||||
DTDocumentosRelacionados.Columns.Add("SerieFolioCompra")
|
||||
DTDocumentosRelacionados.Columns.Add("CvePrePolizaDetalle", GetType(Integer))
|
||||
|
||||
|
||||
|
||||
Dim nodePagosN As XmlNodeList
|
||||
nodePagosN = nodeComp.SelectNodes(String.Format("//{0}:Pagos", "pago10"), namespaces)
|
||||
nodePagosN = nodeComp.SelectNodes(String.Format("//{0}:Pagos", PrefijoPagos), namespaces)
|
||||
|
||||
|
||||
|
||||
@@ -2775,7 +2795,7 @@ Partial Class Compras_eFacturas
|
||||
|
||||
|
||||
Dim ObjCompraFolios As New ClsCompras
|
||||
If ObjCompraFolios.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", ""), UsuarioActual.CveEmpresa, OP:=If(CveComplementoPagoCompra > 0, 2, 1), CveFactura:=CveFacturaComplemento) Then
|
||||
If ObjCompraFolios.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace($"{PrefijoPagos}:", ""), UsuarioActual.CveEmpresa, OP:=If(CveComplementoPagoCompra > 0, 2, 1), CveFactura:=CveFacturaComplemento) Then
|
||||
'
|
||||
'.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", ""), UsuarioActual.CveEmpresa) Then
|
||||
If ObjCompraFolios.DtResultados.Rows.Count > 0 Then
|
||||
@@ -2789,7 +2809,7 @@ Partial Class Compras_eFacturas
|
||||
dRow2("CveFactura") = drow("CveFactura").ToString.ToEntero
|
||||
dRow2("CveMetodoPago") = drow("CveMetodoPago").ToString.ToEntero
|
||||
dRow2("SerieFolioCompra") = drow("SerieFolioCompra").ToString
|
||||
|
||||
dRow2("CvePrePolizaDetalle") = drow("CvePrePolizaDetalle").ToString
|
||||
|
||||
If drow("CveIE").ToString.ToEntero > 0 Then
|
||||
|
||||
@@ -2860,7 +2880,7 @@ Partial Class Compras_eFacturas
|
||||
|
||||
Dim TieneRegistros As Boolean = False
|
||||
|
||||
If ObjCompras.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", ""), UsuarioActual.CveEmpresa) Then
|
||||
If ObjCompras.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", "").Replace("pagos10:", ""), UsuarioActual.CveEmpresa) Then
|
||||
GvVincularPago.DataSource = ObjCompras.DtResultados
|
||||
|
||||
If ObjCompras.DtResultados.Rows.Count > 0 Then
|
||||
@@ -2982,9 +3002,9 @@ Partial Class Compras_eFacturas
|
||||
ObjCompra.IniciaTransacSQL()
|
||||
|
||||
|
||||
For Each Gv As GridViewRow In GvVincularPago.Rows
|
||||
For Each Gv As GridViewRow In GVPDocumentosRelacionadosPagos.Rows
|
||||
|
||||
If Not ObjCompra.AddComplementoPago(Gv.DataKey("CveIE").ToEntero, Gv.DataKey("CveCompra").ToEntero, Gv.DataKey("Monto").ToDecimal, Gv.DataKey("CvePrePolizaDetalle").ToEntero, CveFacturaPago) > 0 Then
|
||||
If Not ObjCompra.AddComplementoPago(Gv.DataKey("CveIE").ToEntero, Gv.DataKey("CveCompra").ToEntero, Gv.DataKey("ImpPagado").ToDecimal, Gv.DataKey("CvePrePolizaDetalle").ToEntero, CveFacturaPago) > 0 Then
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
|
||||
@@ -44,7 +44,13 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPPDatos" runat="server" UpdateMode="Conditional">
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" CssClass="tabBodyOverride" ActiveTabIndex="0">
|
||||
|
||||
<ajax:TabPanel ID="TabAvance" runat="server" HeaderText="Avance">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UPPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
@@ -70,8 +76,15 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1" style="text-align:right!important">
|
||||
Fecha:
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<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="TxtFecha" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
@@ -82,12 +95,21 @@
|
||||
<asp:CompareValidator ID="CVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</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="VCOFecha1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha2" runat="server" HighlightCssClass="vco" TargetControlID="CVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<a class="linkfile" id="btnanexogral" runat="server" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6" style="text-align:right">
|
||||
<a class="linkfile" id="btnanexogral" runat="server" >
|
||||
<span class="btn btn-circle btn-sm btn-success"><i class='fa fa-plus'></i></span>Agregar
|
||||
<asp:TextBox ID="AnexoGral" Text='' runat="server"></asp:TextBox>
|
||||
</a>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<table class="table table-striped Widthall">
|
||||
<tr>
|
||||
<th style="width: 300px;"></th>
|
||||
@@ -107,13 +129,18 @@
|
||||
<th style="text-align: right;">Anexo</th>
|
||||
</tr>
|
||||
</table>
|
||||
<asp:GridView ID="Gv" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas para levantar avance"
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="Gv" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas para levantar avance"
|
||||
DataKeyNames="CveFamilias,CveSubFamilias,CveContratoDetalle,PS,Cantidad,Importe,Cantidad_Ultima,Importe_Ultima,PU,CantidadMax,Avance"
|
||||
CssClass="table GVEstimacion table-advance table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="Producto" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' ></asp:LinkButton>
|
||||
<asp:LinkButton ID="Producto" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' Visible="false" ></asp:LinkButton>
|
||||
<asp:Label ID="LinkButton1" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' ></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
@@ -148,27 +175,217 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText=" ">
|
||||
<ItemTemplate>
|
||||
|
||||
<asp:LinkButton ID="LnkAnexo" runat="server" OnClick="GetAnexos" AlternateText="Agregar Anexo" CssClass="btn btn-circle btn-sm btn-success anexo" Text="<i class='fa fa-folder'></i>" />
|
||||
<a class="btn btn-circle btn-sm btn-success hidden linkfile">
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-circle btn-sm btn-success" ID="LnkModalDropzone" Visible="false"> <i class='fa fa-plus'></i></asp:LinkButton>
|
||||
<%-- <a class="btn btn-circle btn-sm btn-success hidden linkfile">
|
||||
<i class='fa fa-plus'></i><asp:TextBox ID="TXTAnexo" CssClass="hidden" runat="server"></asp:TextBox>
|
||||
</a>
|
||||
</a>--%>
|
||||
|
||||
|
||||
<div runat="server" id="ModalAnexoEvidencia" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Cargar Evidencia</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div style="text-align:left">
|
||||
<asp:TextBox ID="TXTAnexo" CssClass="ADSdropzone hidden" data-maxFile="10" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<div class="text-center"><asp:Button id="BtnGuardar" CssClass="btn btn-primary" runat="server" Text="Guardar" Visible="false" /></div>
|
||||
<asp:GridView ID="GvAnexos" AutoGenerateColumns="false" runat="server" ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron archivos">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Archivo">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HPLArchivo" runat="server"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="text-center">
|
||||
<asp:Button id="BtnGuardar" CssClass="btn btn-primary" runat="server" Text="Guardar" Visible="false" ValidationGroup="GrpGuardar" />
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabEstimación" runat="server" HeaderText="Estimación">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpEstimaciones" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultarEstimaciones" runat="server" Text="Consultar" class="btn btn-default" />
|
||||
</div>
|
||||
|
||||
<div class="titlefiltros caption" style="position: relative;">
|
||||
<asp:UpdatePanel class="row" ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<label class="col-md-1 truncate">Contrato:</label>
|
||||
<div class="col-md-6 col-lg-4">
|
||||
<div class="ddls">
|
||||
<asp:DropDownList ID="DDlContratosEstimaciones" runat="server" AutoPostBack="true" DataTextField="ContratoCompleto" DataValueField="CveContrato" Class=" form-control input-inline select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvEstimaciones" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas para levantar avance"
|
||||
DataKeyNames="CveFamilias,CveSubFamilias,CveContratoDetalle,PS,Cantidad,Importe,Cantidad_Ultima,Importe_Ultima,PU,CantidadMax,Avance"
|
||||
CssClass="table GVEstimacion table-advance table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="Producto" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' Visible="false" ></asp:LinkButton>
|
||||
<asp:Label ID="LinkButton1" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' ></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Cantidad", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Importe", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Cantidad_Ultima", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("Importe_Ultima", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- <asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidad" Text="" CssClass="txtcant" onkeyup="ValidateCant(this)" type="number" step="any" data-cantidad='<%# Eval("CantidadMax")%>' data-pu='<%# Eval("PU")%>' data-cve='<%# Eval("CveContratoDetalle") %>' Width="90" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtImporte" Text="" data-cve='<%# Eval("CveContratoDetalle") %>' CssClass="txtimporte" type="number" step="any" Width="90" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText=" ">
|
||||
<ItemTemplate>
|
||||
|
||||
<asp:LinkButton ID="LnkAnexo" runat="server" OnClick="GetAnexos" AlternateText="Agregar Anexo" CssClass="btn btn-circle btn-sm btn-success anexo" Text="<i class='fa fa-folder'></i>" />
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-circle btn-sm btn-success" ID="LnkModalDropzone" Visible="false"> <i class='fa fa-plus'></i></asp:LinkButton>
|
||||
|
||||
|
||||
|
||||
<div runat="server" id="ModalAnexoEvidencia" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Cargar Evidencia</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div style="text-align:left">
|
||||
<asp:TextBox ID="TXTAnexo" CssClass="ADSdropzone hidden" data-maxFile="10" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="text-center">
|
||||
|
||||
<asp:Button id="BtnGuardarEstimacion" CssClass="btn btn-primary" runat="server" Text="Generar Estimacion" Visible="false"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
</ajax:TabContainer>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="modal fade " id="dropmodal">
|
||||
@@ -178,7 +395,7 @@
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Dropzone</span>
|
||||
<span class="caption-subject bold uppercase">Cargar Evidencia</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
@@ -193,25 +410,86 @@
|
||||
<div id="my-dropzone" class="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="text-align: center!important">
|
||||
<br />
|
||||
<button id="btnCerrarModal" runat="server" type="button" class="btn default" data-dismiss="modal">Cerrar</button>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="ModalAnexos" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<asp:UpdatePanel ID="UpModalAnexos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label runat="server" ID="LblTituloModalAnexo"></asp:Label></h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12" style="text-align:center!important">
|
||||
<asp:GridView ID="GvAnexos" AutoGenerateColumns="false" runat="server" ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron archivos" Width="100"
|
||||
DataKeyNames="Archivo" CssClass="table GVEstimacion table-advance table-hover" GridLines ="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Anexos">
|
||||
<ItemTemplate>
|
||||
|
||||
<asp:LinkButton ID="LnkArchivo" runat="server" OnClick="LnkArchivo_Click"></asp:LinkButton>
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/Metronic/assets/global/plugins/dropzone/dropzone.js"></script>
|
||||
|
||||
<%--<script src="../Scripts/dropzone/dropzone.min.js"></script>--%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" Runat="Server">
|
||||
|
||||
<script>
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
<script>
|
||||
|
||||
$(".linkfile").click(function () {
|
||||
showmodalFile($(this).find('input').attr('id'));
|
||||
jQuery(document).ready(function () {
|
||||
|
||||
$(".linkfile").click(function () {
|
||||
showmodalFile($(this).find('input').attr('id'));
|
||||
});
|
||||
Sys.Application.add_load(function (s, e) {
|
||||
$(".linkfile").click(function () {
|
||||
Sys.Application.add_load(function (s, e) {
|
||||
$(".linkfile").click(function () {
|
||||
showmodalFile($(this).find('input').attr('id'));
|
||||
});
|
||||
});
|
||||
@@ -224,7 +502,8 @@
|
||||
ADDropzone(obj);
|
||||
$('#dropmodal').modal();
|
||||
}
|
||||
function ValidateCant(variable){
|
||||
function ValidateCant(variable) {
|
||||
|
||||
var txt = $(variable);
|
||||
var max = txt.data('cantidad');
|
||||
var value = parseInt(txt.val());
|
||||
@@ -235,16 +514,24 @@
|
||||
txt.val(0);
|
||||
}
|
||||
var importe = $('.txtimporte[data-cve="' + txt.data('cve') + '"]');
|
||||
|
||||
importe.val(parseFloat(txt.val()) * parseFloat(txt.data('pu')));
|
||||
FormatoMoneda2(importe);
|
||||
if (parseInt(txt.val()) > 0) {
|
||||
$($(txt.parent()).parent()).find(".linkfile").removeClass("hidden");
|
||||
} else {
|
||||
var ocultar = $($(txt.parent()).parent()).find(".linkfile");
|
||||
if (!ocultar.hasClass("hidden")) {
|
||||
ocultar.addClass("hidden");
|
||||
}
|
||||
}
|
||||
|
||||
//FormatoMoneda2(importe);
|
||||
|
||||
//if (parseInt(txt.val()) > 0) {
|
||||
|
||||
// $($(txt.parent()).parent()).find(".linkfile").removeClass("hidden");
|
||||
|
||||
//} else {
|
||||
|
||||
// var ocultar = $($(txt.parent()).parent()).find(".linkfile");
|
||||
|
||||
// if (!ocultar.hasClass("hidden")) {
|
||||
// ocultar.addClass("hidden");
|
||||
// }
|
||||
//}
|
||||
|
||||
}
|
||||
//);
|
||||
</script>
|
||||
|
||||
@@ -46,22 +46,31 @@ Partial Class Contratos_ContratoAvance
|
||||
Set(value As String)
|
||||
ViewState("fecha") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If Not IsPostBack Then
|
||||
BtnGuardar.Visible = False
|
||||
btnanexogral.Visible = False
|
||||
CargaContrato()
|
||||
btnanexogral.Visible = False
|
||||
CargaContrato()
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "Filtros"
|
||||
|
||||
Private Sub CargaContrato()
|
||||
DdlContratos.DataSource = GlobalDTContratos.FiltraParametros(String.Format("CveContratoTipo=4"))
|
||||
DdlContratos.DataSource = GlobalDTContratos.FiltraParametros(String.Format($"CveContratoTipo in (4,30,31) AND CveEmpresa = {UsuarioActual.CveEmpresa}"))
|
||||
DdlContratos.DataBind()
|
||||
|
||||
DDlContratosEstimaciones.DataSource = GlobalDTContratos.FiltraParametros(String.Format($"CveContratoTipo in (4,30,31) AND CveEmpresa = {UsuarioActual.CveEmpresa}"))
|
||||
DDlContratosEstimaciones.DataBind()
|
||||
|
||||
|
||||
CargaddlAvance()
|
||||
End Sub
|
||||
|
||||
@@ -124,8 +133,10 @@ Partial Class Contratos_ContratoAvance
|
||||
End Sub
|
||||
Protected Sub GV_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles Gv.RowDataBound
|
||||
If e.Row.RowIndex > -1 Then
|
||||
|
||||
e.Row.FCTextBox("TxtCantidad").Visible = (fecha = "")
|
||||
e.Row.FCLinkButton("LnkAnexo").Visible = Not (fecha = "")
|
||||
e.Row.FCLinkButton("LnkAnexo").Visible = Not (fecha = "")
|
||||
|
||||
If e.Row.DBCampo("CveContratoDetalle").ToString.ToEntero = 0 Then
|
||||
e.Row.FCTextBox("TxtCantidad").Visible = False
|
||||
e.Row.FCLinkButton("LnkAnexo").Visible = False
|
||||
@@ -140,9 +151,32 @@ Partial Class Contratos_ContratoAvance
|
||||
e.Row.CssClass = "SubTotales3"
|
||||
End If
|
||||
End If
|
||||
|
||||
If e.Row.DataKey("CveContratoDetalle").ToEntero > 0 Then
|
||||
|
||||
Dim LnkAnexo As LinkButton = e.Row.FCLinkButton("LnkModalDropzone")
|
||||
'LnkAnexo.Visible = True
|
||||
Dim DVAnexo As Control = DirectCast(e.Row.FindControl("ModalAnexoEvidencia"), Control)
|
||||
LnkAnexo.OnClientClick = $" $('#{DVAnexo.ClientID}').modal('show'); return false;"
|
||||
|
||||
If DdlAvances.SelectedIndex > 0 Then
|
||||
LnkAnexo.Visible = False
|
||||
Else
|
||||
LnkAnexo.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GetAnexos(sender As Object, e As System.EventArgs)
|
||||
Protected Sub GetAnexos(sender As Object, e As System.EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
|
||||
|
||||
LblTituloModalAnexo.Text = "Anexo " & GvRow.DataKey("PS")
|
||||
|
||||
'Get the button that raised the event
|
||||
Dim btn As LinkButton = DirectCast(sender, LinkButton)
|
||||
Dim gvr As GridViewRow = DirectCast(btn.NamingContainer, GridViewRow)
|
||||
@@ -154,22 +188,49 @@ Partial Class Contratos_ContratoAvance
|
||||
GvAnexos.Visible = True
|
||||
Else
|
||||
GvAnexos.Visible = False
|
||||
End If
|
||||
objContrato.Dispose()
|
||||
End If
|
||||
|
||||
objContrato.Dispose()
|
||||
|
||||
UpModalAnexos.Update()
|
||||
|
||||
RegistraScript("$('#ModalAnexos').modal('show');")
|
||||
|
||||
End Sub
|
||||
Protected Sub GvAnexos_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles GvAnexos.RowDataBound
|
||||
Protected Sub GvAnexos_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles GvAnexos.RowDataBound
|
||||
|
||||
If e.Row.RowIndex > -1 Then
|
||||
Dim Archivo As String = e.Row.DBCampo("Archivo").ToString
|
||||
Dim start As Integer = Len(Archivo.Split("-"c)(0))
|
||||
Dim link As HyperLink = e.Row.FCHyperLink("HPLArchivo")
|
||||
link.Text = Archivo.Substring(start + 1)
|
||||
link.NavigateUrl = String.Format("/Empresas/{0}/Contrato/{1}/Anexos/{2}", UsuarioActual.CveEmpresa, CveContrato, Archivo)
|
||||
Dim LnkArchivo As LinkButton = e.Row.FCLinkButton("LnkArchivo")
|
||||
|
||||
LnkArchivo.Text = Archivo.Substring(start + 1)
|
||||
'link.NavigateUrl = String.Format("/Empresas/{0}/Contrato/{1}/Anexos/{2}", UsuarioActual.CveEmpresa, CveContrato, Archivo)
|
||||
|
||||
ScriptManager.GetCurrent(Me).RegisterPostBackControl(LnkArchivo)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkArchivo_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
|
||||
Dim Archivo As String = GvRow.DataKey("Archivo").ToString
|
||||
|
||||
Response.ContentType = "application/octet-stream"
|
||||
Response.AppendHeader("Content-Disposition", $"attachment; filename={Archivo}")
|
||||
Response.TransmitFile($"{UsuarioActual.Empresa.Ruta}\Contrato\{DdlContratos.SelectedValue.ToEntero}\Anexos\{Archivo}")
|
||||
Response.End()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
Dim TieneError = False
|
||||
@@ -177,47 +238,58 @@ Partial Class Contratos_ContratoAvance
|
||||
Dim Cantidad As Double
|
||||
Dim filesgral As List(Of Archivo) = AnexoGral.getfiles().Archivos
|
||||
Dim guardarArchivos As New List(Of Archivo)
|
||||
For Each gvr As GridViewRow In Gv.Rows
|
||||
CveContratoDetalle = gvr.DataKey("CveContratoDetalle").ToEntero
|
||||
If CveContratoDetalle > 0 Then
|
||||
Cantidad = gvr.FCTextBox("TxtCantidad").Text.ToDouble
|
||||
|
||||
For Each gvr As GridViewRow In Gv.Rows
|
||||
|
||||
CveContratoDetalle = gvr.DataKey("CveContratoDetalle").ToEntero
|
||||
|
||||
If CveContratoDetalle > 0 Then
|
||||
|
||||
Cantidad = gvr.FCTextBox("TxtCantidad").Text.ToDouble
|
||||
|
||||
If Cantidad > 0 Then
|
||||
If ObjContratos.AddContratosAvance(CveContratoDetalle, Cantidad, TxtFecha.Text.ToDateTime, UsuarioActual.CveUsuario) Then
|
||||
If ObjContratos.AddContratosAvance(CveContratoDetalle, Cantidad, TxtFecha.Text.ToDateTime, UsuarioActual.CveUsuario) Then
|
||||
|
||||
Dim CveContratoAvance As Integer = ObjContratos.DtResultados.Rows(0)("CveContratoAvance").ToString.ToEntero
|
||||
Dim files As List(Of Archivo) = gvr.FCTextBox("TXTAnexo").getfiles().Archivos
|
||||
|
||||
For Each fileItem As Archivo In filesgral
|
||||
guardarArchivos.Add(fileItem)
|
||||
If Not ObjContratos.AddContratosAvanceAnexo(CveContratoAvance, fileItem.filename, UsuarioActual.CveUsuario) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
For Each fileItem As Archivo In files
|
||||
'For Each fileItem As Archivo In filesgral 'GENERAL
|
||||
' guardarArchivos.Add(fileItem)
|
||||
' If Not ObjContratos.AddContratosAvanceAnexo(CveContratoAvance, fileItem.filename, UsuarioActual.CveUsuario) Then
|
||||
' TieneError = True
|
||||
' Exit For
|
||||
' End If
|
||||
'Next
|
||||
|
||||
For Each fileItem As Archivo In files
|
||||
guardarArchivos.Add(fileItem)
|
||||
If Not ObjContratos.AddContratosAvanceAnexo(CveContratoAvance, fileItem.filename, UsuarioActual.CveUsuario) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If TieneError Then
|
||||
ObjContratos.RollBack()
|
||||
Alert("No se logro guardar el Presupuesto favor de intentarlo mas tarde o comuniquese con soporte", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Dim urlsave As String = String.Format("Empresas\{0}\Contrato\{1}\Anexos", UsuarioActual.CveEmpresa, CveContrato)
|
||||
For Each fileItem As Archivo In filesgral
|
||||
fileItem.filename.filesMove(fileItem.filename, urlsave)
|
||||
Next
|
||||
Dim urlsave As String = String.Format("Empresas\{0}\Contrato\{1}\Anexos", UsuarioActual.CveEmpresa, CveContrato)
|
||||
For Each fileItem As Archivo In filesgral
|
||||
fileItem.filename.FilesMove(fileItem.filename, urlsave)
|
||||
Next
|
||||
|
||||
For Each fileItem As Archivo In guardarArchivos
|
||||
fileItem.filename.filesMove(fileItem.filename, urlsave)
|
||||
fileItem.filename.FilesMove(fileItem.filename.Replace($".{fileItem.Extencion}", ""), urlsave)
|
||||
Next
|
||||
ObjContratos.Commit()
|
||||
Alert("se guardo Correctamente")
|
||||
@@ -226,8 +298,84 @@ Partial Class Contratos_ContratoAvance
|
||||
ObjContratos.Dispose()
|
||||
CargaddlAvance()
|
||||
CargaDatosAvance()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region "ESTIMACION"
|
||||
|
||||
|
||||
Private Sub CargaAvancesParaEstimar()
|
||||
|
||||
|
||||
Dim ObjContratos As New ClsContratos()
|
||||
Dim DTEstimaciones As New DataTable
|
||||
|
||||
|
||||
If ObjContratos.GetContratosAvanceEstimacion(DDlContratosEstimaciones.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
DTEstimaciones = ObjContratos.DtResultados
|
||||
BtnGuardarEstimacion.Visible = True
|
||||
Else
|
||||
BtnGuardarEstimacion.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
ObjContratos.Dispose()
|
||||
|
||||
|
||||
If DTEstimaciones.Rows.Count > 0 Then
|
||||
GvEstimaciones.DataSource = DTEstimaciones
|
||||
Else
|
||||
GvEstimaciones.DataSource = Nothing
|
||||
End If
|
||||
GvEstimaciones.DataBind()
|
||||
|
||||
UpEstimaciones.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub BtnConsultarEstimaciones_Click(sender As Object, e As EventArgs) Handles BtnConsultarEstimaciones.Click
|
||||
|
||||
CargaAvancesParaEstimar()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GvEstimaciones_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstimaciones.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("CveContratoDetalle").ToString.ToEntero = 0 Then
|
||||
|
||||
|
||||
If e.Row.DBCampo("CveSubFamilias").ToString.ToEntero = 0 Then
|
||||
If e.Row.DBCampo("CveFamilias").ToString.ToEntero = 0 Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
Else
|
||||
e.Row.CssClass = "SubTotales2"
|
||||
End If
|
||||
Else
|
||||
e.Row.CssClass = "SubTotales3"
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BtnGuardarEstimacion_Click(sender As Object, e As EventArgs) Handles BtnGuardarEstimacion.Click
|
||||
|
||||
Dim ObjContratos As New ClsContratos()
|
||||
|
||||
|
||||
|
||||
ObjContratos.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -929,7 +929,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="Gv" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Conceptos"
|
||||
DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CveClasificacion,CodigoPS,LimitarCantidad,PS,OCInterna,NoIdentificacion"
|
||||
DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CveClasificacion,CodigoPS,LimitarCantidad,PS,OCInterna,NoIdentificacion,PermitirAvance"
|
||||
ShowHeader="true" SelectedRowStyle-BackColor="#66CCFF" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="OC <br/> Cliente">
|
||||
@@ -997,7 +997,6 @@
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Precio Unitario">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtPU" Text='<%# Eval("PU", "{0:###,###,##0.00##}")%>' runat="server"></asp:Literal>
|
||||
@@ -1013,12 +1012,18 @@
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Avance" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="CHKPAvance" Enabled="false" AutoPostBack="true" OnCheckedChanged="AvaClick" runat="server" />
|
||||
<asp:TemplateField HeaderText="Avance" Visible="True">
|
||||
<ItemTemplate>
|
||||
|
||||
<asp:LinkButton runat="server" ID="LnkHabilitaAvance" Text= "" OnClick="LnkHabilitaAvance_Click" Enabled="false"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Habilitar el avance?" data-btn-ok-label="si" ></asp:LinkButton>
|
||||
|
||||
<asp:CheckBox ID="CHKPAvance" Enabled="True" Visible="false" AutoPostBack="true" OnCheckedChanged="AvaClick" runat="server" />
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -924,9 +924,10 @@ Partial Class Contratos_ContratoObra
|
||||
#Region " CARGA DATOS "
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjContratos As New ClsContratos()
|
||||
Dim Ruta = Request.ApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
|
||||
'DivTipoContrato.Visible = False
|
||||
|
||||
Dim Ruta = Request.ApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
|
||||
'DivTipoContrato.Visible = False
|
||||
|
||||
|
||||
If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||
If ObjContratos.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
@@ -2042,12 +2043,14 @@ Partial Class Contratos_ContratoObra
|
||||
End Sub
|
||||
Protected Sub GV_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles Gv.RowDataBound
|
||||
|
||||
If e.Row.RowIndex > -1 Then
|
||||
|
||||
e.Row.FCCheckBox("CHKPAvance").Visible = Autorizado
|
||||
'e.Row.FCCheckBox("CHKPEstimacion").Visible = Autorizado
|
||||
If e.Row.RowIndex > -1 Then
|
||||
|
||||
Dim LnkHabilitaAvance As LinkButton = e.Row.FCLinkButton("LnkHabilitaAvance")
|
||||
' e.Row.FCCheckBox("CHKPAvance").Visible = Autorizado
|
||||
'e.Row.FCCheckBox("CHKPEstimacion").Visible = Autorizado
|
||||
If UsuarioActual.TienePermisoProceso(124) Then
|
||||
e.Row.FCCheckBox("CHKPAvance").Enabled = True
|
||||
LnkHabilitaAvance.Enabled = True
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("PermitirAvance").ToString = "1" Then
|
||||
@@ -2065,7 +2068,20 @@ Partial Class Contratos_ContratoObra
|
||||
If CveTipoContrato = 25 Then
|
||||
e.Row.Cells(1).Width = Unit.Pixel(10)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(250)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If e.Row.DBCampo("PermitirAvance").ToString = "1" Then
|
||||
LnkHabilitaAvance.Text = "<i class='fa fa-check-square-o' aria-hidden='true'></i>"
|
||||
LnkHabilitaAvance.Attributes.Add("data-original-title", "¿Deshabilitar avance?")
|
||||
Else
|
||||
LnkHabilitaAvance.Text = "<i class='fa fa-square-o' aria-hidden='true'></i>"
|
||||
LnkHabilitaAvance.Attributes.Add("data-original-title", "¿Habilitar avance?")
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
|
||||
e.Row.FCDropDownList("DdlUMEdit").DataSource = GlobalDTProductosServiciosEquivalencias(e.Row.DataKey("CvePS").ToString.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
@@ -5026,6 +5042,36 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkHabilitaAvance_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
|
||||
Dim PermitirAvance As Integer = GvRow.DataKey("PermitirAvance").ToEntero
|
||||
|
||||
'Get the button that raised the event
|
||||
'Dim btn As CheckBox = DirectCast(sender, CheckBox)
|
||||
'Dim gvr As GridViewRow = DirectCast(btn.NamingContainer, GridViewRow)
|
||||
|
||||
Dim CveContratoDetalle As Integer = GvRow.DataKey("CveContratoDetalle").ToString.ToEntero
|
||||
Dim objContrato As New ClsContratos
|
||||
|
||||
If objContrato.UpdateContratosDetalleAvance(CveContratoDetalle, IIf(PermitirAvance = 1, 0, 1).ToString.ToEntero) Then
|
||||
Dim row = TmpDT.Select(String.Format("CveContratoDetalle={0}", CveContratoDetalle))(0)
|
||||
|
||||
row("PermitirAvance") = IIf(PermitirAvance = 1, 0, 1).ToString.ToEntero
|
||||
|
||||
|
||||
CargaGVPresupuestos(TmpDT.FiltraParametros("CveTipoPresupuesto=2"))
|
||||
|
||||
|
||||
Alert("Se ha permitido levantar avance", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("no se pudo permitir avance", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
objContrato.Dispose()
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -456,7 +456,7 @@
|
||||
|
||||
<div class="col-md-2 pull-right">
|
||||
<div class="btn-group" style="float: right;">
|
||||
<asp:Button ID="BtnVerSugerencias" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnVerSugerencias_Click" runat="server" Text="Ver Secciones" />
|
||||
<asp:Button ID="BtnVerSugerencias" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnVerSugerencias_Click" runat="server" Text="Ver Sugerencias" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 pull-right">
|
||||
@@ -516,7 +516,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLote" CssClass="form-control" runat="server" Visible="false"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Visible="false"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="F.Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">
|
||||
@@ -527,7 +527,7 @@
|
||||
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" Visible="false"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEECaducidad" runat="server" TargetControlID="TxtCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CECaducidad" TargetControlID="TxtCaducidad" PopupButtonID="LnkCaducidad" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CECaducidad" TargetControlID="TxtCaducidad" PopupButtonID="LnkCaducidad" PopupPosition="BottomLeft" Enabled="True" Format="dd/MM/yyyy" ></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVCaducidad" runat="server" ControlToValidate="TxtCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaducidad"></ajax:ValidatorCalloutExtender>
|
||||
</span>
|
||||
@@ -847,7 +847,7 @@
|
||||
<asp:GridView ID="GvSugerencias" runat="server" EmptyDataText="No se encontraron registros." AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall ScrollAD" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Sección Almacen" DataField="Seccion" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
@@ -666,9 +666,11 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Select Case ObjInventario.DtResultados.Rows(0)("TipoDocto").ToString
|
||||
Case "Ing", "Ped"
|
||||
Filtro = "CveConcepto IN (3,40)"
|
||||
Case "Dev", "dPe"
|
||||
Case "Dev"
|
||||
'cuand es devolucionventa=1, es cancelación de la devolución
|
||||
If EsDevolucionVenta = 1 Then Filtro = "CveConcepto = 18" Else Filtro = "CveConcepto IN (3,40)"
|
||||
Case "DPe"
|
||||
Filtro = "CveConcepto = 9"
|
||||
Case Else
|
||||
Filtro = "CveConcepto = 9"
|
||||
End Select
|
||||
@@ -1209,11 +1211,11 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
DtDatosDetalle.AcceptChanges()
|
||||
CargaSerie()
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " AGREGA CON LOTE BATCH "
|
||||
|
||||
|
||||
Private Sub CreaDtDetalleLote()
|
||||
If DtDatosDetalleLote Is Nothing Then
|
||||
DtDatosDetalleLote = New DataTable
|
||||
|
||||
@@ -565,8 +565,10 @@
|
||||
DataKeyNames="Almacen,Cantidad,FechaCaducidad">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Almacén" DataField="Almacen"/>
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:n2}" ItemStyle-HorizontalAlign="Right"/>
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" DataFormatString="{0:dd/MM/yyyy}"/>
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Right"/>
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="125px"/>
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="125px"/>
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="100px"/>
|
||||
</Columns>
|
||||
|
||||
</asp:GridView>
|
||||
|
||||
@@ -207,8 +207,14 @@ Partial Class Inventarios_Kardex
|
||||
If AplicaLote Then GvM.Columns(10).Visible = True
|
||||
If AplicaCaducidad Then GvM.Columns(11).Visible = True
|
||||
|
||||
Dim AuxAplicaSerie As Boolean = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimeroValor("AplicaSerie") = "True"
|
||||
Dim AuxAplicaCad As Boolean = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimeroValor("AplicaCaducidad") = "True"
|
||||
Dim Drp As datarow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimero("")
|
||||
Dim AuxAplicaSerie As Boolean
|
||||
Dim AuxAplicaCad As Boolean
|
||||
If Drp IsNot Nothing Then
|
||||
AuxAplicaSerie = Drp("AplicaSerie").ToString = "True"
|
||||
AuxAplicaCad = Drp("AplicaCaducidad").ToString = "True"
|
||||
End If
|
||||
|
||||
LnkSeries.Visible = AuxAplicaSerie
|
||||
LnkCaducidad.Visible = AuxAplicaCad
|
||||
'CARGA INDICADORES
|
||||
@@ -338,9 +344,15 @@ Partial Class Inventarios_Kardex
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.GetExistenciasCaducidad(ddlProducto2.SelectedValue.ToEntero(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, almacenes) Then
|
||||
GvProductoCaducidad.DataSource = ObjInventarios.DtResultados
|
||||
GvProductoCaducidad.columns(2).visible = ObjInventarios.DtResultados.max("Serie") <> ""
|
||||
GvProductoCaducidad.columns(3).visible = ObjInventarios.DtResultados.max("Lote") <> ""
|
||||
GvProductoCaducidad.columns(4).visible = ObjInventarios.DtResultados.max("FechaCaducidad").todate > minfecha
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
GvProductoCaducidad.DataBind()
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -200,6 +200,7 @@
|
||||
<asp:Label runat="server" ID="LblProyectado" Text="Incluir Proyectados" class="col-md-1 truncate" />
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyeccionFiltro" runat="server" CssClass="select2me" Width="100%" >
|
||||
<asp:ListItem Text="Todos (Entradas/Salidas)" Value="3" />
|
||||
<asp:ListItem Text="Entradas" Value="1" />
|
||||
<asp:ListItem Text="Salidas" Value="2" />
|
||||
<asp:ListItem Text="No" Value="0" Selected="True" />
|
||||
@@ -273,7 +274,7 @@
|
||||
<div class="modal-body">
|
||||
<div class="row" style="width: 100%; text-align: center">
|
||||
<asp:Label runat="server" ID="LblProyeccionOpcion" />
|
||||
<asp:RadioButtonList ID="RblProyeccionOpcion" runat="server" RepeatDirection="Horizontal" Width="50%" Style="margin: 0 25% 0 25%">
|
||||
<asp:RadioButtonList ID="RblProyeccionOpcion" runat="server" RepeatDirection="Horizontal" Width="50%" Style="margin: 0 25% 0 25%">
|
||||
<asp:ListItem Text="Entrada" Value="1" Selected="True" />
|
||||
<asp:ListItem Text="Salida" Value="2" />
|
||||
</asp:RadioButtonList>
|
||||
|
||||
@@ -396,9 +396,7 @@ Partial Class Inventarios_KardexAlmacen
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
ObjInventarios.IniciaTransacSQL()
|
||||
|
||||
Dim TipoMovot As Integer = If(RblProyeccionOpcion.SelectedValue = "1", 0, 1)
|
||||
|
||||
If ObjInventarios.DeleteMovimientosProyectados(TipoMovot) Then
|
||||
If ObjInventarios.DeleteMovimientosProyectados(RblProyeccionOpcion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
Dim DtProductosEmpresas As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||
For Each dtRow As DataRow In dt.Rows
|
||||
Dim Codigo As String = dtRow("Código").ToString
|
||||
|
||||
@@ -478,13 +478,13 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLote" CssClass="form-control" runat="server" Visible="false"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtLote" Width="80px" class="form-control input-sm" runat="server" Visible="false"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<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="TxtCaducidad" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server" Visible="false"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCaducidad" CssClass="form-control input-sm ADSMaskDate" Style="width: 80px" runat="server" Visible="false"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" Visible="false"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
|
||||
@@ -1152,7 +1152,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
If Not ErrorMovInv Then
|
||||
|
||||
|
||||
Msg.AppendFormat("<br/>El Movimiento se registro con el Folio: <b><a href='Inventarios/EntradasSalidas.aspx?CveMovimiento={1}'>{0}</a></b>", ObjInventario.Folio, CveMovimiento)
|
||||
Msg.AppendFormat("<br/>El Movimiento se registro con el Folio: <b><a href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}'>{0}</a></b>", ObjInventario.Folio, CveMovimiento)
|
||||
Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
|
||||
|
||||
If IDPoliza > 0 Then Msg = Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza)
|
||||
|
||||
@@ -11458,7 +11458,7 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto"})
|
||||
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
|
||||
|
||||
If DT.Rows.Count > 0 Then
|
||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||
@@ -11491,8 +11491,6 @@ Partial Class Ventas
|
||||
If Row2("CveClasificacion").ToString() = "19929" Then IdCtaContable = 1142
|
||||
End If
|
||||
|
||||
' CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
|
||||
If IdCtaContable <= 0 Then
|
||||
@@ -11500,12 +11498,7 @@ Partial Class Ventas
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
'If CveCuenta <= 0 Then
|
||||
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"))
|
||||
' CveCuentaContabilizacion = 0
|
||||
'End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then
|
||||
ErrorPrepoliza = True
|
||||
Else
|
||||
ViewState("SeGuardoPrePoliza") = True
|
||||
|
||||
Reference in New Issue
Block a user