This commit is contained in:
Antonio Gonzalez
2020-03-28 17:46:11 -07:00
3 changed files with 5194 additions and 5094 deletions

View File

@@ -181,7 +181,7 @@
<asp:ListItem Text="Deudor" Value="2"></asp:ListItem>
<asp:ListItem Text="Acreedor" Value="3"></asp:ListItem>
</asp:DropDownList>--%>
<asp:LinkButton ID="LblProveedor" runat="server" Visible="true" class="whitoutcol linewhitsize comprasdfleft" Style="text-decoration:none">Proveedor:</asp:LinkButton>
<asp:LinkButton ID="LblProveedor" runat="server" Visible="true" class="whitoutcol linewhitsize comprasdfleft" Style="text-decoration: none">Proveedor:</asp:LinkButton>
<%--<asp:Label ID="LblProveedor" runat="server" Visible="true" class="whitoutcol linewhitsize comprasdfleft">Proveedor:</asp:Label>--%>
<%-- <asp:Label ID="lblProveedor" runat="server" Visible="true" class="whitoutcol linewhitsize comprasdfleft">Proveedor:</asp:Label>--%>
<div class="whitoutcol whitoutcol ">
@@ -408,6 +408,7 @@
<div class="whitoutcol whitoutcol">
<asp:HyperLink ID="HplImporte" CssClass="Texto thickbox" runat="server"></asp:HyperLink></td>
</div>
</div>
<div class="form-group proveedoreespes" id="trSaldo" runat="server" visible="False">
@@ -415,6 +416,7 @@
<div class="whitoutcol whitoutcol">
<asp:HyperLink ID="HplSaldoAuxiliar" CssClass="Texto thickbox" runat="server"></asp:HyperLink></td>
</div>
</div>
<div class="form-group proveedoreespes" id="trContabilizada" runat="server" visible="true">
@@ -592,8 +594,12 @@
<th style="width: 70px">Unidad</th>
<th style="width: 222px">Clasificación
<asp:HyperLink ID="HplAddClasificacion" data-toggle="tooltip" data-placement="top" NavigateUrl="/Ventas/CatClasificaciones.aspx" CssClass="btn btn-default btn-circle btn-xs " ToolTip="Agregar Clasificacion" runat="server"><i class="fa fa-plus" style="color:black" aria-hidden="true"></i></asp:HyperLink>&nbsp;&nbsp;&nbsp;
<span data-toggle="collapse" data-target="#DivReclasifica">
<div class="btn btn-default btn-circle btn-xs " data-toggle="tooltip" data-placement="top" title="Reclasificar productos"><i class="fa fa-arrow-circle-down" style="color: green" aria-hidden="true"></i></div>
<asp:LinkButton ID="ImgClasificacion" CssClass="btn btn-default btn-circle btn-xs " data-toggle="tooltip" data-placement="top" ToolTip="Aplicar Clasificación a Productos" runat="server" Style="display: none;"><i class="fa fa-arrow-circle-down" style="color:green" aria-hidden="true"></i></asp:LinkButton>
@@ -604,6 +610,8 @@
<th style="width: 150px">
<asp:Literal ID="LitHProyecto" runat="server" Text="Proyecto<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"></asp:Literal><asp:Label runat="server" ID="LblSubProyectoHeader" Text="SubProyecto"></asp:Label>&nbsp;
<asp:LinkButton ID="ImgActualizarProyecto" CssClass="btn btn-default btn-circle" data-toggle="tooltip" data-placement="top" ToolTip="Actualizar Cambios" runat="server" Visible="False"><i class="fa fa-arrow-circle-down" aria-hidden="true"></i></asp:LinkButton>
<span data-toggle="collapse" data-target="#DivReclasifica">
<div class="btn btn-default btn-circle btn-xs " data-toggle="tooltip" data-placement="top" title="Cambiar sucursal"><i class="fa fa-arrow-circle-down" style="color: green" aria-hidden="true"></i></div>
@@ -612,6 +620,8 @@
</th>
<th style="width: 80px">Tipo de Gasto
<span data-toggle="collapse" data-target="#DivReclasifica">
<div class="btn btn-default btn-circle btn-xs " data-toggle="tooltip" data-placement="top" title="Cambiar tipo de gasto"><i class="fa fa-arrow-circle-down" style="color: green" aria-hidden="true"></i></div>
</span>
@@ -780,6 +790,7 @@
<ItemTemplate>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
@@ -806,6 +817,7 @@
<ItemTemplate>
<asp:Literal ID="LtlAnticipos" runat="server" Text='<%# Eval("Importe", "{0:N2}") %>'></asp:Literal>&nbsp;
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
@@ -813,6 +825,7 @@
<ItemTemplate>
<asp:Literal ID="LtlMoneda" runat="server" Text='<%# Eval("Moneda") %>'></asp:Literal>&nbsp;
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="False">
@@ -893,6 +906,8 @@
<td align="right">&nbsp
&nbsp;
<asp:HyperLink ID="HLAplicaNCFact" NavigateUrl="#" Visible="false" data-toggle="modal" data-target="#FacturaNC" runat="server"><i title="Aplicar Notas de Credito" data-toggle="tooltip" class='fa fa-money font-green'></i></asp:HyperLink>
</td>
</tr>
@@ -1012,6 +1027,8 @@
<div runat="server" id="DivTC" visible="false">
TC:
<asp:TextBox ID="TxtTC" Text="" Width="50px" runat="server" />
</div>
</ContentTemplate>
@@ -1047,6 +1064,8 @@
<ul class="list-inline" style="font-size: 14px;">
<li>Aplica consignación:
<asp:CheckBox Text="" ID="ChkConsignacion" OnCheckedChanged="ChkConsignacion_CheckedChanged" AutoPostBack="true" Enabled="false" runat="server" />
</li>
<br />
@@ -1058,6 +1077,8 @@
</li>
<li runat="server" id="LiConsignacion" visible="false">Consignación:
<asp:DropDownList runat="server" ID="DdlConsignacion" DataValueField="CveConsignacion" DataTextField="SerieFolioFecha" Width="180px"></asp:DropDownList>
</li>
<%--<li>Folio Consignación:
@@ -1248,8 +1269,18 @@
</div>
</div>
<div class="portlet-body">
<div id="DivAlmacenDev" runat="server" visible="false" class="row">
<div class="col-md-12">
<table width="325px">
<tr>
<td width="50px">Almacen:</td>
<td width="250px">
<asp:DropDownList ID="DdlAlmacenDevolucion" Style="width: 100%" AutoPostBack="true" runat="server" CssClass="form-control input-sm select2me " DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>
</td>
</tr>
</table>
</div>
</div>
<br />
<asp:GridView ID="GVDevolucion" runat="server" DataKeyNames="CveMovimientoDetalle,CveAlmacen,Total,PU,Cantidad,CvePS,CveUM,UM,CveClasificacion,Clasificacion,PS,CveTipoPS" ShowFooter="true" GridLines="None" AutoGenerateColumns="false" EmptyDataText="Aun no hay registros." ShowHeaderWhenEmpty="True" Width="100%" CssClass="table table-striped table-hover Widthall">
<Columns>
@@ -1321,6 +1352,8 @@
<ul class="list-inline" style="font-size: 14px;">
<li>Tipo Cambio:
<asp:TextBox ID="TxtTipoCambioOC" runat="server" align="right" MaxLength="12" Text="" Width="100px"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtTipoCambioOC" FilterType="Custom, Numbers" ValidChars="." />
<asp:RequiredFieldValidator ID="RFVTipoCambioOC" runat="server" ControlToValidate="TxtTipoCambioOC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Cambio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTipoCambioOC"></asp:RequiredFieldValidator>
@@ -1721,9 +1754,12 @@
<HeaderTemplate>
Clasificación
<br />
Producto/Servicio
</HeaderTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Producto/Servicio SAT" DataField="SATClaveProductoServicio" ItemStyle-Width="60px" ItemStyle-HorizontalAlign="Left" Visible="false" />
@@ -1948,6 +1984,7 @@
<ItemTemplate>
<asp:Label ID="LtlConsecutivo" runat="server" Text='<%# Eval("Consec", "{0:N0}") %>' Font-Size="6pt"></asp:Label></label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
@@ -2040,6 +2077,7 @@
<ItemTemplate>
<asp:Label ID="LtlConsecutivo" runat="server" Text='<%# Eval("Consec", "{0:N0}") %>' Font-Size="6pt"></asp:Label></label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
@@ -2134,6 +2172,8 @@
</th>
<th style="width: 20%">Personal
<br />
<asp:DropDownList ID="DdlPersonalHeader" runat="server" AutoPostBack="true" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal" AppendDataBoundItems="true" Width="100%" CssClass="form-control input-sm select2me">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
@@ -2153,6 +2193,7 @@
<ItemTemplate>
<asp:Label ID="LtlConsecutivo" runat="server" Text='<%# Eval("Consec", "{0:N0}") %>' Font-Size="6pt"></asp:Label></label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
@@ -2319,6 +2360,8 @@
<tr id="TrRembolsoUpdate" runat="server" visible="False">
<td>Rembolso:
<asp:RadioButtonList ID="RblRembolso" OnSelectedIndexChanged="RblRembolso_SelectedIndexChanged" RepeatDirection="Horizontal" runat="server" AutoPostBack="True">
<asp:ListItem Value="1">Personal/Empleado</asp:ListItem>
<asp:ListItem Value="2">Caja Chica</asp:ListItem>
@@ -2589,6 +2632,7 @@
<ItemTemplate>
<asp:Literal ID="LtlDescripcion" runat="server" Text='<%# Eval("Descripcion")%>'></asp:Literal>&nbsp;
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
@@ -2722,12 +2766,14 @@
<ItemTemplate>
<asp:Literal ID="LtlAnticipos" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>&nbsp;
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Mon" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlMoneda" runat="server" Text='<%# Eval("Moneda") %>'></asp:Literal>&nbsp;
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderStyle-HorizontalAlign="Center" HeaderText="Amort." ItemStyle-HorizontalAlign="Right">
@@ -2881,6 +2927,8 @@
<td colspan="2">
<h4>Enviar
<asp:Label ID="lbPS" runat="server" ClientIDMode="Static"></asp:Label>
a otro Almacén </h4>
</td>
@@ -3598,6 +3646,7 @@
<div class="col-md-3" style="text-align: right;">
Tipo Cambio:
</div>
<div class="col-md-4">
<asp:TextBox CssClass="form-control" ID="TxtConvertirPesos" runat="server" Width="100px"></asp:TextBox>
@@ -3839,6 +3888,8 @@
<tr>
<td runat="server" id="tdNumeroReembolso" visible="false">Número de Reembolso:
<asp:TextBox ID="TxtNumeroReembolso" runat="server" Width="100px" />
<asp:RequiredFieldValidator ID="RFVNumeroReembolso" runat="server" ControlToValidate="TxtNumeroReembolso" InitialValue="" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Numero de Reembolso''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCENumeroReembolso" runat="server" HighlightCssClass="vco" TargetControlID="RFVNumeroReembolso" Width="300px"></ajax:ValidatorCalloutExtender>
@@ -4063,6 +4114,7 @@
<ItemTemplate>
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>&nbsp;
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
@@ -4071,6 +4123,7 @@
<ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaDocumento", "{0:d}") %>'></asp:Literal>&nbsp;
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
@@ -4133,6 +4186,7 @@
<div class="col-md-10">
<asp:DropDownList ID="DdlCredito" Width="300px" CssClass="form-control input-sm select2me" DataTextField="ReferenciaImporte" DataValueField="CveCredito" runat="server" AutoPostBack="True"></asp:DropDownList></td>
</div>
</div>
<div class="row" id="DivCreditoMensualidad" runat="server">
@@ -4140,6 +4194,8 @@
<div class="col-md-10">
<asp:DropDownList ID="DdlCreditoDetalle" Width="300px" CssClass="form-control input-sm select2me" DataValueField="CveCreditoDetalle" DataTextField="PeriodoTexto" runat="server"></asp:DropDownList></td>
<asp:RequiredFieldValidator ID="RFVCreditoDetalle" runat="server" ControlToValidate="DdlCreditoDetalle" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Crédito''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpContado"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCECreditoDetalle" runat="server" HighlightCssClass="vco" TargetControlID="RFVCreditoDetalle" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
@@ -4271,6 +4327,8 @@
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="ddlUM" runat="server" CssClass=" form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" Width="100"></asp:DropDownList></td>
<label for="<%= ddlUM.ClientID.ToString()%>">Unidad de Medida:</label>
</div>
</ContentTemplate>
@@ -4414,6 +4472,8 @@
<div class="col-md-6">
<asp:Label ID="Label11" runat="server" Text="Total:"></asp:Label>&nbsp&nbsp$
<asp:Label ID="LblTotalPS" ClientIDMode="Static" runat="server" Text="0.00"></asp:Label>
</div>
@@ -4563,6 +4623,8 @@
<label class="col-md-3">
1
<label id="LbUMActual" class="bold"></label>
Equivale:</label>
<div class="col-md-9">
@@ -4578,6 +4640,7 @@
<button id="btnAgregarUM" onclick="MostrarAgregarUM()" type="button" class="btn btn-default btn-xs" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro de agregar como NUEVA Unidad de Medida?" data-btn-ok-label="si">
Agregar como nueva unidad de medida
</button>
</div>
</div>

