This commit is contained in:
2019-10-16 19:27:30 -07:00
29 changed files with 12545 additions and 6757 deletions

View File

@@ -2658,22 +2658,50 @@
<br />
<asp:TextBox ID="TxtObsPS" runat="server" Height="100%" Width="100%" TextMode="MultiLine" CausesValidation="true" MaxLength="500"></asp:TextBox>
</div>
<div class="col-md-5" id="DivRecepcionUsados" runat="server" visible="false">
<asp:GridView ID="GvRecepcionUsados" runat="server" GridLines="None" ShowHeaderWhenEmpty="true" CssClass="table table-hover table-striped ScrollAD mysmallbtn"
</div>
<br />
<div class="row">
<div class="col-md-12" id="DivRecepcionUsados" runat="server" visible="false">
<asp:GridView ID="GvRecepcionUsados" runat="server" GridLines="None" ShowHeaderWhenEmpty="true" CssClass="table table-hover table-striped ScrollAD mysmallbtn"
data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" data-height="100"
DataKeyNames="CvePSCargo,CveUM,Cargo,CveTamaño">
<Columns>
<asp:BoundField DataField="CodigoPS" HeaderText="Tamaño" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="70%" />
<asp:TemplateField HeaderText="Cantidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="30%" >
<asp:BoundField DataField="CodigoPS" HeaderText="Tamaño" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="35%" />
<asp:TemplateField HeaderText="Cantidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="20%">
<ItemTemplate>
<asp:TextBox ID="TxtCantidad" runat="server" Width="80%"></asp:TextBox>
<asp:TextBox ID="TxtCantidad" CssClass="form-control linewhitsize" runat="server" Width="90%" Height="30px"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTBECantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Modelo" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="30%">
<ItemTemplate>
<asp:DropDownList ID="DdlModeloAuto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="ModeloMarca" DataValueField="CveModeloAuto" >
</asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="BCI" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="25%">
<ItemTemplate>
<asp:DropDownList ID="DdlBCIUsado" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="BCI" DataValueField="CveBCIUsado" Width="90%">
</asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
<%-- <br />
<div class="row">
<div class="col-md-7">
<label>BCI:</label>
<br />
<asp:DropDownList ID="DdlBCIUsado" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="BCI" DataValueField="CveBCIUsado" Width="200px">
</asp:DropDownList>
</div>
</div>--%>
<br />
<div class="form-group form-md-line-input input-iconright">
@@ -3134,8 +3162,7 @@
$("#DivAnticipos").show();
$("#DivAnticipos").center();
}
catch (e)
{ alert(e); }
catch (e) { alert(e); }
}
@@ -3144,8 +3171,7 @@
$("#ModalOtrosConceptos").show();
$("#ModalOtrosConceptos").center();
}
catch (e)
{ alert(e); }
catch (e) { alert(e); }
}
@@ -3155,8 +3181,7 @@
$("#DivEstadoCaja").show();
$("#DivEstadoCaja").center();
}
catch (e)
{ alert(e); }
catch (e) { alert(e); }
}
@@ -3169,8 +3194,7 @@
return false;
}
catch (e)
{ alert(e); }
catch (e) { alert(e); }
}
@@ -3189,8 +3213,7 @@
$get("HdnTipoMovimiento").value = "1";
}
}
catch (e)
{ alert(e); }
catch (e) { alert(e); }
}

View File

