Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -170,7 +170,7 @@
|
||||
|
||||
|
||||
<div class="row">
|
||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-2"></asp:Label>
|
||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-2" Text="SubProyecto"></asp:Label>
|
||||
<div class="col-md-9" style="padding-left: 5px;">
|
||||
<asp:DropDownList runat="server" ID="DdlSubProyecto" CssClass="select2me" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlSubProyecto" runat="server" InitialValue="-1" ControlToValidate="DdlSubProyecto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
@@ -205,7 +205,7 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:CheckBox ID="ChkEmitirTimbrado" runat="server" CssClass="chksino" Text=" " OnCheckedChanged="ChkEmitirTimbrado_CheckedChanged" AutoPostBack="true" Enabled="false" />
|
||||
<asp:CheckBox ID="ChkEmitirTimbrado" runat="server" CssClass="chksino" Text=" " Checked="true" OnCheckedChanged="ChkEmitirTimbrado_CheckedChanged" AutoPostBack="true" Enabled="false" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:CheckBox ID="ChkEmitirCartaPorte" Checked="true" runat="server" Text="Carta Porte" Visible="true" Enabled="false" /></td>
|
||||
|
||||
@@ -294,8 +294,10 @@ Partial Class Inventarios_CartaPorteManual
|
||||
|
||||
|
||||
Private Sub CargaCombos()
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto, AplicaTodos:="")
|
||||
'CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto, AplicaTodos:="")
|
||||
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1).FiltraParametros("EsSucursal = True ")
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
|
||||
DdlChofer.DataSource = GlobalDTChoferes(UsuarioActual.CveEmpresa)
|
||||
|
||||
@@ -185,53 +185,7 @@
|
||||
<asp:RequiredFieldValidator InitialValue="-1" ID="RfvConcepto" Display="None" ValidationGroup="GrpGuardar" runat="server" ControlToValidate="DdlConcepto" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoConcepto" runat="server" HighlightCssClass="vco" TargetControlID="RfvConcepto" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div id="DivCliente" runat="server" visible="false">
|
||||
<label class="col-md-1 truncate" style="width: 110px">Cliente:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlClientes" AutoPostBack="true" OnSelectedIndexChanged="DdlClientes_SelectedIndexChanged" AppendDataBoundItems="true" runat="server" CssClass="form-control input-sm select2me" DataTextField="NombreComercial" DataValueField="CveCliente"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="DivClienteSucursal" runat="server" visible="false">
|
||||
<label class="col-md-1 truncate" style="width: 110px">Sucursal:</label>
|
||||
<div class="col-md-2 " id="DivDdlClienteSucursal" runat="server">
|
||||
<asp:DropDownList ID="DdlClientesSucursales" AutoPostBack="true" AppendDataBoundItems="true" runat="server" CssClass="form-control input-sm select2me" Style="max-width: 200px" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator InitialValue="-1" ID="RfvSucursalCliente" Display="None" ValidationGroup="GrpGuardar" runat="server" ControlToValidate="DdlClientesSucursales" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Sucursal''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoClienteSucursal" runat="server" HighlightCssClass="vco" TargetControlID="RfvSucursalCliente" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div id="DivVendedor" runat="server" visible="false">
|
||||
<label class="col-md-1 truncate" style="width: 110px">Vendedor:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:Label ID="LblVendedor" runat="server" Text=""></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="DivDepartamentoEntrega" runat="server" visible="False">
|
||||
<label class="col-md-1 truncate" style="width: 110px">
|
||||
<asp:Label runat="server" ID="LblDepartamentoEntrega"> Depto. entrega:</asp:Label>
|
||||
</label>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox ID="TxtDepartamentoEntrega" runat="server" MaxLength="50" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" style="width: 110px">
|
||||
<asp:Label runat="server" ID="LblPedidoContrato">Con./Pedido:</asp:Label>
|
||||
</label>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox ID="TxtPedidoContrato" runat="server" MaxLength="50" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate" style="width: 110px">Fecha:</label>
|
||||
@@ -277,6 +231,49 @@
|
||||
<asp:Literal ID="LtlAlmacenDestino" runat="server"></asp:Literal>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="DivCliente" runat="server" visible="false">
|
||||
<div >
|
||||
<label class="col-md-1 truncate" style="width: 110px">Cliente:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlClientes" AutoPostBack="true" OnSelectedIndexChanged="DdlClientes_SelectedIndexChanged" AppendDataBoundItems="true" runat="server" CssClass="form-control input-sm select2me" DataTextField="NombreComercial" DataValueField="CveCliente"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="DivClienteSucursal" runat="server" visible="false">
|
||||
<label class="col-md-1 truncate" style="width: 110px">Sucursal:</label>
|
||||
<div class="col-md-2 " id="DivDdlClienteSucursal" runat="server">
|
||||
<asp:DropDownList ID="DdlClientesSucursales" AutoPostBack="true" AppendDataBoundItems="true" runat="server" CssClass="form-control input-sm select2me" Style="max-width: 200px" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator InitialValue="-1" ID="RfvSucursalCliente" Display="None" ValidationGroup="GrpGuardar" runat="server" ControlToValidate="DdlClientesSucursales" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Sucursal''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoClienteSucursal" runat="server" HighlightCssClass="vco" TargetControlID="RfvSucursalCliente" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="DivVendedor" runat="server" visible="false">
|
||||
<label class="col-md-1 truncate" style="width: 110px">Vendedor:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:Label ID="LblVendedor" runat="server" Text=""></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="DivDepartamentoEntrega" runat="server" visible="False">
|
||||
<label class="col-md-1 truncate" style="width: 110px">
|
||||
<asp:Label runat="server" ID="LblDepartamentoEntrega"> Depto. entrega:</asp:Label>
|
||||
</label>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox ID="TxtDepartamentoEntrega" runat="server" MaxLength="50" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" style="width: 110px">
|
||||
<asp:Label runat="server" ID="LblPedidoContrato">Con./Pedido:</asp:Label>
|
||||
</label>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox ID="TxtPedidoContrato" runat="server" MaxLength="50" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="divMonedaSeccion" runat="server" visible="False">
|
||||
<label class="col-md-1 truncate" style="width: 110px">Moneda:</label>
|
||||
<div class="col-md-2 ">
|
||||
@@ -286,8 +283,8 @@
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div id="divGuia" runat="server" visible="False">
|
||||
|
||||
<div class="row" id="divGuia" runat="server" visible="False">
|
||||
<label class="col-md-1 truncate" style="width: 110px">
|
||||
<asp:Label runat="server" ID="LblGuia">Guía:</asp:Label>
|
||||
</label>
|
||||
@@ -300,9 +297,9 @@
|
||||
<asp:TextBox runat="server" Text="" ID="TxtResponsable" Width="100%" />
|
||||
<%--<asp:DropDownList ID="DdlResponsable" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" CssClass="form-control input-sm" Style="width: 200px !important;"></asp:DropDownList>--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate" style="width: 110px">
|
||||
Observaciones:
|
||||
@@ -454,33 +451,27 @@
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate">
|
||||
Usuario:
|
||||
|
||||
|
||||
<label class="col-md-4 truncate">
|
||||
Usuario:
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-8">
|
||||
<asp:Label ID="LblUsuarioRegistro" runat="server"></asp:Label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row" style="margin-top: 10px;">
|
||||
<label class="col-md-3 truncate">
|
||||
Fecha:
|
||||
|
||||
|
||||
<div class="row" style="margin-top: 5px;">
|
||||
<label class="col-md-4 truncate">
|
||||
Fecha:
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-8">
|
||||
<asp:Label ID="LblFechaRegistro" runat="server"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 10px;">
|
||||
<label class="col-md-3 truncate">
|
||||
<div class="row" style="margin-top: 5px;">
|
||||
<label class="col-md-4 truncate">
|
||||
Referencia:
|
||||
|
||||
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-8">
|
||||
<asp:HyperLink ID="HplCompra" Target="_blank" runat="server" Visible="False" CssClass="Texto">Ver Compra</asp:HyperLink>
|
||||
<asp:HyperLink ID="HplVenta" Target="_blank" runat="server" Visible="False" CssClass="Texto">Ver Venta</asp:HyperLink>
|
||||
<asp:HyperLink ID="HplPoliza" Target="_blank" runat="server" Visible="False" CssClass="Texto">Ver Póliza</asp:HyperLink>
|
||||
@@ -488,35 +479,38 @@
|
||||
<asp:HiddenField ID="HdnCveOrdenCompra" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" runat="server" id="RowConsignacion" visible="false" style="margin-top: 10px;">
|
||||
<label class="col-md-3 truncate">
|
||||
Consignación:
|
||||
|
||||
<div class="row" runat="server" id="RowConsignacion" visible="false" style="margin-top: 5px;">
|
||||
<label class="col-md-4 truncate">
|
||||
Consignación:
|
||||
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-8">
|
||||
<asp:HyperLink ID="HLConsignacion" Target="_blank" NavigateUrl="#" Text="" runat="server" />
|
||||
<%--<asp:Label Text="" ID="LbConsignacion" runat="server" />--%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" runat="server" id="RowTipoCambio" visible="false" style="margin-top: 10px;">
|
||||
<label class="col-md-3 truncate">
|
||||
<div class="row" runat="server" id="RowTipoCambio" visible="false" style="margin-top: 5px;">
|
||||
<label class="col-md-4 truncate">
|
||||
Tipo Cambio:
|
||||
|
||||
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-8">
|
||||
<asp:Label Text="" ID="LbTipoCambio" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" runat="server" id="RowMtoRel" visible="false" style="margin-top: 10px;">
|
||||
<label class="col-md-3 truncate">
|
||||
Mto. Rel.:
|
||||
|
||||
|
||||
<div class="row" runat="server" id="RowMtoRel" visible="false" style="margin-top: 5px;">
|
||||
<label class="col-md-4 truncate">
|
||||
Mto. Rel.:
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<asp:HyperLink ID="lnkMtoRelaioando" CssClass="Texto" runat="server" Target="_blank">ver</asp:HyperLink>
|
||||
<div class="col-md-8">
|
||||
<asp:HyperLink ID="lnkMtoRelacionado" CssClass="Texto" runat="server" Target="_blank">ver</asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" runat="server" id="DivMovtoVirtual" visible="false" style="margin-top: 5px;">
|
||||
<label class="col-md-4 truncate">
|
||||
Mto. Virtual.:
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<asp:HyperLink ID="HplMtoVirtual" CssClass="Texto" runat="server" Target="_blank">Virtual</asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -724,12 +724,12 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Dim TMDsTR = DtMov.Rows(0)("CveMtoRel").ToString
|
||||
If DtMov.Rows(0)("CveMtoRel").ToString.Length > 0 Then
|
||||
RowMtoRel.Visible = True
|
||||
lnkMtoRelacionado.NavigateUrl = "/Inventarios/EntradasSalidas.aspx?CveMovimiento=" & DtMov.Rows(0)("CveMtoRel").ToString
|
||||
End If
|
||||
|
||||
lnkMtoRelaioando.NavigateUrl = "./EntradasSalidas.aspx?CveMovimiento=" & DtMov.Rows(0)("CveMtoRel").ToString
|
||||
'lnkMtoRelaioando.Attributes.Add("hreh", "./EntradasSalidas.aspx?CveMoviento=" & DtMov.Rows(0)("CveMtoRel").ToString)
|
||||
'lnkMtoRelaioando.Attributes.Add("target", "_blank")
|
||||
Else
|
||||
RowMtoRel.Visible = False
|
||||
If Mov.CveMovimientoVirtual > 0 Then
|
||||
DivMovtoVirtual.Visible = True
|
||||
HplMtoVirtual.NavigateUrl = "/Inventarios/EntradasSalidas.aspx?CveMovimiento=" & Mov.CveMovimientoVirtual
|
||||
End If
|
||||
|
||||
If (DdlAlmacen.Items.FindByValue(Mov.CveAlmacen.ToString()) Is Nothing) Then
|
||||
@@ -944,13 +944,12 @@ Partial Class Inventarios_EntradasSalidas
|
||||
DdlClientesSucursales.SelectedValueExist(Mov.CveClienteSucursal.ToString)
|
||||
End If
|
||||
|
||||
'DivDepartamentoEntrega.Visible = True
|
||||
'TxtDepartamentoEntrega.Enabled = False
|
||||
'TxtDepartamentoEntrega.Text = Mov.DepartamentoEntrega
|
||||
|
||||
DivDepartamentoEntrega.Visible = True
|
||||
TxtDepartamentoEntrega.Enabled = False
|
||||
TxtDepartamentoEntrega.Text = Mov.DepartamentoEntrega
|
||||
|
||||
TxtPedidoContrato.Enabled = False
|
||||
TxtPedidoContrato.Text = Mov.PedidoContrato
|
||||
'TxtPedidoContrato.Enabled = False
|
||||
'TxtPedidoContrato.Text = Mov.PedidoContrato
|
||||
|
||||
If Mov.CveProveedor > 0 Then
|
||||
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, Mov.CveProveedor)
|
||||
@@ -3781,45 +3780,51 @@ Partial Class Inventarios_EntradasSalidas
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Else
|
||||
If ObjInventario.Modulo = "ASA/G1" Then
|
||||
If ObjInventario.Modulo.Contiene("Consig") Then
|
||||
Contabilizable = False
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 95, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoRelacionado, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Else
|
||||
If ObjInventario.Modulo = "ASA/G1" Then
|
||||
Contabilizable = False
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoRelacionado, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Else
|
||||
If DdlConcepto.SelectedValue.Contiene("6", "22", "23", "7", "16", "21", "24") Then
|
||||
'genero las prepolizas manuales
|
||||
Dim tCveConcepto As Integer = 95
|
||||
Dim CveCuenta As Integer
|
||||
If UsuarioActual.CveEmpresa = 119 Then CveCuenta = 55519
|
||||
IdCtaContable = 1
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total"), Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=-1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUMD("Total"), CveSubProyecto:=-1, CveCuenta:=CveCuenta, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue.ToEntero}").ToEntero
|
||||
Dim tCveConcepto As Integer = 69
|
||||
If DdlConcepto.SelectedValue = "30" Then
|
||||
tCveConcepto = 181
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(342).ToEntero
|
||||
End If
|
||||
|
||||
For Each RowInv As DataRow In tmpCostos.Rows
|
||||
ValorInventario = DtCostos.SUM("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal.RoundSQL
|
||||
If tCveConcepto = 69 Then
|
||||
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ValorInventario, Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ValorInventario, CveSubProyecto:=tCveSubProyecto) Then
|
||||
If DdlConcepto.SelectedValue.Contiene("6", "22", "23", "7", "16", "21", "24") Then
|
||||
'genero las prepolizas manuales
|
||||
Dim tCveConcepto As Integer = 95
|
||||
Dim CveCuenta As Integer
|
||||
If UsuarioActual.CveEmpresa = 119 Then CveCuenta = 55519
|
||||
IdCtaContable = 1
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total"), Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=-1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUMD("Total"), CveSubProyecto:=-1, CveCuenta:=CveCuenta, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
Else
|
||||
|
||||
Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue.ToEntero}").ToEntero
|
||||
Dim tCveConcepto As Integer = 69
|
||||
If DdlConcepto.SelectedValue = "30" Then
|
||||
tCveConcepto = 181
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(342).ToEntero
|
||||
End If
|
||||
|
||||
For Each RowInv As DataRow In tmpCostos.Rows
|
||||
ValorInventario = DtCostos.SUM("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal.RoundSQL
|
||||
If tCveConcepto = 69 Then
|
||||
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ValorInventario, Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ValorInventario, CveSubProyecto:=tCveSubProyecto) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -4456,8 +4461,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
|
||||
ObjConta.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa)
|
||||
@@ -4470,12 +4473,15 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
Dim RetornoVirtual As MMovimientoVirtual = Nothing
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
RetornoVirtual = GenerarMovimientoVirtual(CveMovimiento, ObjInventario)
|
||||
If CveMovimientoSalida > 0 Then RetornoVirtual = GenerarMovimientoVirtual(CveMovimientoSalida, ObjInventario)
|
||||
|
||||
If RetornoVirtual IsNot Nothing Then ErrorMovInv = RetornoVirtual.TieneError
|
||||
|
||||
If CveMovimientoEntrada > 0 AndAlso Not ErrorMovInv Then RetornoVirtual = GenerarMovimientoVirtual(CveMovimientoEntrada, ObjInventario)
|
||||
|
||||
If RetornoVirtual IsNot Nothing Then ErrorMovInv = RetornoVirtual.TieneError
|
||||
End If
|
||||
|
||||
If RetornoVirtual IsNot Nothing Then
|
||||
ErrorMovInv = RetornoVirtual.TieneError
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
ObjInventario.Commit() ' aplica los movimientos insertados
|
||||
@@ -5266,7 +5272,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function GenerarMovimientoVirtual(CveMovimiento As Integer, ObjInventario As ClsInventarios) As MMovimientoVirtual
|
||||
Private Function GenerarMovimientoVirtual(CveMovimiento As Integer, ByRef ObjInventario As ClsInventarios) As MMovimientoVirtual
|
||||
Dim ErrorMovInv As Boolean = False
|
||||
|
||||
Dim DtPSVirtual As New DataTable("DtTamanios")
|
||||
|
||||
@@ -587,6 +587,26 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
End If
|
||||
End If
|
||||
|
||||
'Dim Concepto As String = ConceptoPoliza
|
||||
'Dim CvePrePoliza = ObjConta.AddPrePolizas("RA-01", 74, DtCostos.SUM("Total"), DtCostos.SUM("Total"), 1, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
'Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
|
||||
|
||||
'If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ValorInventario, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ValorInventario, CveSubProyecto:=tCveSubProyecto, Contabilizable:=EsContabilizable) Then
|
||||
' Retorno = False
|
||||
'End If
|
||||
|
||||
'If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, MovAlmacen, ValorInventario, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ValorInventario, Contabilizable:=If(CveTipoCompra = 10, False, EsContabilizable)) Then
|
||||
' Retorno = False
|
||||
'End If
|
||||
|
||||
|
||||
'If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then
|
||||
' If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
' GuardaLogAD($"Inventarios/RecepcionAlmacen-PPCompOC | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
' Retorno = False
|
||||
' End If
|
||||
'End If
|
||||
|
||||
Case 2 'DESARMADO
|
||||
|
||||
|
||||
|
||||
@@ -212,11 +212,11 @@
|
||||
DataKeyNames="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal,Codigo,Codigo2,PS"
|
||||
ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||
<Columns>
|
||||
<asp:HyperLinkField DataNavigateUrlFields="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal" DataNavigateUrlFormatString="~/Inventarios/RepExistenciasCostos.aspx?CvePS={0}&CveMoneda={1}&CveProveedor={2}&CveConcepto={3}&FechaI={4}&FechaF={5}&CveAlmacen={6}&CvePersonal={7}" Target="_blank" ItemStyle-Width="10%" HeaderText="Código" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataTextField="Codigo" />
|
||||
<asp:HyperLinkField DataNavigateUrlFields="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal" DataNavigateUrlFormatString="~/Inventarios/RepExistenciasCostos.aspx?CvePS={0}&CveMoneda={1}&CveProveedor={2}&CveConcepto={3}&FechaI={4}&FechaF={5}&CveAlmacen={6}&CvePersonal={7}" Target="_blank" ItemStyle-Width="10%" HeaderText="Código2" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" Visible="False" DataTextField="Codigo2" />
|
||||
<asp:HyperLinkField DataNavigateUrlFields="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal,Tipo" DataNavigateUrlFormatString="~/Inventarios/RepExistenciasCostos.aspx?CvePS={0}&CveMoneda={1}&CveProveedor={2}&CveConcepto={3}&FechaI={4}&FechaF={5}&CveAlmacen={6}&CvePersonal={7}&Tipo={8}" Target="_blank" ItemStyle-Width="10%" HeaderText="Código" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataTextField="Codigo" />
|
||||
<asp:HyperLinkField DataNavigateUrlFields="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal,Tipo" DataNavigateUrlFormatString="~/Inventarios/RepExistenciasCostos.aspx?CvePS={0}&CveMoneda={1}&CveProveedor={2}&CveConcepto={3}&FechaI={4}&FechaF={5}&CveAlmacen={6}&CvePersonal={7}&Tipo={8}" Target="_blank" ItemStyle-Width="10%" HeaderText="Código2" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" Visible="False" DataTextField="Codigo2" />
|
||||
<asp:BoundField Visible="false" DataField="CodigoBarras" HeaderText="CodigoBarras" ItemStyle-Width="10%" />
|
||||
<asp:BoundField Visible="false" DataField="Clasificacion" HeaderText="Clasificación 2" ItemStyle-Width="7%" />
|
||||
<asp:HyperLinkField DataNavigateUrlFields="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal" DataNavigateUrlFormatString="~/Inventarios/RepExistenciasCostos.aspx?CvePS={0}&CveMoneda={1}&CveProveedor={2}&CveConcepto={3}&FechaI={4}&FechaF={5}&CveAlmacen={6}&CvePersonal={7}" Target="_blank" ItemStyle-Width="22.5%" HeaderText="Descripción" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataTextField="PS" />
|
||||
<asp:HyperLinkField DataNavigateUrlFields="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal,Tipo" DataNavigateUrlFormatString="~/Inventarios/RepExistenciasCostos.aspx?CvePS={0}&CveMoneda={1}&CveProveedor={2}&CveConcepto={3}&FechaI={4}&FechaF={5}&CveAlmacen={6}&CvePersonal={7}&Tipo={8}" Target="_blank" ItemStyle-Width="22.5%" HeaderText="Descripción" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataTextField="PS" />
|
||||
<asp:BoundField Visible="false" DataField="SeccionAlmacen" HeaderText="Sección Almacén" ItemStyle-Width="10%" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Exist. Inicial" >
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -304,7 +304,7 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
e.Row.CssClass = "Totales"
|
||||
Dim Almacenes As String = If(DdlAlmacen.GetSelectedValuesM = "", "-1", DdlAlmacen.GetSelectedValuesM)
|
||||
'e.Row.Cells(0).Text = $"<a class='Texto' href='./RepExistenciasCostos.aspx?CvePS={e.Row.DataKey("CvePS")}&CveMoneda={e.Row.DataKey("CveMoneda")}&CveProveedor={e.Row.DataKey("CveProveedor")}&CveConcepto={e.Row.DataKey("CveConcepto")}&FechaI={e.Row.DataKey("FechaF").ToDate().ToString("dd/MM/yyyy")}&FechaF={e.Row.DataKey("FechaF").ToDate().ToString("dd/MM/yyyy")}&CveAlmacen={e.Row.DataKey("CveAlmacen")}&CvePersonal={e.Row.DataKey("CvePersonal")}'>{e.Row.DataKey("Codigo")}</a>"
|
||||
e.Row.Cells(4).Text = $"<a class='Texto' href='./RepExistenciasCostos.aspx?CvePS={DdlPS.txtValue.Value}&CveMoneda={DdlMoneda.SelectedValue}&CveProveedor={DdlProveedor.txtValue.Value}&CveConcepto={DdlTipoMovimiento.SelectedValue}&FechaI={TxtFechaI.Text}&FechaF={TxtFechaF.Text}&CveAlmacen={Almacenes}&CvePersonal={DdlPersonal.SelectedValue}'>{e.Row.DataKey("PS")}</a>"
|
||||
e.Row.Cells(4).Text = $"<a class='Texto' href='./RepExistenciasCostos.aspx?CvePS={DdlPS.txtValue.Value}&CveMoneda={DdlMoneda.SelectedValue}&CveProveedor={DdlProveedor.txtValue.Value}&CveConcepto={DdlTipoMovimiento.SelectedValue}&FechaI={TxtFechaI.Text}&FechaF={TxtFechaF.Text}&CveAlmacen={Almacenes}&CvePersonal={DdlPersonal.SelectedValue}&Tipo={DdlMovs.SelectedValue.ToEntero}'>{e.Row.DataKey("PS")}</a>"
|
||||
'e.Row.Cells(4).Text = $"<a class='Texto' href='./RepExistenciasCostos.aspx?CvePS={e.Row.DataKey("CvePS")}&CveMoneda={e.Row.DataKey("CveMoneda")}&CveProveedor={e.Row.DataKey("CveProveedor")}&CveConcepto={e.Row.DataKey("CveConcepto")}&FechaI={e.Row.DataKey("FechaF").ToDate().ToString("dd/MM/yyyy")}&FechaF={e.Row.DataKey("FechaF").ToDate().ToString("dd/MM/yyyy")}&CveAlmacen={e.Row.DataKey("CveAlmacen")}&CvePersonal={e.Row.DataKey("CvePersonal")}'>{e.Row.DataKey("PS")}</a>"
|
||||
|
||||
Else
|
||||
|
||||
@@ -109,6 +109,21 @@
|
||||
<asp:DropDownList ID="DdlPersonal" runat="server" CssClass="select2me" Width="100%" DataValueField="CvePersonal" DataTextField="CodigoNombreCompleto"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1 truncate">Opción:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlMovs" CssClass="form-control input-sm select2me" runat="server" Width="100%" DataValueField="CveAlmacen" DataTextField="Almacen">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Con Movimientos" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Sin Movimientos" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Con Existencias" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Sin Existencias" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -70,7 +70,8 @@ Partial Class Inventarios_RepExistenciasCostos
|
||||
If(Request("FechaF").ToString.Trim <> "-1", Request("FechaF").ToString.Trim.ToDate, MaxFecha),
|
||||
CveAlmacen,
|
||||
IIf(Request("CVECLASIFICACION") Is Nothing, -1, Request("CveClasificacion").ToEntero),
|
||||
IIf(Request("CvePersonal") Is Nothing, -1, Request("CvePersonal").ToEntero)
|
||||
IIf(Request("CvePersonal") Is Nothing, -1, Request("CvePersonal").ToEntero),
|
||||
IIf(Request("Tipo") Is Nothing, -1, Request("Tipo").ToEntero)
|
||||
)
|
||||
Panel1.Visible = False
|
||||
Else
|
||||
@@ -173,10 +174,10 @@ Partial Class Inventarios_RepExistenciasCostos
|
||||
|
||||
Dim fechaI As Date = If(TxtFechaI.Text <> "", TxtFechaI.Text.ToDateTime, MinFecha)
|
||||
Dim fechaF As Date = If(TxtFechaF.Text <> "", TxtFechaF.Text.ToDateTime, MaxFecha)
|
||||
CargaDatos(CvePS, CveProveedor, CveMoneda, CveConcepto, fechaI, fechaF, CveAlmacen, CveClasificacion, DdlPersonal.SelectedValue.ToEntero)
|
||||
CargaDatos(CvePS, CveProveedor, CveMoneda, CveConcepto, fechaI, fechaF, CveAlmacen, CveClasificacion, DdlPersonal.SelectedValue.ToEntero, DdlMovs.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
|
||||
Protected Sub CargaDatos(CvePS As Integer, CveProveedor As Integer, CveMoneda As Integer, CveConcepto As Integer, FechaI As Date, FechaF As Date, CveAlmacen As String, CveClasificacion As Integer, CvePersonal As Integer)
|
||||
Protected Sub CargaDatos(CvePS As Integer, CveProveedor As Integer, CveMoneda As Integer, CveConcepto As Integer, FechaI As Date, FechaF As Date, CveAlmacen As String, CveClasificacion As Integer, CvePersonal As Integer, Tipo As Integer)
|
||||
If CvePS > 0 Then
|
||||
LnkKardex.Visible = True
|
||||
LnkKardex.NavigateUrl = String.Format("/Inventarios/Kardex.aspx?CvePS={0}", CvePS)
|
||||
@@ -184,7 +185,7 @@ Partial Class Inventarios_RepExistenciasCostos
|
||||
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.RepExistenciasCostos(FechaI, FechaF, CveMoneda, CveProveedor, CveConcepto, CvePS, UsuarioActual.CveEmpresa, CveAlmacen, UsuarioActual.CveUsuario, CveClasificacion, CvePersonal) Then
|
||||
If ObjInventarios.RepExistenciasCostos(FechaI, FechaF, CveMoneda, CveProveedor, CveConcepto, CvePS, UsuarioActual.CveEmpresa, CveAlmacen, UsuarioActual.CveUsuario, CveClasificacion, CvePersonal, Tipo) Then
|
||||
DtData = ObjInventarios.DtResultados
|
||||
GvM.DataSource = DtData
|
||||
FechaInicial = FechaI
|
||||
|
||||
Reference in New Issue
Block a user