Local
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")
|
||||
|
||||
Reference in New Issue
Block a user