Registrar compras automaticamente
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -14,7 +14,7 @@ LogTimbrado.txt
|
|||||||
*.user
|
*.user
|
||||||
*.userosscache
|
*.userosscache
|
||||||
*.sln.docstates
|
*.sln.docstates
|
||||||
|
vwd.webinfo
|
||||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||||
*.userprefs
|
*.userprefs
|
||||||
|
|
||||||
|
|||||||
@@ -1621,11 +1621,21 @@ Partial Class Compras_Compras
|
|||||||
' 'End If
|
' 'End If
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
|
|
||||||
'RegistraScript("ScrollVentanaAddProducto();")
|
'RegistraScript("ScrollVentanaAddProducto();")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "C A R G A S"
|
#Region "C A R G A S"
|
||||||
|
Private Sub CargaRegistarEntradaAlmacenAutomatico()
|
||||||
|
'REGISTRA ENTRADA DE ALMACÉN EN AUTOMÁTICO
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(585) = "1" Then
|
||||||
|
GvInv.HeaderRow.FCCheckBox("cbAll").Checked = True
|
||||||
|
For Each GvRow As GridViewRow In GvInv.Rows
|
||||||
|
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||||
|
GvRow.FCCheckBox("cbInv").Checked = True
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
Private Sub CargaOrdenCorte()
|
Private Sub CargaOrdenCorte()
|
||||||
Dim ObjCGame As New ClsCGame()
|
Dim ObjCGame As New ClsCGame()
|
||||||
If ObjCGame.GetOrdenCorte(UsuarioActual.CveEmpresa) Then
|
If ObjCGame.GetOrdenCorte(UsuarioActual.CveEmpresa) Then
|
||||||
@@ -3847,6 +3857,34 @@ Partial Class Compras_Compras
|
|||||||
Protected Sub BtnGuardar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnGuardar.Click
|
Protected Sub BtnGuardar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnGuardar.Click
|
||||||
|
|
||||||
'------------------INICIA VALIDACIONES------------------
|
'------------------INICIA VALIDACIONES------------------
|
||||||
|
'REGISTRA ENTRADA DE ALMACÉN EN AUTOMÁTICO
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(585) = "1" Then
|
||||||
|
|
||||||
|
If Not GvInv.HeaderRow.FCCheckBox("cbAll").Checked Then
|
||||||
|
Alert("Debe seleccionar aplicar el inventario", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If GvInv.HeaderRow.FCDropDownList("ddlAlmacen").SelectedValue.ToEntero() <= 0 Then
|
||||||
|
Alert("Debe seleccionar un almacen para el inventario", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
For Each GvRow As GridViewRow In GvInv.Rows
|
||||||
|
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||||
|
If Not GvRow.FCCheckBox("cbInv").Checked Then
|
||||||
|
Alert("Debe seleccionar todos los productos para el inventario", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If GvRow.FCDropDownList("ddlEAlmacen").SelectedValue.ToEntero() <= 0 Then
|
||||||
|
Alert("Debe seleccionar un almacen para todos los productos para el inventario", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
Dim EstatusCredito As Integer = 0
|
Dim EstatusCredito As Integer = 0
|
||||||
'Credito Multiple
|
'Credito Multiple
|
||||||
If RBLPago.SelectedValue.ToEntero = 4 Then
|
If RBLPago.SelectedValue.ToEntero = 4 Then
|
||||||
@@ -11170,6 +11208,8 @@ Partial Class Compras_Compras
|
|||||||
If ChkConsignacion.Checked Then
|
If ChkConsignacion.Checked Then
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
CargaRegistarEntradaAlmacenAutomatico()
|
||||||
|
|
||||||
UpINV.Update()
|
UpINV.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -11222,7 +11262,9 @@ Partial Class Compras_Compras
|
|||||||
If e.Row.DBCampo("AlmacenRegistrado").ToString = "1" Then
|
If e.Row.DBCampo("AlmacenRegistrado").ToString = "1" Then
|
||||||
e.Row.FCCheckBox("cbInv").Checked = True
|
e.Row.FCCheckBox("cbInv").Checked = True
|
||||||
End If
|
End If
|
||||||
e.Row.FCCheckBox("cbInv").Enabled = False
|
e.Row.FCCheckBox("cbInv").Enabled = False
|
||||||
|
Else
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'CONSIGNACIONES
|
'CONSIGNACIONES
|
||||||
|
|||||||
@@ -225,8 +225,8 @@
|
|||||||
<asp:UpdatePanel runat="server" ID="UpBodyTipoCambio" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" ID="UpBodyTipoCambio" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:RadioButtonList runat="server" ID="RblTipoCambio" AutoPostBack="true">
|
<asp:RadioButtonList runat="server" ID="RblTipoCambio" AutoPostBack="true">
|
||||||
<asp:ListItem Selected="true" Text="Moneda Original" Value="1"></asp:ListItem>
|
<asp:ListItem Selected="true" Text="Moneda Original" Value="2"></asp:ListItem>
|
||||||
<asp:ListItem Text="Dólares en Tipo Cambio de la Fecha Venta" Value="2"></asp:ListItem>
|
<asp:ListItem Text="Dólares en Tipo Cambio de la Fecha Venta" Value="1"></asp:ListItem>
|
||||||
<%--<asp:ListItem Text="Tipo Cambio Especifico" Value="3"></asp:ListItem>--%>
|
<%--<asp:ListItem Text="Tipo Cambio Especifico" Value="3"></asp:ListItem>--%>
|
||||||
</asp:RadioButtonList>
|
</asp:RadioButtonList>
|
||||||
<div class="row" style="margin-left: 10px;" runat="server" id="LiEspecifico" visible="false">
|
<div class="row" style="margin-left: 10px;" runat="server" id="LiEspecifico" visible="false">
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ Partial Class Ventas_RepIngresos
|
|||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
TCEspecifico = -1
|
TCEspecifico = -1
|
||||||
TipoCambio = 1
|
TipoCambio = 2
|
||||||
CveSubProyecto = -1
|
CveSubProyecto = -1
|
||||||
TxtFechaInicio.Text = String.Format("01/01/{0}", Now.Year)
|
TxtFechaInicio.Text = String.Format("01/01/{0}", Now.Year)
|
||||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||||
@@ -107,11 +107,11 @@ Partial Class Ventas_RepIngresos
|
|||||||
Dim Cves_Subprotectos As String = If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM)
|
Dim Cves_Subprotectos As String = If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM)
|
||||||
Dim TiposDoc As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM)
|
Dim TiposDoc As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM)
|
||||||
|
|
||||||
If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then
|
'If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then
|
||||||
TCEspecifico = TxtEspecifico.Text.ToDecimal
|
' TCEspecifico = TxtEspecifico.Text.ToDecimal
|
||||||
Else
|
'Else
|
||||||
TCEspecifico = -1
|
' TCEspecifico = -1
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
Dim ObjRepI As New ClsVentas()
|
Dim ObjRepI As New ClsVentas()
|
||||||
If ObjRepI.RepIngresos(UsuarioActual.CveEmpresa, If(RsFechaI = "-1", MinFecha, RsFechaI.ToDate), If(RsFechaF = "-1", MaxFecha, RsFechaF.ToDate), TiposDoc, Cves_Subprotectos, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico) Then
|
If ObjRepI.RepIngresos(UsuarioActual.CveEmpresa, If(RsFechaI = "-1", MinFecha, RsFechaI.ToDate), If(RsFechaF = "-1", MaxFecha, RsFechaF.ToDate), TiposDoc, Cves_Subprotectos, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico) Then
|
||||||
@@ -174,20 +174,20 @@ Partial Class Ventas_RepIngresos
|
|||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
If e.Row.DBCampo("TipoAmortizacion") = "" Then
|
If e.Row.DBCampo("TipoAmortizacion") = "" Then
|
||||||
e.Row.CssClass = "Totales"
|
e.Row.CssClass = "Totales"
|
||||||
ElseIf e.Row.DBCampo("TipoAmortizacion") <> "" AndAlso e.Row.DBCampo("CveConceptoContable") = "-1" Then
|
ElseIf e.Row.DBCampo("TipoAmortizacion") <> "" AndAlso e.Row.DBCampo("CveConceptoContable") = "" Then
|
||||||
e.Row.CssClass = "SubTotales"
|
e.Row.CssClass = "SubTotales"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub RblTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipoCambio.SelectedIndexChanged
|
Private Sub RblTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipoCambio.SelectedIndexChanged
|
||||||
TipoCambio = RblTipoCambio.SelectedValue.ToEntero
|
TipoCambio = RblTipoCambio.SelectedValue.ToEntero
|
||||||
If TipoCambio = 3 Then
|
'If TipoCambio = 3 Then
|
||||||
LiEspecifico.Visible = True
|
' LiEspecifico.Visible = True
|
||||||
TCEspecifico = GlobalTipoCambio(Now).ToDecimal
|
' TCEspecifico = GlobalTipoCambio(Now).ToDecimal
|
||||||
TxtEspecifico.Text = TCEspecifico.ToString
|
' TxtEspecifico.Text = TCEspecifico.ToString
|
||||||
Else
|
'Else
|
||||||
LiEspecifico.Visible = False
|
' LiEspecifico.Visible = False
|
||||||
End If
|
'End If
|
||||||
UpBodyTipoCambio.Update()
|
UpBodyTipoCambio.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub BtnTipoCambio_Click(sender As Object, e As EventArgs) Handles BtnTipoCambio.Click
|
Private Sub BtnTipoCambio_Click(sender As Object, e As EventArgs) Handles BtnTipoCambio.Click
|
||||||
|
|||||||
@@ -23,6 +23,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Service ID="{C0C07587-41A7-46C8-8FBD-3F9C8EBE2DDC}"/>
|
<Service ID="{C0C07587-41A7-46C8-8FBD-3F9C8EBE2DDC}"/>
|
||||||
</StartupServices>
|
</StartupServices>
|
||||||
</VisualWebDeveloper>
|
</VisualWebDeveloper>
|
||||||
Reference in New Issue
Block a user