This commit is contained in:
rrene
2020-08-28 11:39:21 -07:00
11 changed files with 241 additions and 103 deletions

View File

@@ -6489,7 +6489,15 @@ Partial Class Compras_Compras
End If
Dim UsaComplementariaFleteImportaciones As Boolean = False
'DEBE METER EL CONCEPTO DE COMPRAS SI EL TIPO ES GASTO CON ALMACEN
If DdlTipoCompra.SelectedValue = "10" Then
ConceptoContabilizacion = 6
End If
Select Case ConceptoContabilizacion
Case 6
importeMovimiento = TmpDT.SUMD(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"))
importeMN = importeMovimiento * tipoCambioActual * Multiplicador 'TIENE QUE TENER EL IMPORTEMN IGUAL AL IMPORTEMOVIMIENTO PORQUE NO TOMA EN CUENTA SI UN PRODUCTO ES TIPO SERVICIO
Case 176
ConceptoContabilizacionME = 228
ConceptoContabilizacionMEComp = 229
@@ -6510,8 +6518,14 @@ Partial Class Compras_Compras
importeMN = importeMovimiento * tipoCambioActual * Multiplicador 'TIENE QUE TENER EL IMPORTEMN IGUAL AL IMPORTEMOVIMIENTO PORQUE NO TOMA EN CUENTA SI UN PRODUCTO ES TIPO SERVICIO
End Select
If ObjConta.GetRetCuenta(ConceptoContabilizacion, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
If ConceptoContabilizacion = 6 Then
If ObjConta.GetRetCuenta(ConceptoContabilizacion, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero
End If
Else
If ObjConta.GetRetCuenta(ConceptoContabilizacion, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
End If
End If
If ObjConta.GetRetCuenta(ConceptoContabilizacionME, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
@@ -6605,6 +6619,26 @@ Partial Class Compras_Compras
ErrorPrepoliza = True
End If
End If
Case 6
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
For Each RowDetalle As DataRow In TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2", "", {"CveClasificacion", "CveSubProyecto"}).Rows
If ObjConta.GetRetCuenta(6, RowDetalle("CveClasificacion").ToString().ToEntero()) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaGastoSIG").ToString.ToEntero
End If
End If
If importeMN <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual,
CveClasificacion:=RowDetalle("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=RowDetalle("CveSubProyecto").ToString().ToEntero(), Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
End If
Next
End Select
'End If

View File

@@ -52,10 +52,10 @@
<Width>4.42895cm</Width>
</TablixColumn>
<TablixColumn>
<Width>3.2021cm</Width>
<Width>3.06732cm</Width>
</TablixColumn>
<TablixColumn>
<Width>3.36938cm</Width>
<Width>3.6031cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.89562cm</Width>
@@ -156,7 +156,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Fecha Ven.</Value>
<Value>Fecha Vencimiento.</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
@@ -191,7 +191,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Movto.</Value>
<Value>Cheque.</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
@@ -226,14 +226,14 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Abono</Value>
<Value>Abonado</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
@@ -250,47 +250,14 @@
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<ColSpan>2</ColSpan>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox21">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox21</rd:DefaultName>
<Style>
<Border>
<Color>Silver</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>Silver</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell />
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.6cm</Height>
<Height>0.46771cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
@@ -303,7 +270,8 @@
<TextRun>
<Value>= IIF( IsNothing(Fields!CveVenta.Value) , (Fields!Banco.Value &amp; " - " &amp; Fields!NumCuenta.Value),Fields!SerieFolio.Value)</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
<FontWeight>=IIF( IsNothing(Fields!CveVenta.Value), "Bold","Normal")</FontWeight>
</Style>
</TextRun>
</TextRuns>
@@ -336,7 +304,8 @@
<TextRun>
<Value>=Fields!Fecha.Value</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
<FontWeight>=IIF( IsNothing(Fields!CveVenta.Value), "Bold","Normal")</FontWeight>
<Format>dd/MM/yyyy</Format>
</Style>
</TextRun>
@@ -372,7 +341,8 @@
<TextRun>
<Value>= IIF( IsNothing(Fields!CveVenta.Value), Fields!FechaDocumento.Value,Fields!FechaVencimiento.Value)</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
<FontWeight>=IIF( IsNothing(Fields!CveVenta.Value), "Bold","Normal")</FontWeight>
<Format>dd/MM/yyyy</Format>
</Style>
</TextRun>
@@ -408,7 +378,8 @@
<TextRun>
<Value>= IIF( IsNothing(Fields!CveVenta.Value) , Fields!FolioCobro.Value,"")</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
<FontWeight>=IIF( IsNothing(Fields!CveVenta.Value), "Bold","Normal")</FontWeight>
</Style>
</TextRun>
</TextRuns>
@@ -441,7 +412,8 @@
<TextRun>
<Value>=Fields!ImporteAbonado.Value</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
<FontWeight>=IIF( IsNothing(Fields!CveVenta.Value), "Bold","Normal")</FontWeight>
<Format>'$'#,0.00;('$'#,0.00)</Format>
</Style>
</TextRun>
@@ -478,7 +450,8 @@
<TextRun>
<Value>=IIF(Fields!CveVenta.Value &gt; 0,Fields!MonedaVenta.Value, Fields!MonedaIE.Value)</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
<FontWeight>=IIF( IsNothing(Fields!CveVenta.Value), "Bold","Normal")</FontWeight>
</Style>
</TextRun>
</TextRuns>
@@ -527,8 +500,8 @@
<DataSetName>DataSet1</DataSetName>
<Top>1.00112cm</Top>
<Left>0.12912cm</Left>
<Height>1.2cm</Height>
<Width>19.74272cm</Width>
<Height>1.06771cm</Height>
<Width>19.84166cm</Width>
<ZIndex>2</ZIndex>
<Style>
<Border>

View File

@@ -209,7 +209,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>SubProyecto</Value>
<Value>=Parameters!SubProyectoHeader.Value</Value>
<Style>
<FontSize>7pt</FontSize>
<FontWeight>Bold</FontWeight>
@@ -1485,6 +1485,12 @@
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="SubProyectoHeader">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<Language>es-MX</Language>
<rd:ReportUnitType>Cm</rd:ReportUnitType>

View File

@@ -1663,7 +1663,10 @@ Partial Class OC
InicializaMovtosAlmacen()
If UsuarioActual.Empresa.Funcionalidad(565) = "1" And pCveOrdenCompra > 0 And TipoOC.ToUpper() = "REQ" Then
RowCotizaciones.Visible = True
'LAS COTIZACIONES RAPIDAS SOLO DEBE APARECER SI EL PROVEEDOR ES DEDICADO
If CveConfianzaProveedor = 1 Then
RowCotizaciones.Visible = True
End If
UpIvas.Update()
End If
@@ -1823,6 +1826,8 @@ Partial Class OC
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
DdlProveedores.SelectedText = "Seleccione"
DdlProveedores.SelectedValue = "-1"
DdlProveedores.ddl.AutoPostBack = True
DdlProveedorCot.setEsWebService(True)
DdlProveedorCot.Attributes.Add("data-metodo", "getproveedores")
Else
@@ -1830,6 +1835,7 @@ Partial Class OC
DdlProveedores.DataSource = GlobalDTCompProveedores(CveEmpresaActual)
DdlProveedores.DataBind()
DdlProveedores.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlProveedores.ddl.AutoPostBack = True
DdlProveedorCot.DataSource = GlobalDTCompProveedores(CveEmpresaActual)
DdlProveedorCot.DataBind()
@@ -5352,6 +5358,14 @@ Partial Class OC
VerificaSiRequiereCotizacion()
If UsuarioActual.Empresa.Funcionalidad(565) = "1" And CveOrdenCompra > 0 And TipoOC.ToUpper() = "REQ" Then
'LAS COTIZACIONES RAPIDAS SOLO DEBE APARECER SI EL PROVEEDOR ES DEDICADO
If CveConfianzaProveedor = 1 Then
RowCotizaciones.Visible = True
End If
UpIvas.Update()
End If
DdlProveedorSucursal.DataBind()
UPProv.Update() : UPPEmp.Update()
UPPDetalle.Update()

View File

@@ -13,7 +13,7 @@
tr[hide="1"] {
display: none;
background-color: rgb(4,71,103)
background-color: rgb(4,71,103);
}
.portlet {
@@ -138,10 +138,10 @@
<asp:LinkButton ID="LnkUpUsuarios" OnClick="LnkUpUsuarios_Click" Visible="true" runat="server"><i class="fa fa-pencil"></i> Actualizar Participantes</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkOpenModalAsistencia" OnClick="LnkOpenModalAsistencia_Click" Visible="false" runat="server"><i class="fa fa-users"></i>Asistencia</asp:LinkButton>
<asp:LinkButton ID="LnkOpenModalAsistencia" OnClick="LnkOpenModalAsistencia_Click" Visible="false" runat="server"><i class="fa fa-users"></i>Asistencia</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkEnviarCorreo" OnClick="LnkEnviarCorreo_Click" Visible="false" runat="server"><i class="fa fa-paper-plane-o"></i>Enviar correo</asp:LinkButton>
<asp:LinkButton ID="LnkEnviarCorreo" OnClick="LnkEnviarCorreo_Click" Visible="false" runat="server"><i class="fa fa-paper-plane-o"></i>Enviar correo</asp:LinkButton>
</li>
</ContentTemplate>
@@ -150,7 +150,7 @@
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpContenido" runat="server" UpdateMode="Conditional">
<asp:UpdatePanel ID="UpContenido" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row">
<div class="col-md-7">
@@ -180,6 +180,24 @@
<asp:RequiredFieldValidator ID="RfvTxtLugar" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtLugar" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Lugar''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
<asp:Label runat="server" Text="Lugar:" AssociatedControlID="TxtLugar"></asp:Label>
</div>
<div class="row" style="width:100%">
<div class="col-sm-6" style="width:50%">
<div class="input-group form-group form-md-line-input date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
<asp:TextBox ID="txtFechaI" runat="server" autocomplete="false" CssClass="form-control ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVtxtFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
<asp:Label AssociatedControlID="txtFechaI" runat="server" Text="Fecha"></asp:Label>
<%--<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999 99:99" MaskType="DateTime" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>--%>
<ajax:ValidatorCalloutExtender ID="VcoFechaI" runat="server" HighlightCssClass="vco" TargetControlID="RFVtxtFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-sm-6" style="width:50%">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtDuracion" runat="server" CssClass="form-control " CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVTxtDuracion" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtDuracion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Asunto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
<asp:Label runat="server" Text="Duración:" AssociatedControlID="TxtDuracion"></asp:Label>
</div>
</div>
</div>
<asp:Panel ID="pnlmiembrosvista" Visible="false" runat="server">
<div class="pnlCorreo" style="margin-bottom: 5px;">
<div class="headerCorreo ">
@@ -198,28 +216,15 @@
</div>
</div>
</asp:Panel>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtDuracion" runat="server" CssClass="form-control " CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVTxtDuracion" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtDuracion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Asunto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
<asp:Label runat="server" Text="Duración:" AssociatedControlID="TxtDuracion"></asp:Label>
</div>
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtCorreoExterno" runat="server" CssClass="form-control TxtCorreoExterno" CausesValidation="true" TextMode="MultiLine" Rows="2"></asp:TextBox>
<%--<asp:RequiredFieldValidator ID="RfvCorreoExterno" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtCorreoExterno" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Correo Externo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>--%>
<asp:Label runat="server" Text="Correos Externos" AssociatedControlID="TxtCorreoExterno"></asp:Label>
</div>
<div class="row">
<div class="col-sm-6">
<div class="input-group form-group form-md-line-input date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
<asp:TextBox ID="txtFechaI" runat="server" autocomplete="false" CssClass="form-control ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVtxtFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>
<asp:Label AssociatedControlID="txtFechaI" runat="server" Text="Fecha Inicio"></asp:Label>
<%--<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999 99:99" MaskType="DateTime" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>--%>
<ajax:ValidatorCalloutExtender ID="VcoFechaI" runat="server" HighlightCssClass="vco" TargetControlID="RFVtxtFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-sm-6" style ="display:none;">
<div class="col-sm-6" style="display: none;">
<div class="input-group form-group form-md-line-input date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
<asp:TextBox ID="txtFechaF" runat="server" autocomplete="false" CssClass="form-control ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px " placeholder=""></asp:TextBox>
<%--<asp:RequiredFieldValidator ID="RFVtxtFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpTarea"></asp:RequiredFieldValidator>--%>
@@ -294,7 +299,8 @@
<ItemStyle HorizontalAlign="Center" Width="50px" />
<HeaderTemplate>
C. C. Para
<br />
<br />
<%--<a id="chkAll" onclick="chkAll_OncLick(1);" class="linkCorreo" data-toggle="tooltip" title="Seleccionar todos(Visibles)"><i class="fa fa-check-square-o"></i></a>
<a id="UnchkAll" onclick="chkAll_OncLick(0);" class="linkCorreo" data-toggle="tooltip" title="Quitar seleccion todos(Visibles)"><i class="fa fa-square-o"></i></a>--%>
</HeaderTemplate>
@@ -413,6 +419,7 @@
<ItemStyle HorizontalAlign="Center" Width="50px" />
<HeaderTemplate>
C. C. Para
<br />
<%--<a id="chkAll" onclick="chkAll_OncLick(1);" class="linkCorreo" data-toggle="tooltip" title="Seleccionar todos(Visibles)"><i class="fa fa-check-square-o"></i></a>
<a id="UnchkAll" onclick="chkAll_OncLick(0);" class="linkCorreo" data-toggle="tooltip" title="Quitar seleccion todos(Visibles)"><i class="fa fa fa-square-o"></i></a>--%>
@@ -445,7 +452,7 @@
</asp:UpdatePanel>
</div>
</div>
<div id='<%= iddivTomarAsistencia %>' class="modal ADS fade" role="dialog">
<div class="modal-dialog">
<asp:UpdatePanel ID="UpTomarASistencia" class="modal-content " tabindex="-1" runat="server" UpdateMode="Conditional">
@@ -468,9 +475,10 @@
<ItemStyle HorizontalAlign="Center" Width="50px" />
<HeaderTemplate>
Asistió
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="ChkAsistio" CssClass="ChkOk" Checked='<%# Eval("Asistencia").ToString()=="1" %>' runat="server" />
<asp:CheckBox ID="ChkAsistio" CssClass="ChkOk" Checked='<%# Eval("Asistencia").ToString()=="1" %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
@@ -487,11 +495,11 @@
</asp:TemplateField>
</Columns>
</asp:GridView>
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtAsistentesExternos" runat="server" CssClass="form-control" CausesValidation="true" TextMode="MultiLine" Rows="2"></asp:TextBox>
<asp:Label runat="server" Text="Externos" AssociatedControlID="TxtAsistentesExternos"></asp:Label>
</div>
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtAsistentesExternos" runat="server" CssClass="form-control" CausesValidation="true" TextMode="MultiLine" Rows="2"></asp:TextBox>
<asp:Label runat="server" Text="Externos" AssociatedControlID="TxtAsistentesExternos"></asp:Label>
</div>
</div>
<div class="modal-footer">
<asp:LinkButton ID="LnkUpAsistencia" OnClick="LnkUpAsistencia_Click" CssClass="btn btn-primary" runat="server">Guardar</asp:LinkButton>

View File

@@ -16,7 +16,17 @@
<li>
<asp:LinkButton runat="server" ID="LkbNuevaVersion" OnClick="LkbNuevaVersion_Click" data-toggle="tooltip" data-placement="left" title="Agregar una nueva versión de este documento" Text="<i class='fa fa-plus'></i>Crear Nueva Versión"></asp:LinkButton>
</li>
<li>
<asp:LinkButton runat="server" ID="LkbPDF" OnClick="LkbPDF_Click" data-toggle="tooltip" data-placement="left" title="ImprimirPDF" Text="<i class='fa fa-file-pdf-o'></i> PDF"></asp:LinkButton>
</li>
<li>
<asp:LinkButton runat="server" ID="LkbExcel" OnClick="LkbExcel_Click" data-toggle="tooltip" data-placement="left" title="ImprimirExcel" Text="<i class='fa fa-file-excel-o'></i> Excel"></asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LkbPDF"/>
<asp:PostBackTrigger ControlID="LkbExcel"/>
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">

View File

@@ -8,6 +8,7 @@ using Extensiones;
using System.Data;
using System.IO;
using System.Text;
using Microsoft.Reporting.WebForms;
public partial class OI_DocumentoDetalle : ClsPaginas
{
@@ -89,6 +90,19 @@ public partial class OI_DocumentoDetalle : ClsPaginas
ViewState["CveAsignacion"] = value;
}
}
private DataTable DtUsuariosParticipantes
{
get
{
return ((DataTable) ViewState["DtUsuariosParticipantes"]);
}
set
{
ViewState["DtUsuariosParticipantes"] = value;
}
}
#endregion
protected void Page_Load(object sender, EventArgs e)
@@ -149,6 +163,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas
if (ObjOI.GetDocumentoAutorizacion(this.CveDocumento))
{
GvUsuarios.DataSource = ObjOI.DtResultados;
DtUsuariosParticipantes = ObjOI.DtResultados;
UsuariosAux = ObjOI.DtResultados;
}
ObjOI.Dispose();
@@ -300,7 +315,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas
bool MostrarSegunEnProceso = (LblEstatus.Text == "Estatus: En Proceso");
LkbActualizar.Visible = !(MostrarSegunRechazado) && (UsuarioActual.CveUsuario == this.CveUsuarioResponsable);
DivBotonesAcciones.Visible = !(MostrarSegunAprobado || MostrarSegunRechazado);
UpAgregar.Visible = MostrarSegunAprobado;
LkbNuevaVersion.Visible = MostrarSegunAprobado;
}
private void CargarCategorias()
@@ -832,7 +847,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas
}
#endregion
#region "Rechazar"
#region "RECHAZAR"
protected void LkbRechazar_Click(object sender, EventArgs e)
{
ClsOIEventos ObjOI = new ClsOIEventos();
@@ -845,4 +860,40 @@ public partial class OI_DocumentoDetalle : ClsPaginas
Response.Redirect(string.Format("/OI/DocumentoDetalle.aspx?CveDocumento={0}&Mensaje={1}", this.CveDocumento, "Rechazado"));
}
#endregion
#region "IMPRIMIR"
private void Imprimir(string Formato)
{
List<ReportParameter> Params = new List<ReportParameter>();
Params.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
Params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
Params.Add(new ReportParameter("LogoPath", ""));
Params.Add(new ReportParameter("Descripcion", TxtDescripcion.Text));
Params.Add(new ReportParameter("Categoria", DdlCategoria.SelectedItem.Text));
Params.Add(new ReportParameter("SubCategoria", DdlSubCategoria.SelectedItem.Text));
Params.Add(new ReportParameter("Estatus", LblEstatus.Text.Substring(9)));
Params.Add(new ReportParameter("Version", TxtVersion.Text));
Params.Add(new ReportParameter("Responsable", TxtResponsable.Text));
Params.Add(new ReportParameter("Observaciones", TxtObs.InnerText));
Params.Add(new ReportParameter("Documento", this.ArchivoAdjuntoNombre));
var logouri = string.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
System.IO.FileInfo Imagen = new System.IO.FileInfo(string.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
string LogoRuta = (Imagen.Exists) ? logouri : "" ;
Params.Add(new ReportParameter("LogoPath", LogoRuta));
ImprimirPDF("Empresas/Grales/Formatos/RepDocumentos.rdlc", this.DtUsuariosParticipantes, Params, "Detalle del documento", Formato);
}
protected void LkbPDF_Click(object sender, EventArgs e)
{
Imprimir("PDF");
}
protected void LkbExcel_Click(object sender, EventArgs e)
{
Imprimir("Excel");
}
#endregion
}

View File

@@ -1318,28 +1318,28 @@
<asp:Panel runat="server" ID="PnlSalarios" Visible="false">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtSalarioDiario" Enabled="false" runat="server" MaxLength="10"></asp:TextBox>
<asp:TextBox CssClass="form-control" ID="TxtSalarioDiario" runat="server" MaxLength="10"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtSalarioDiario" Enabled="false" Text="Salario Diario (SDD):"></asp:Label>
<%--<asp:CompareValidator ID="CVSalarioDiario" runat="server" ControlToValidate="TxtSalarioDiario" CssClass="help-block errorimput" ErrorMessage="El campo <b>''Salario Diario''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>--%>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtSDI" Enabled="false" runat="server" MaxLength="10"></asp:TextBox>
<asp:TextBox CssClass="form-control" ID="TxtSDI" runat="server" MaxLength="10"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtSDI" Text="Salario Diario Integrado (SDI):"></asp:Label>
<%--<asp:CompareValidator ID="CVSDI" runat="server" ControlToValidate="TxtSDI" CssClass="help-block errorimput" ErrorMessage="El campo <b>''SDI''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Double" ValidationGroup="GrpGuardar"></asp:CompareValidator>--%>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright" style="display: none;">
<asp:TextBox CssClass="form-control" ID="TxtSalarioDiarioPago" Enabled="false" runat="server" MaxLength="10"></asp:TextBox>
<asp:TextBox CssClass="form-control" ID="TxtSalarioDiarioPago" runat="server" MaxLength="10"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtSalarioDiarioPago" Text="Salario Diario de Pago:"></asp:Label>
<%--<asp:CompareValidator ID="CVSalario" runat="server" ControlToValidate="TxtSalarioDiarioPago" CssClass="help-block errorimput" ErrorMessage="El campo <b>''Salario Diario de Pago''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>--%>
<i></i>
</div>
<asp:Panel runat="server" ID="pnlSalarioIMSS" CssClass="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtSalarioCotizado" Enabled="false" runat="server" MaxLength="10"></asp:TextBox>
<asp:TextBox CssClass="form-control" ID="TxtSalarioCotizado" runat="server" MaxLength="10"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtSalarioCotizado" Text="Salario Diario IMSS:"></asp:Label>
<%--<asp:CompareValidator ID="CVSDT" runat="server" ControlToValidate="TxtSalarioCotizado" CssClass="help-block errorimput" ErrorMessage="El campo <b>''Salario Diario Cotizado''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>--%>
@@ -3952,7 +3952,7 @@
<%-- MODAL SUBIR ARCHIVO --%>
<div id="ModalArchvivo" class="modal ADS fade" role="dialog">
<div id="ModalArchivo" class="modal ADS fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->

View File

@@ -774,7 +774,13 @@ Partial Class RH_Personal
End Function
Const wdPageBreak As Integer = 7
Const wdCharacter As Integer = 1
Const wdCharacter As Integer = 1
Public ReadOnly Property showsalarios As Boolean
Get
Return Not UsuarioActual.Empresa.Funcionalidad(701) = "1"
End Get
End Property
'Configuración
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
@@ -782,7 +788,7 @@ Partial Class RH_Personal
pnlSalarioIMSS.Visible = False
End If
'
PnlSalarios.Visible = UsuarioActual.Empresa.Funcionalidad(701) = "1"
PnlSalarios.Visible = showsalarios
ViewState("Orden") = ""
ViewState("Orden1") = ""
@@ -5235,7 +5241,7 @@ Partial Class RH_Personal
UpImage.Update()
TxtCargaImg.Text = "[]"
UpAddArchivo.Update()
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalArchvivo"))
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalArchivo"))
End Sub
#Region "PERMISOS"

View File

@@ -184,7 +184,7 @@
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlUnidadMedida" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="false" CausesValidation="true" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" Width="206px">
<asp:DropDownList ID="DdlUnidadMedida" OnSelectedIndexChanged="DdlUnidadMedida_SelectedIndexChanged" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" CausesValidation="true" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" Width="206px">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<label for="<%= DdlUnidadMedida.ClientID.ToString()%>">Unidad de Medida:</label>

View File

@@ -106,6 +106,15 @@ Partial Class ProductosyServicios
End Set
End Property
Private Property CveUnidadMedida As Integer
Get
Return ViewState("CveUnidadMedida").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveUnidadMedida") = value
End Set
End Property
#End Region
@@ -769,6 +778,7 @@ Partial Class ProductosyServicios
End If
DdlTipoPSDes.SelectedValueExist(ObjProductosServicios.CveClasificacionDetalle.ToString)
DdlUnidadMedida.SelectedValue = ObjProductosServicios.CveUnidadMedida.ToString
CveUnidadMedida = ObjProductosServicios.CveUnidadMedida.ToString.ToEntero
DdlMarca.SelectedValue = ObjProductosServicios.CveMarca.ToString
DdlMarcaPSDes.SelectedValue = ObjProductosServicios.CveMarca.ToString
TxtCodigo.Text = ObjProductosServicios.Codigo
@@ -2653,23 +2663,32 @@ Partial Class ProductosyServicios
End Sub
Protected Sub ChkSerie_CheckedChanged(sender As Object, e As EventArgs)
If ChkSerie.Checked Then
ddlMetodos.SelectedValueExist("5")
If ElProductoTieneExistencia() Then
ChkSerie.Checked = Not ChkSerie.Checked
Alert("el producto no se puede cambiar la opcion, porque tiene existencia.", TipoMensaje.MsgAdvertencia)
Else
ddlMetodos.SelectedValueExist("-1")
If ChkSerie.Checked Then
ddlMetodos.SelectedValueExist("5")
Else
ddlMetodos.SelectedValueExist("-1")
End If
UpConta.Update()
End If
UpConta.Update()
End Sub
Protected Sub ChkSeccion_CheckedChanged(sender As Object, e As EventArgs)
If ChkSeccion.Checked Then
DivSeccionAlmacen.Visible = True
If ElProductoTieneExistencia() Then
ChkSeccion.Checked = Not ChkSerie.Checked
Alert("el producto no se puede cambiar la opcion, porque tiene existencia.", TipoMensaje.MsgAdvertencia)
Else
DivSeccionAlmacen.Visible = False
End If
If ChkSeccion.Checked Then
DivSeccionAlmacen.Visible = True
Else
DivSeccionAlmacen.Visible = False
End If
UpSeccionAlmacen.Update()
UpSeccionAlmacen.Update()
End If
End Sub
Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs)
@@ -2680,4 +2699,21 @@ Partial Class ProductosyServicios
UpModalSeccionAlmacen.Update()
End Sub
Protected Sub DdlUnidadMedida_SelectedIndexChanged(sender As Object, e As EventArgs)
If ElProductoTieneExistencia() Then
DdlUnidadMedida.SelectedValue = CveUnidadMedida.ToString
Alert("el producto no se puede cambiar la opcion, porque tiene existencia.")
End If
End Sub
Private Function ElProductoTieneExistencia() As Boolean
Dim Existencia As Decimal = 0
If CvePS > 0 Then
Dim ObjInventarios As New ClsInventarios
Existencia = ObjInventarios.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, -1)
ObjInventarios.Dispose()
End If
Return Existencia > 0
End Function
End Class