View File

@@ -3030,6 +3030,12 @@ Partial Class Compras_Compras
ddlAlmacenAdd.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (1,2,7,14,19)") 'solo muestra tipo material y herramientas
ddlAlmacenAdd.DataBind()
DdlAlmacenDevolucion.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (1,2,7,14,19)") 'solo muestra tipo material y herramientas
DdlAlmacenDevolucion.DataBind()
DdlAlmacenDevolucion.Items.Insert(0, New ListItem("Seleccione", "-1"))
End Sub
Protected Sub CargaFuncionariosEmpleados()
@@ -13767,13 +13773,13 @@ Partial Class Compras_Compras
Private Function guardardevolucion(ObjInventario As ClsInventarios, CveCompra As Integer, subtotal As Double, Fecha As Date) As Boolean
Dim ErrorMovInv As Boolean = False
Dim CveAlmacen As Integer
Dim CveAlmacen As Integer = DdlAlmacenDevolucion.SelectedValue.ToEntero()
Dim subtotaldevolucion As Double = 0
Dim realizadevolucion As Boolean = False
'Calculo los subtotales para comparar con la NC
Dim cantidad As Double = 0.0
For Each Dr As GridViewRow In GVDevolucion.Rows
CveAlmacen = Dr.DataKey("CveAlmacen").ToString.ToEntero
'CveAlmacen = Dr.DataKey("CveAlmacen").ToString.ToEntero
cantidad = Dr.FCTextBox("TxtCantidad").Text.ToDouble
If cantidad > 0 Then
realizadevolucion = True
@@ -13823,12 +13829,24 @@ Partial Class Compras_Compras
Protected Sub DDLDevolucion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DDLDevolucion.SelectedIndexChanged
If DdlTipoComprobante.SelectedValue.Contiene("DEV") Then
DivAlmacenDev.Visible = True
End If
Dim objcompras As New ClsCompras()
If objcompras.GetCompraDetallealmacen(DDLDevolucion.SelectedValue.ToEntero) Then
GVDevolucion.DataSource = objcompras.DtResultados
GVDevolucion.DataBind()
End If
objcompras.Dispose()
Dim CveAlmacen As Integer = -1
For Each GvRow As GridViewRow In GVDevolucion.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
CveAlmacen = GvRow.DataKey("CveAlmacen").ToString.ToEntero
End If
Next
DdlAlmacenDevolucion.SelectedValueExist(CveAlmacen)
UPDevolucion.Update()
End Sub
'Protected Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
@@ -16056,6 +16074,9 @@ Partial Class Compras_Compras
If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
paneldevolucion.Visible = True
Pnlalmaceninventarios.Visible = False
If DdlTipoComprobante.SelectedValue.Contiene("DEV") Then
DivAlmacenDev.Visible = True
End If
cargaddldevoluciones(CveProveedor, TxtSubTotal.Text.ToDouble)
InicializaAplicaNCFact()
DivReembolso.Visible = False
@@ -16063,6 +16084,9 @@ Partial Class Compras_Compras
UpPS.Update()
End If
End If
UPCondicionesPago.Update()
End Sub

