Registrar compras automaticamente
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -14,7 +14,7 @@ LogTimbrado.txt
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
vwd.webinfo
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
|
||||
@@ -1621,11 +1621,21 @@ Partial Class Compras_Compras
|
||||
' 'End If
|
||||
'End If
|
||||
|
||||
|
||||
'RegistraScript("ScrollVentanaAddProducto();")
|
||||
End Sub
|
||||
|
||||
#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()
|
||||
Dim ObjCGame As New ClsCGame()
|
||||
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
|
||||
|
||||
'------------------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
|
||||
'Credito Multiple
|
||||
If RBLPago.SelectedValue.ToEntero = 4 Then
|
||||
@@ -11170,6 +11208,8 @@ Partial Class Compras_Compras
|
||||
If ChkConsignacion.Checked Then
|
||||
End If
|
||||
|
||||
CargaRegistarEntradaAlmacenAutomatico()
|
||||
|
||||
UpINV.Update()
|
||||
|
||||
End Sub
|
||||
@@ -11222,7 +11262,9 @@ Partial Class Compras_Compras
|
||||
If e.Row.DBCampo("AlmacenRegistrado").ToString = "1" Then
|
||||
e.Row.FCCheckBox("cbInv").Checked = True
|
||||
End If
|
||||
e.Row.FCCheckBox("cbInv").Enabled = False
|
||||
e.Row.FCCheckBox("cbInv").Enabled = False
|
||||
Else
|
||||
|
||||
End If
|
||||
|
||||
'CONSIGNACIONES
|
||||
|
||||
@@ -225,8 +225,8 @@
|
||||
<asp:UpdatePanel runat="server" ID="UpBodyTipoCambio" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:RadioButtonList runat="server" ID="RblTipoCambio" AutoPostBack="true">
|
||||
<asp:ListItem Selected="true" Text="Moneda Original" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Dólares en Tipo Cambio de la Fecha Venta" Value="2"></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="1"></asp:ListItem>
|
||||
<%--<asp:ListItem Text="Tipo Cambio Especifico" Value="3"></asp:ListItem>--%>
|
||||
</asp:RadioButtonList>
|
||||
<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
|
||||
If Not IsPostBack Then
|
||||
TCEspecifico = -1
|
||||
TipoCambio = 1
|
||||
TipoCambio = 2
|
||||
CveSubProyecto = -1
|
||||
TxtFechaInicio.Text = String.Format("01/01/{0}", Now.Year)
|
||||
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 TiposDoc As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM)
|
||||
|
||||
If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then
|
||||
TCEspecifico = TxtEspecifico.Text.ToDecimal
|
||||
Else
|
||||
TCEspecifico = -1
|
||||
End If
|
||||
'If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then
|
||||
' TCEspecifico = TxtEspecifico.Text.ToDecimal
|
||||
'Else
|
||||
' TCEspecifico = -1
|
||||
'End If
|
||||
|
||||
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
|
||||
@@ -174,20 +174,20 @@ Partial Class Ventas_RepIngresos
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("TipoAmortizacion") = "" Then
|
||||
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"
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub RblTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipoCambio.SelectedIndexChanged
|
||||
TipoCambio = RblTipoCambio.SelectedValue.ToEntero
|
||||
If TipoCambio = 3 Then
|
||||
LiEspecifico.Visible = True
|
||||
TCEspecifico = GlobalTipoCambio(Now).ToDecimal
|
||||
TxtEspecifico.Text = TCEspecifico.ToString
|
||||
Else
|
||||
LiEspecifico.Visible = False
|
||||
End If
|
||||
'If TipoCambio = 3 Then
|
||||
' LiEspecifico.Visible = True
|
||||
' TCEspecifico = GlobalTipoCambio(Now).ToDecimal
|
||||
' TxtEspecifico.Text = TCEspecifico.ToString
|
||||
'Else
|
||||
' LiEspecifico.Visible = False
|
||||
'End If
|
||||
UpBodyTipoCambio.Update()
|
||||
End Sub
|
||||
Private Sub BtnTipoCambio_Click(sender As Object, e As EventArgs) Handles BtnTipoCambio.Click
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Service ID="{C0C07587-41A7-46C8-8FBD-3F9C8EBE2DDC}"/>
|
||||
</StartupServices>
|
||||
</VisualWebDeveloper>
|
||||
Reference in New Issue
Block a user