@@ -2770,6 +2770,13 @@ Partial Class PV
'Muestra la tabla de tamaños
If drPS("CveTamaño").ToString().ToEntero() > 0 Then
DivRecepcionUsados.Visible = True
If DdlTipoComprobante.SelectedValue <> "Rem" Then
GvRecepcionUsados.Columns(2).Visible = False
GvRecepcionUsados.Columns(3).Visible = False
Else
GvRecepcionUsados.Columns(2).Visible = True
GvRecepcionUsados.Columns(3).Visible = True
End If
End If
DdlUnidadMedida.Items.Clear()
@@ -3598,6 +3605,7 @@ Partial Class PV
Private Sub CargaAgregar()
Modalidad = "A"
LnkAgregarPS.Text = "Agregar"
CargaBCI()
LimpiaAgregar()
LimpiaAjuste()
ModalidadAjuste = "A"
@@ -3606,6 +3614,16 @@ Partial Class PV
UpVenta.Update()
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddVenta"))
End Sub
Private Sub CargaBCI()
'Dim ObjGral As New ClsGenerales
'If ObjGral.BCIUsadoGet(UsuarioActual.CveEmpresa) Then
' DdlBCIUsado.DataSource = ObjGral.DtResultados
'End If
'DdlBCIUsado.Items.Insert(0, New ListItem("Seleccione", "-1"))
'DdlBCIUsado.SelectedValueExist(-1)
'DdlBCIUsado.DataBind()
End Sub
Public Sub Edit_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Modalidad = "U"
@@ -4893,6 +4911,7 @@ Partial Class PV
GvRecepcionUsados.DataSource = DtTamanios
GvRecepcionUsadosModal.DataSource = DtTamanios
DdlFolioGarantia.DataBind()
DdlTipoUso.DataBind()
DdlTipoDefecto.DataBind()
@@ -4908,6 +4927,25 @@ Partial Class PV
DivChkAjuste.Visible = True
End Sub
Protected Sub GvRecepcionUsados_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvRecepcionUsados.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim ObjGral As New ClsGenerales
If ObjGral.BCIUsadoGet(UsuarioActual.CveEmpresa) Then
e.Row.FCDropDownList("DdlBCIUsado").DataSource = ObjGral.DtResultados
End If
'DdlBCIUsado.Items.Insert(0, New ListItem("Seleccione", "-1"))
'DdlBCIUsado.SelectedValueExist(-1)
e.Row.FCDropDownList("DdlBCIUsado").DataBind()
'e.Row.FCDropDownList("DdlBCIUsado").SelectedValue = e.Row.DBCampo("CveBCIUsado")
If ObjGral.ModelosAutosGet(UsuarioActual.CveEmpresa) Then
e.Row.FCDropDownList("DdlModeloAuto").DataSource = ObjGral.DtResultados
End If
e.Row.FCDropDownList("DdlModeloAuto").DataBind()
End If
End Sub
Private Sub CargaPSAjuste()
DdlPSAjuste.Items.Clear()
DtPUFacturas.Rows.Clear()
@@ -5266,6 +5304,8 @@ Partial Class PV
TmpDTRecepcionUsados.Columns.Add("CveUM", GetType(Integer))
TmpDTRecepcionUsados.Columns.Add("CveVentaDetalle", GetType(Integer))
TmpDTRecepcionUsados.Columns.Add("PU", GetType(Double))
TmpDTRecepcionUsados.Columns.Add("CveBCIUsado", GetType(Integer))
TmpDTRecepcionUsados.Columns.Add("CveModeloAuto", GetType(Integer))
End Sub
Protected Sub BtnRecepcionUsados_Click(sender As Object, e As EventArgs)
@@ -5308,6 +5348,8 @@ Partial Class PV
Row("CveUM") = Gvr.DataKey("CveUM").ToEntero
Row("CveVentaDetalle") = -1
Row("PU") = Gvr.DataKey("Cargo").ToDouble
Row("CveBCIUsado") = Gvr.FCDropDownList("DdlBCIUsado").SelectedValue.ToEntero
Row("CveModeloAuto") = Gvr.FCDropDownList("DdlModeloAuto").SelectedValue.ToEntero
TmpDTRecepcionUsados.Rows.Add(Row)
End If

View File

@@ -3442,7 +3442,7 @@ Partial Class Ventas
LblAlertRefacInv.Visible = True
End If
If DdlTipoComprobante.SelectedValue.Contiene("Egs", "Ing", "Ant", "Dev", "Rem", "DPe") AndAlso Not CveEstatus.Contiene(4, 5, 12, 13, 20) Then
If DdlTipoComprobante.SelectedValue.Contiene("Egs", "Ing", "Ant", "Dev", "Rem", "DPe", "RNC") AndAlso Not CveEstatus.Contiene(4, 5, 12, 13, 20) Then
If UsuarioActual.TienePermisoProceso(159) Then
Dim TienePermiso As String = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, -1).FiltroPrimeroValor("CveSubProyecto", String.Format("CveSubProyecto = {0}", DbRowVenta("CveSubProyecto")))
If TienePermiso <> "" Then
@@ -14976,6 +14976,7 @@ Partial Class Ventas
Else
OcurrioError = True
Alert("Error traspaso almacen(sin Movtos. Detalle). Por favor comuniquese con atención SIG.", TipoMensaje.ToastError)
End If
MovDetalle.Dispose()
@@ -15117,6 +15118,7 @@ Partial Class Ventas
Dim CveVentaDetalle = If(ConceptoEntrada = 3, TmpDT.FiltroPrimeroValor("CveVentaDetalle", $"Consec={Consec}").ToEntero, MovDet("CveVentaDetalle").ToString.ToEntero)
'CUANDO LA VENTADETALLE NO TENGA VALOR DEBE MARCAR ERROR, NUEVA RESTRICCION DE ALMACEN
If CveVentaDetalle < 0 Then
Alert("no se encontro la venta detalle. Por favor comuniquese con atención SIG.", TipoMensaje.ToastError)
OcurrioError = True
Exit For
End If
@@ -15175,6 +15177,7 @@ Partial Class Ventas
'End If
Catch ex As Exception
OcurrioError = True
Alert("Error inesperado (15147). Por favor comuniquese con atención SIG.", TipoMensaje.ToastError)
End Try
Cont += 1
Next
@@ -17681,7 +17684,7 @@ Partial Class Ventas
'End If
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Dev", "Egs") Then
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Dev", "Egs", "RNC") Then
Dim sb As New StringBuilder()
sb.Append("La factura se encuentra en el siguiente estatus del SAT:<br/>")