View File

@@ -499,6 +499,11 @@ Partial Class Ventas
Return ViewState("CveVenta").ToString.ToEntero
End Get
End Property
Private ReadOnly Property CveSubProyectoVenta As Integer
Get
Return If(IsNothing(ViewState("CveSubProyectoVenta")), -1, ViewState("CveSubProyectoVenta").ToString.ToEntero)
End Get
End Property
Private Property CveVentaPadre As Integer
Get
Return If(IsNothing(ViewState("CveVentaPadre")), -1, ViewState("CveVentaPadre").ToString.ToEntero)
@@ -3561,6 +3566,7 @@ Partial Class Ventas
ObjUsados.Dispose()
End If
ViewState("CveSubProyectoVenta") = DbRowVenta("CveSubProyecto").ToString.ToEntero
Me.CveEstatusFacturaPadre = DbRowVenta("CveEstatusFacturaPadre").ToString.ToEntero
'CargaEncabezado
@@ -4432,6 +4438,8 @@ Partial Class Ventas
DdlTipoRetencion.SelectedValueExist(DbRowVenta("CveTipoRetencion").ToString)
CargaPS(-1, DdlPS)
UpPS.Update()
UpContado.Update()
UpEstatus.Update()
@@ -5570,10 +5578,15 @@ Partial Class Ventas
Objeto.ddl.Items.Insert(0, New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2"))
Objeto.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
Else
If Me.CveVenta > 0 Then
DdlSubProyectoDatos.SelectedValueExist(CveSubProyectoVenta)
End If
Dim cvesubproyecto As String = DdlSubProyectoDatos.SelectedValue
If UsuarioActual.CveEmpresa = 141 Then
cvesubproyecto = "-1"
End If
Objeto.Attributes.Add("data-cvesubproyecto", cvesubproyecto)
Objeto.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString)
Objeto.ddlWS.Attributes.Add("data-pagina", "ventas/ventas")