Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -399,9 +399,10 @@
|
||||
OnRowDataBound="GvGarantiasDetalle_RowDataBound" DataKeyNames="Consecutivo,CodigoCliente,CodigoSucursal,Codigo,CodigoProducto2,CodigoTipoUso,CodigoTipoDefecto,CodigoEnsamble,CodigoLinea,CodigoInspeccion,FechaVenta,FechaReclamacion,TipoComprobante,Comprobante,Autorizo,Comentarios,ClaveAutorizacion" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Consecutivo" HeaderText="Consec" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="EstatusConsecutivo" HeaderText="Estatus Consec" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="EstatusConsecutivo" HeaderText="Estatus" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="FolioRemision" HeaderText="Remisión" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||
<asp:BoundField DataField="FolioFactura" HeaderText="Factura" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||
<asp:BoundField DataField="FechaVentaSistema" HeaderText="Fecha V" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="Cliente" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%" />
|
||||
<asp:BoundField DataField="Codigo" HeaderText="Código" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="PS" HeaderText="Producto" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
|
||||
|
||||
@@ -9655,7 +9655,7 @@ Public Class ClsPaginas
|
||||
ImporteMN = (ImporteMovimiento * CompraActual.TC).RoundSQL
|
||||
If CompraActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 280, CompraActual.SerieFolio, Concepto, Ret.IdCtaContIVANoAcreditable, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, PorcentajeImpuesto:=CompraActual.PorcentajeIVA, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 280, CompraActual.SerieFolio, Concepto, Ret.IdCtaContIVANoAcreditable, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, PorcentajeImpuesto:=CompraActual.PorcentajeIVA, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
|
||||
|
||||
End If
|
||||
|
||||
@@ -9668,12 +9668,12 @@ Public Class ClsPaginas
|
||||
If CompraActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento
|
||||
|
||||
Dim Ret As ConceptosRetenciones = CompraActual.ConceptoPrePolizaRetIVA
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, Ret.CveConceptoxAcreditar, CompraActual.SerieFolio, Concepto, Ret.IdCtaContablexAcreditar, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, Ret.CveConceptoxAcreditar, CompraActual.SerieFolio, Concepto, Ret.IdCtaContablexAcreditar, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
|
||||
|
||||
'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe
|
||||
If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * Pago.TCPago).RoundSQL
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, Ret.CveConceptoAcreditable, CompraActual.SerieFolio, Concepto, Ret.IdCtaContableAcreditable, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, Ret.CveConceptoAcreditable, CompraActual.SerieFolio, Concepto, Ret.IdCtaContableAcreditable, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
|
||||
|
||||
End If
|
||||
|
||||
@@ -9688,12 +9688,12 @@ Public Class ClsPaginas
|
||||
End If
|
||||
|
||||
Dim Ret As ConceptosRetenciones = CompraActual.ConceptoPrePolizaRetISR
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, Ret.CveConceptoxAcreditar, CompraActual.SerieFolio, Concepto, Ret.IdCtaContablexAcreditar, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, Contabilizable:=ContabilizableISR) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, Ret.CveConceptoxAcreditar, CompraActual.SerieFolio, Concepto, Ret.IdCtaContablexAcreditar, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, Contabilizable:=ContabilizableISR) Then ErrorMovtos = True
|
||||
|
||||
'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe
|
||||
If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * Pago.TCPago).RoundSQL
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, Ret.CveConceptoAcreditable, CompraActual.SerieFolio, Concepto, Ret.IdCtaContableAcreditable, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, Contabilizable:=ContabilizableISR) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, Ret.CveConceptoAcreditable, CompraActual.SerieFolio, Concepto, Ret.IdCtaContableAcreditable, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, Contabilizable:=ContabilizableISR) Then ErrorMovtos = True
|
||||
|
||||
End If
|
||||
|
||||
@@ -9711,12 +9711,12 @@ Public Class ClsPaginas
|
||||
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 25, CompraActual.SerieFolio, Concepto, Ret.IdCtaContablexAcreditar, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 25, CompraActual.SerieFolio, Concepto, Ret.IdCtaContablexAcreditar, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
|
||||
|
||||
'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe
|
||||
If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * Pago.TCPago).RoundSQL
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 26, CompraActual.SerieFolio, Concepto, Ret.IdCtaContableAcreditable, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 26, CompraActual.SerieFolio, Concepto, Ret.IdCtaContableAcreditable, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -2465,81 +2465,7 @@ Partial Class Bancos_PopIECompras
|
||||
|
||||
End If
|
||||
End If
|
||||
'Case 280 'Iva Acreditable No Deducible
|
||||
' If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
||||
' 'funcionalidad que toma el 100% del pago para acreditamiento de iva
|
||||
' Dim TotalImporte As Decimal
|
||||
|
||||
' If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
|
||||
' TotalImporte = ImportePagado.ToString.ToDecimal
|
||||
' ElseIf CveMoneda = 1 AndAlso CveMonedaCompra = 2 Then
|
||||
' TotalImporte = Math.Round(ImportePagado.ToString.ToDecimal / tipoCambioPago, 2)
|
||||
' ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 1 Then
|
||||
' TotalImporte = Math.Round(ImportePagado.ToString.ToDecimal * tipoCambioPago, 2)
|
||||
' ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 2 Then
|
||||
' TotalImporte = ImportePagado.ToString.ToDecimal
|
||||
' End If
|
||||
|
||||
' If TotalImporte = CompraSaldo Then
|
||||
' If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
|
||||
' ImporteMovimiento = MovimientoPagar.IVANoDeducible
|
||||
' ImporteMX = ImporteMovimiento
|
||||
' ElseIf CveMoneda = 1 AndAlso CveMonedaCompra = 2 Then
|
||||
' ImporteMovimiento = (MovimientoPagar.IVANoDeducible)
|
||||
' ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||
' ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 1 Then
|
||||
' ImporteMovimiento = (MovimientoPagar.IVANoDeducible)
|
||||
' ImporteMX = ImporteMovimiento * tipoCambioCompra
|
||||
' ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 2 Then
|
||||
' ImporteMovimiento = (MovimientoPagar.IVANoDeducible)
|
||||
' ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||
' End If
|
||||
' ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||
' ImporteMX = ImporteMX.RoundSQL
|
||||
' TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||
|
||||
' If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
' Else
|
||||
' ImporteMovimiento = 0
|
||||
' ImporteMX = 0
|
||||
' End If
|
||||
' Else
|
||||
' If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
|
||||
' ImporteMovimiento = MovimientoPagar.IVANoDeducible * PorcentajePago
|
||||
' ImporteMX = ImporteMovimiento
|
||||
' ElseIf CveMoneda = 1 AndAlso CveMonedaCompra = 2 Then
|
||||
' ImporteMovimiento = (MovimientoPagar.IVANoDeducible * PorcentajePago)
|
||||
' ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||
' ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 1 Then
|
||||
' ImporteMovimiento = (MovimientoPagar.IVANoDeducible * PorcentajePago)
|
||||
' ImporteMX = ImporteMovimiento * tipoCambioCompra
|
||||
' ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 2 Then
|
||||
' ImporteMovimiento = (MovimientoPagar.IVANoDeducible * PorcentajePago)
|
||||
' ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||
' End If
|
||||
' ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||
' ImporteMX = ImporteMX.RoundSQL
|
||||
' TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||
|
||||
' If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
' End If
|
||||
|
||||
' PorcentajeImpuesto = MovimientoPagar.PorcentajeIVA
|
||||
' Dim IdCtaIVAXAcreditar As Integer = 0
|
||||
' Dim IdCtaIVAAcreditable As Integer = 0
|
||||
|
||||
' If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
|
||||
' IdCtaIVAXAcreditar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
|
||||
' IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
|
||||
' End If
|
||||
|
||||
' IdCtaContable = If(IdCtaIVAAcreditable > 0, IdCtaIVAAcreditable, 0)
|
||||
|
||||
' If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
Case 25 'IEPS por Acreditar
|
||||
If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
|
||||
ImporteMovimiento = MovimientoPagar.IEPS * PorcentajePago
|
||||
|
||||
@@ -851,7 +851,8 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
CompraActual.EsImportacion = gvr.DataKey("EsImportacion") = "1"
|
||||
CompraActual.UsuarioActual = UsuarioActual
|
||||
CompraActual.CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero
|
||||
CompraActual.IdCtaContableProv = CtaProveedor
|
||||
CompraActual.IdCtaContableProv = If(CompraActual.CveMoneda >= 2, IdCtaContMonedaExtranjera, CtaProveedor)
|
||||
CompraActual.IdCtaContableProvComplementaria = IdCtaContComplementaria
|
||||
|
||||
'Importe de pago
|
||||
Pago.ImportePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-2" style="width: 80px;">SubProyecto: </label>
|
||||
<label class="col-md-2" style="width: 80px; display:none;">SubProyecto: </label>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" Width="150px" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me" >
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
|
||||
@@ -296,6 +296,15 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property CveTipoAlmacenSeleccionado As Integer
|
||||
Get
|
||||
Return IfNull(ViewState("CveTipoAlmacenSeleccionado"), -1).ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveTipoAlmacenSeleccionado") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -1393,9 +1402,13 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Dim FechaCaducidadVal As Date = If(RowPS("AplicaCaducidad").ToString = "True", FechaCaducidad, MinFecha)
|
||||
|
||||
|
||||
|
||||
If RowPS("AplicaSerie").ToString = "True" And (String.IsNullOrEmpty(Serie.Trim()) OrElse Serie = "-1") Then
|
||||
Valido = False
|
||||
Alert("El producto requiere Serie", TipoMensaje.MsgAdvertencia)
|
||||
'SI NO ES USADO O GARANTIA
|
||||
If Not Me.CveTipoAlmacenSeleccionado.Contiene(6, 22) Then
|
||||
Valido = False
|
||||
Alert("El producto requiere Serie", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
If RowPS("VentaMinima").ToString.ToDecimal > 0 Then
|
||||
@@ -1444,6 +1457,10 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If String.IsNullOrEmpty(PS.Trim()) Then
|
||||
PS = RowPS("PS").ToString()
|
||||
End If
|
||||
|
||||
Dim registro As DataRow = DtMovimientos.NewRow
|
||||
registro.Item("Cantidad") = Cantidad
|
||||
registro.Item("CveUM") = CveUM
|
||||
@@ -2181,6 +2198,8 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Dim filtro As String = ""
|
||||
Dim CveTipoAlmacen = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {DdlAlmacen.SelectedValue}").ToEntero
|
||||
|
||||
Me.CveTipoAlmacenSeleccionado = CveTipoAlmacen
|
||||
|
||||
filtro = If(UsuarioActual.TienePermisoProceso(144), "CveConcepto NOT IN (1,4,5,8,9,10,12,26,27)", "CveConcepto NOT IN (1,2,4,5,8,9,10,12,26,27)")
|
||||
|
||||
If DdlAlmacen.SelectedValue = "-1" Then
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar Columnas</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<%-- <li>
|
||||
<asp:LinkButton ID="Lnkcompuxlsinventarios" OnClick="Lnkcompuxlsinventarios_Click" runat="server"><i class="fa fa-ad-excel"></i> Generar Inventarios HP</asp:LinkButton>
|
||||
</li>
|
||||
</li>--%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
@@ -275,6 +275,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" DataField="FechaCompra" HeaderText="Última Compra" DataFormatString="{0:d}" ItemStyle-Width="7%" ItemStyle-HorizontalAlign="Right"/>
|
||||
<asp:BoundField Visible="false" DataField="FechaVenta" HeaderText="Última Venta" DataFormatString="{0:d}" ItemStyle-Width="7%" ItemStyle-HorizontalAlign="Right"/>
|
||||
<asp:BoundField Visible="false" DataField="PUPromedio" HeaderText="PU Promedio" DataFormatString="{0:N2}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right"/>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
@@ -326,17 +327,7 @@
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivPersonalizar" class="modal fade" role="dialog">
|
||||
@@ -366,15 +357,16 @@
|
||||
<asp:CheckBox ID="ChkClasificacion2" runat="server" Text="Clasificación 2" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFechaUltimaCompra" runat="server" Text="Fecha Última Compra" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFechaUltimaVenta" runat="server" Text="Fecha Última Venta" />
|
||||
</td>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkPUPromedio" runat="server" Text="PU Promedio" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -93,7 +93,7 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
End If
|
||||
CargaPermisos()
|
||||
CargaGvBitacora()
|
||||
Lnkcompuxlsinventarios.Visible = UsuarioActual.CveEmpresa = 72
|
||||
' Lnkcompuxlsinventarios.Visible = UsuarioActual.CveEmpresa = 72
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -320,42 +320,21 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
e.Row.FCLabel("lbSalidaImp").Text = If(e.Row.DBCampo("SalidaImp").ToString().ToDecimal = 0, "-", e.Row.DBCampo("SalidaImp").ToDouble.ToString("N2"))
|
||||
e.Row.FCLabel("lbSaldoF2").Text = If(e.Row.DBCampo("SaldoFImp").ToString().ToDecimal = 0, "-", e.Row.DBCampo("SaldoFImp").ToDouble.ToString("N2"))
|
||||
|
||||
|
||||
|
||||
|
||||
'0,1,4
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Protected Sub gv_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles Gv.RowDataBound
|
||||
' If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
' If e.Row.DBCampo("CvePS").ToEntero = -1 Then
|
||||
|
||||
' e.Row.Cells(3).Text = ""
|
||||
' e.Row.Cells(4).Text = ""
|
||||
' e.Row.Cells(5).Text = ""
|
||||
' e.Row.CssClass = "SubTotales"
|
||||
' e.Row.Height = 22
|
||||
|
||||
' End If
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
#Region "MARCA"
|
||||
Protected Sub CargarMarcas()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(130) = "1" Then
|
||||
DivMarca.Visible = True
|
||||
|
||||
Dim ObjMarcas As New ClsProductosServicios
|
||||
ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa)
|
||||
DdlMarca.DataSource = ObjMarcas.DtResultados
|
||||
ObjMarcas.Dispose()
|
||||
'Dim ObjMarcas As New ClsProductosServicios
|
||||
'ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa)
|
||||
DdlMarca.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa)
|
||||
' ObjMarcas.Dispose()
|
||||
DdlMarca.DataBind()
|
||||
End If
|
||||
|
||||
@@ -448,6 +427,7 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
|
||||
GvM.Columns(16).Visible = ChkFechaUltimaCompra.Checked
|
||||
GvM.Columns(17).Visible = ChkFechaUltimaVenta.Checked
|
||||
GvM.Columns(18).Visible = ChkPUPromedio.Checked
|
||||
|
||||
'GvM.Columns(4).Visible = ChkSeccionAlmacen.Checked
|
||||
If ChkSeccionAlmacen.Checked OrElse ChkCodigoBarras.Checked OrElse ChkCodigoAlterno.Checked Then
|
||||
@@ -547,233 +527,234 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
UpBitacora.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
Protected Sub Lnkcompuxlsinventarios_Click(sender As Object, e As EventArgs)
|
||||
Dim continuar = True
|
||||
Try
|
||||
'Protected Sub Lnkcompuxlsinventarios_Click(sender As Object, e As EventArgs)
|
||||
' Dim continuar = True
|
||||
' Try
|
||||
|
||||
Dim wb As New ClosedXML.Excel.XLWorkbook()
|
||||
Dim libro As ClosedXML.Excel.IXLWorksheet = wb.AddWorksheet("Reporte de inventarios")
|
||||
' Dim wb As New ClosedXML.Excel.XLWorkbook()
|
||||
' Dim libro As ClosedXML.Excel.IXLWorksheet = wb.AddWorksheet("Reporte de inventarios")
|
||||
|
||||
|
||||
|
||||
Dim Fila As Integer = 0
|
||||
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 2, 7)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(217, 225, 242))
|
||||
libro.Range(libro.Cell(Fila + 3, 1), libro.Cell(Fila + 3, 7)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
||||
libro.Cell(Fila + 3, 5).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166))
|
||||
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 7)).Style.Border.InsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
||||
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 7)).Style.Border.OutsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
||||
libro.Column(1).Width = 34.43
|
||||
libro.Cell(Fila + 1, 1).Value = "TIPO DO REGISTRO"
|
||||
libro.Cell(Fila + 2, 1).Value = "RECORD Type"
|
||||
libro.Cell(Fila + 3, 1).Value = "OBLIGATORIO"
|
||||
' Dim Fila As Integer = 0
|
||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 2, 7)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(217, 225, 242))
|
||||
' libro.Range(libro.Cell(Fila + 3, 1), libro.Cell(Fila + 3, 7)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
||||
' libro.Cell(Fila + 3, 5).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166))
|
||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 7)).Style.Border.InsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 7)).Style.Border.OutsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
||||
' libro.Column(1).Width = 34.43
|
||||
' libro.Cell(Fila + 1, 1).Value = "TIPO DO REGISTRO"
|
||||
' libro.Cell(Fila + 2, 1).Value = "RECORD Type"
|
||||
' libro.Cell(Fila + 3, 1).Value = "OBLIGATORIO"
|
||||
|
||||
libro.Column(2).Width = 24
|
||||
libro.Cell(Fila + 1, 2).Value = "Codigo del Partner"
|
||||
libro.Cell(Fila + 2, 2).Value = "Reporter_id "
|
||||
libro.Cell(Fila + 3, 2).Value = "OBLIGATORIO"
|
||||
' libro.Column(2).Width = 24
|
||||
' libro.Cell(Fila + 1, 2).Value = "Codigo del Partner"
|
||||
' libro.Cell(Fila + 2, 2).Value = "Reporter_id "
|
||||
' libro.Cell(Fila + 3, 2).Value = "OBLIGATORIO"
|
||||
|
||||
libro.Column(3).Width = 28.71
|
||||
libro.Cell(Fila + 1, 3).Value = "Nombre de la Empresa"
|
||||
libro.Cell(Fila + 2, 3).Value = "Reporter Company Name"
|
||||
libro.Cell(Fila + 3, 3).Value = "OBLIGATORIO"
|
||||
' libro.Column(3).Width = 28.71
|
||||
' libro.Cell(Fila + 1, 3).Value = "Nombre de la Empresa"
|
||||
' libro.Cell(Fila + 2, 3).Value = "Reporter Company Name"
|
||||
' libro.Cell(Fila + 3, 3).Value = "OBLIGATORIO"
|
||||
|
||||
libro.Column(4).Width = 23.57
|
||||
libro.Cell(Fila + 1, 4).Value = "CÓDIGO DEL PAÍS"
|
||||
libro.Cell(Fila + 2, 4).Value = "COUNTRY CD"
|
||||
libro.Cell(Fila + 3, 4).Value = "OBLIGATORIO"
|
||||
' libro.Column(4).Width = 23.57
|
||||
' libro.Cell(Fila + 1, 4).Value = "CÓDIGO DEL PAÍS"
|
||||
' libro.Cell(Fila + 2, 4).Value = "COUNTRY CD"
|
||||
' libro.Cell(Fila + 3, 4).Value = "OBLIGATORIO"
|
||||
|
||||
libro.Column(5).Width = 17.57
|
||||
libro.Cell(Fila + 1, 5).Value = "Ubicación"
|
||||
libro.Cell(Fila + 2, 5).Value = "LOCATION"
|
||||
libro.Cell(Fila + 3, 5).Value = "OPCIONAL"
|
||||
' libro.Column(5).Width = 17.57
|
||||
' libro.Cell(Fila + 1, 5).Value = "Ubicación"
|
||||
' libro.Cell(Fila + 2, 5).Value = "LOCATION"
|
||||
' libro.Cell(Fila + 3, 5).Value = "OPCIONAL"
|
||||
|
||||
libro.Column(6).Width = 35.29
|
||||
libro.Cell(Fila + 1, 6).Value = "FECHA DEL INVENTARIO"
|
||||
libro.Cell(Fila + 2, 6).Value = "Period End Date"
|
||||
libro.Cell(Fila + 3, 6).Value = "OBLIGATORIO"
|
||||
' libro.Column(6).Width = 35.29
|
||||
' libro.Cell(Fila + 1, 6).Value = "FECHA DEL INVENTARIO"
|
||||
' libro.Cell(Fila + 2, 6).Value = "Period End Date"
|
||||
' libro.Cell(Fila + 3, 6).Value = "OBLIGATORIO"
|
||||
|
||||
libro.Column(7).Width = 23.43
|
||||
libro.Cell(Fila + 1, 7).Value = "REENVIO"
|
||||
libro.Cell(Fila + 2, 7).Value = "RESUBMIT"
|
||||
libro.Cell(Fila + 3, 7).Value = "OBLIGATORIO"
|
||||
' libro.Column(7).Width = 23.43
|
||||
' libro.Cell(Fila + 1, 7).Value = "REENVIO"
|
||||
' libro.Cell(Fila + 2, 7).Value = "RESUBMIT"
|
||||
' libro.Cell(Fila + 3, 7).Value = "OBLIGATORIO"
|
||||
|
||||
libro.Column(8).Width = 29.29
|
||||
libro.Column(9).Width = 25
|
||||
libro.Column(10).Width = 18.14
|
||||
libro.Column(11).Width = 32.71
|
||||
libro.Column(12).Width = 13.57
|
||||
libro.Column(13).Width = 13
|
||||
libro.Column(14).Width = 32
|
||||
libro.Column(15).Width = 12.71
|
||||
libro.Column(16).Width = 13
|
||||
' libro.Column(8).Width = 29.29
|
||||
' libro.Column(9).Width = 25
|
||||
' libro.Column(10).Width = 18.14
|
||||
' libro.Column(11).Width = 32.71
|
||||
' libro.Column(12).Width = 13.57
|
||||
' libro.Column(13).Width = 13
|
||||
' libro.Column(14).Width = 32
|
||||
' libro.Column(15).Width = 12.71
|
||||
' libro.Column(16).Width = 13
|
||||
|
||||
|
||||
|
||||
Fila = Fila + 3
|
||||
' Fila = Fila + 3
|
||||
|
||||
libro.Cell(Fila + 1, 1).Value = "IH"
|
||||
libro.Cell(Fila + 1, 2).Value = "10245068"
|
||||
libro.Cell(Fila + 1, 3).Value = "COMPUPROVEEDORES SA DE CV"
|
||||
libro.Cell(Fila + 1, 4).Value = "MX"
|
||||
libro.Cell(Fila + 1, 5).Value = ""
|
||||
libro.Cell(Fila + 1, 6).Value = String.Format("{0:yyyyMMdd}", TxtFechaF.Text.ToDate())
|
||||
libro.Cell(Fila + 1, 7).Value = "N"
|
||||
' libro.Cell(Fila + 1, 1).Value = "IH"
|
||||
' libro.Cell(Fila + 1, 2).Value = "10245068"
|
||||
' libro.Cell(Fila + 1, 3).Value = "COMPUPROVEEDORES SA DE CV"
|
||||
' libro.Cell(Fila + 1, 4).Value = "MX"
|
||||
' libro.Cell(Fila + 1, 5).Value = ""
|
||||
' libro.Cell(Fila + 1, 6).Value = String.Format("{0:yyyyMMdd}", TxtFechaF.Text.ToDate())
|
||||
' libro.Cell(Fila + 1, 7).Value = "N"
|
||||
|
||||
|
||||
Fila = Fila + 1
|
||||
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 2, 16)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(217, 225, 242))
|
||||
libro.Range(libro.Cell(Fila + 3, 1), libro.Cell(Fila + 3, 16)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
||||
libro.Range(libro.Cell(Fila + 3, 3), libro.Cell(Fila + 3, 15)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166))
|
||||
libro.Cell(Fila + 3, 7).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
||||
libro.Cell(Fila + 3, 10).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
||||
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 16)).Style.Border.InsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
||||
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 16)).Style.Border.OutsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
||||
libro.Cell(Fila + 1, 1).Value = "TIPO DO REGISTRO"
|
||||
libro.Cell(Fila + 1, 2).Value = "NÚMERO DEL PRODUCTO"
|
||||
libro.Cell(Fila + 1, 3).Value = "OPCION DEL PRODUCTO"
|
||||
libro.Cell(Fila + 1, 4).Value = "UPC"
|
||||
libro.Cell(Fila + 1, 5).Value = "CODIGO SKU"
|
||||
libro.Cell(Fila + 1, 6).Value = "ORDENES DE COMPRAS EN ABIERTO "
|
||||
libro.Cell(Fila + 1, 7).Value = "INVENTARIO DISPONIBLE"
|
||||
libro.Cell(Fila + 1, 8).Value = "DEVOLUCIONES"
|
||||
libro.Cell(Fila + 1, 9).Value = "INVENTARIO RESERVADO"
|
||||
libro.Cell(Fila + 1, 10).Value = "INVENTARIO TOTAL"
|
||||
libro.Cell(Fila + 1, 11).Value = "EN TRANSITO"
|
||||
libro.Cell(Fila + 1, 12).Value = "VALOR UNITARIO DEL PRODUCTO HP"
|
||||
libro.Cell(Fila + 1, 13).Value = "VALOR TOTAL DEL INVENTARIO"
|
||||
libro.Cell(Fila + 1, 14).Value = "NOMBRE DE LA TIENDA"
|
||||
libro.Cell(Fila + 1, 15).Value = "Codigo de la tienda"
|
||||
libro.Cell(Fila + 1, 16).Value = "MONEDA"
|
||||
' Fila = Fila + 1
|
||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 2, 16)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(217, 225, 242))
|
||||
' libro.Range(libro.Cell(Fila + 3, 1), libro.Cell(Fila + 3, 16)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
||||
' libro.Range(libro.Cell(Fila + 3, 3), libro.Cell(Fila + 3, 15)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166))
|
||||
' libro.Cell(Fila + 3, 7).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
||||
' libro.Cell(Fila + 3, 10).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 16)).Style.Border.InsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 16)).Style.Border.OutsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
||||
' libro.Cell(Fila + 1, 1).Value = "TIPO DO REGISTRO"
|
||||
' libro.Cell(Fila + 1, 2).Value = "NÚMERO DEL PRODUCTO"
|
||||
' libro.Cell(Fila + 1, 3).Value = "OPCION DEL PRODUCTO"
|
||||
' libro.Cell(Fila + 1, 4).Value = "UPC"
|
||||
' libro.Cell(Fila + 1, 5).Value = "CODIGO SKU"
|
||||
' libro.Cell(Fila + 1, 6).Value = "ORDENES DE COMPRAS EN ABIERTO "
|
||||
' libro.Cell(Fila + 1, 7).Value = "INVENTARIO DISPONIBLE"
|
||||
' libro.Cell(Fila + 1, 8).Value = "DEVOLUCIONES"
|
||||
' libro.Cell(Fila + 1, 9).Value = "INVENTARIO RESERVADO"
|
||||
' libro.Cell(Fila + 1, 10).Value = "INVENTARIO TOTAL"
|
||||
' libro.Cell(Fila + 1, 11).Value = "EN TRANSITO"
|
||||
' libro.Cell(Fila + 1, 12).Value = "VALOR UNITARIO DEL PRODUCTO HP"
|
||||
' libro.Cell(Fila + 1, 13).Value = "VALOR TOTAL DEL INVENTARIO"
|
||||
' libro.Cell(Fila + 1, 14).Value = "NOMBRE DE LA TIENDA"
|
||||
' libro.Cell(Fila + 1, 15).Value = "Codigo de la tienda"
|
||||
' libro.Cell(Fila + 1, 16).Value = "MONEDA"
|
||||
|
||||
Fila = Fila + 1
|
||||
libro.Cell(Fila + 1, 1).Value = "RECORD TYPE "
|
||||
libro.Cell(Fila + 1, 2).Value = "Partner Reported Product ID"
|
||||
libro.Cell(Fila + 1, 3).Value = "PROD_OPTION"
|
||||
libro.Cell(Fila + 1, 4).Value = "UPC"
|
||||
libro.Cell(Fila + 1, 5).Value = "Reseller product number "
|
||||
libro.Cell(Fila + 1, 6).Value = "Quantity on Order"
|
||||
libro.Cell(Fila + 1, 7).Value = "Quantity on Hand"
|
||||
libro.Cell(Fila + 1, 8).Value = "Quantity in stock allocated to be returned to supplier"
|
||||
libro.Cell(Fila + 1, 9).Value = "Reserved Inventory"
|
||||
libro.Cell(Fila + 1, 10).Value = "Quantity avail. for sale"
|
||||
libro.Cell(Fila + 1, 11).Value = "Quantity in float (In transit between partner warehouses)"
|
||||
libro.Cell(Fila + 1, 12).Value = "INVENTORY UNIT VALUE"
|
||||
libro.Cell(Fila + 1, 13).Value = "INVENTORY VALUATION"
|
||||
libro.Cell(Fila + 1, 14).Value = "Sell from name (For retailers, ""Store Name / Site Name"")"
|
||||
libro.Cell(Fila + 1, 15).Value = "Sell From Location ID"
|
||||
libro.Cell(Fila + 1, 16).Value = "CURRENCY"
|
||||
' Fila = Fila + 1
|
||||
' libro.Cell(Fila + 1, 1).Value = "RECORD TYPE "
|
||||
' libro.Cell(Fila + 1, 2).Value = "Partner Reported Product ID"
|
||||
' libro.Cell(Fila + 1, 3).Value = "PROD_OPTION"
|
||||
' libro.Cell(Fila + 1, 4).Value = "UPC"
|
||||
' libro.Cell(Fila + 1, 5).Value = "Reseller product number "
|
||||
' libro.Cell(Fila + 1, 6).Value = "Quantity on Order"
|
||||
' libro.Cell(Fila + 1, 7).Value = "Quantity on Hand"
|
||||
' libro.Cell(Fila + 1, 8).Value = "Quantity in stock allocated to be returned to supplier"
|
||||
' libro.Cell(Fila + 1, 9).Value = "Reserved Inventory"
|
||||
' libro.Cell(Fila + 1, 10).Value = "Quantity avail. for sale"
|
||||
' libro.Cell(Fila + 1, 11).Value = "Quantity in float (In transit between partner warehouses)"
|
||||
' libro.Cell(Fila + 1, 12).Value = "INVENTORY UNIT VALUE"
|
||||
' libro.Cell(Fila + 1, 13).Value = "INVENTORY VALUATION"
|
||||
' libro.Cell(Fila + 1, 14).Value = "Sell from name (For retailers, ""Store Name / Site Name"")"
|
||||
' libro.Cell(Fila + 1, 15).Value = "Sell From Location ID"
|
||||
' libro.Cell(Fila + 1, 16).Value = "CURRENCY"
|
||||
|
||||
Fila = Fila + 1
|
||||
libro.Cell(Fila + 1, 1).Value = "OBLIGATORIO"
|
||||
libro.Cell(Fila + 1, 2).Value = "OBLIGATORIO"
|
||||
libro.Cell(Fila + 1, 3).Value = "OPCIONAL"
|
||||
libro.Cell(Fila + 1, 4).Value = "OPCIONAL"
|
||||
libro.Cell(Fila + 1, 5).Value = "OPCIONAL"
|
||||
libro.Cell(Fila + 1, 6).Value = "OPCIONAL"
|
||||
libro.Cell(Fila + 1, 7).Value = "OBLIGATORIO"
|
||||
libro.Cell(Fila + 1, 8).Value = "OPCIONAL"
|
||||
libro.Cell(Fila + 1, 9).Value = "OPCIONAL"
|
||||
libro.Cell(Fila + 1, 10).Value = "OBLIGATORIO"
|
||||
libro.Cell(Fila + 1, 11).Value = "OPCIONAL"
|
||||
libro.Cell(Fila + 1, 12).Value = "OPCIONAL"
|
||||
libro.Cell(Fila + 1, 13).Value = "OPCIONAL"
|
||||
libro.Cell(Fila + 1, 14).Value = "OPCIONAL"
|
||||
libro.Cell(Fila + 1, 15).Value = "OPCIONAL"
|
||||
libro.Cell(Fila + 1, 16).Value = "OBLIGATORIO"
|
||||
' Fila = Fila + 1
|
||||
' libro.Cell(Fila + 1, 1).Value = "OBLIGATORIO"
|
||||
' libro.Cell(Fila + 1, 2).Value = "OBLIGATORIO"
|
||||
' libro.Cell(Fila + 1, 3).Value = "OPCIONAL"
|
||||
' libro.Cell(Fila + 1, 4).Value = "OPCIONAL"
|
||||
' libro.Cell(Fila + 1, 5).Value = "OPCIONAL"
|
||||
' libro.Cell(Fila + 1, 6).Value = "OPCIONAL"
|
||||
' libro.Cell(Fila + 1, 7).Value = "OBLIGATORIO"
|
||||
' libro.Cell(Fila + 1, 8).Value = "OPCIONAL"
|
||||
' libro.Cell(Fila + 1, 9).Value = "OPCIONAL"
|
||||
' libro.Cell(Fila + 1, 10).Value = "OBLIGATORIO"
|
||||
' libro.Cell(Fila + 1, 11).Value = "OPCIONAL"
|
||||
' libro.Cell(Fila + 1, 12).Value = "OPCIONAL"
|
||||
' libro.Cell(Fila + 1, 13).Value = "OPCIONAL"
|
||||
' libro.Cell(Fila + 1, 14).Value = "OPCIONAL"
|
||||
' libro.Cell(Fila + 1, 15).Value = "OPCIONAL"
|
||||
' libro.Cell(Fila + 1, 16).Value = "OBLIGATORIO"
|
||||
|
||||
|
||||
If Not IsNothing(dt) AndAlso dt.Rows.Count > 0 Then
|
||||
' If Not IsNothing(dt) AndAlso dt.Rows.Count > 0 Then
|
||||
|
||||
For Each row As DataRow In dt.Select("CvePS>0 AND SaldoFCant >0")
|
||||
' For Each row As DataRow In dt.Select("CvePS>0 AND SaldoFCant >0")
|
||||
|
||||
Fila = Fila + 1
|
||||
libro.Cell(Fila + 1, 1).Value = "ID" ' "TIPO DO REGISTRO"
|
||||
libro.Cell(Fila + 1, 2).Value = String.Format("'{0}", row("Codigo")) ' "NÚMERO DEL PRODUCTO"
|
||||
libro.Cell(Fila + 1, 3).Value = "" ' "OPCION DEL PRODUCTO"
|
||||
libro.Cell(Fila + 1, 4).Value = "" ' "UPC"
|
||||
libro.Cell(Fila + 1, 5).Value = "" ' "CODIGO SKU"
|
||||
libro.Cell(Fila + 1, 6).Value = "" ' "ORDENES DE COMPRAS EN ABIERTO "
|
||||
libro.Cell(Fila + 1, 7).Value = String.Format("{0}", row("SaldoFCant")) ' "INVENTARIO DISPONIBLE"
|
||||
'libro.Cell(Fila + 1, 7).Style.NumberFormat.Format = "N2"
|
||||
libro.Cell(Fila + 1, 8).Value = "" ' "DEVOLUCIONES"
|
||||
libro.Cell(Fila + 1, 9).Value = "" ' "INVENTARIO RESERVADO"
|
||||
libro.Cell(Fila + 1, 10).Value = String.Format("{0}", row("SaldoFCant")) ' "INVENTARIO TOTAL"
|
||||
'libro.Cell(Fila + 1, 10).Style.NumberFormat.Format = "$ #,##0.00"
|
||||
libro.Cell(Fila + 1, 11).Value = "" ' "EN TRANSITO"
|
||||
libro.Cell(Fila + 1, 12).Value = "" ' "VALOR UNITARIO DEL PRODUCTO HP"
|
||||
libro.Cell(Fila + 1, 13).Value = "" ' "VALOR TOTAL DEL INVENTARIO"
|
||||
libro.Cell(Fila + 1, 14).Value = "" ' "NOMBRE DE LA TIENDA"
|
||||
libro.Cell(Fila + 1, 15).Value = "" ' "Codigo de la tienda"
|
||||
libro.Cell(Fila + 1, 16).Value = "MXN" ' "MONEDA"
|
||||
Next
|
||||
End If
|
||||
' Fila = Fila + 1
|
||||
' libro.Cell(Fila + 1, 1).Value = "ID" ' "TIPO DO REGISTRO"
|
||||
' libro.Cell(Fila + 1, 2).Value = String.Format("'{0}", row("Codigo")) ' "NÚMERO DEL PRODUCTO"
|
||||
' libro.Cell(Fila + 1, 3).Value = "" ' "OPCION DEL PRODUCTO"
|
||||
' libro.Cell(Fila + 1, 4).Value = "" ' "UPC"
|
||||
' libro.Cell(Fila + 1, 5).Value = "" ' "CODIGO SKU"
|
||||
' libro.Cell(Fila + 1, 6).Value = "" ' "ORDENES DE COMPRAS EN ABIERTO "
|
||||
' libro.Cell(Fila + 1, 7).Value = String.Format("{0}", row("SaldoFCant")) ' "INVENTARIO DISPONIBLE"
|
||||
' 'libro.Cell(Fila + 1, 7).Style.NumberFormat.Format = "N2"
|
||||
' libro.Cell(Fila + 1, 8).Value = "" ' "DEVOLUCIONES"
|
||||
' libro.Cell(Fila + 1, 9).Value = "" ' "INVENTARIO RESERVADO"
|
||||
' libro.Cell(Fila + 1, 10).Value = String.Format("{0}", row("SaldoFCant")) ' "INVENTARIO TOTAL"
|
||||
' 'libro.Cell(Fila + 1, 10).Style.NumberFormat.Format = "$ #,##0.00"
|
||||
' libro.Cell(Fila + 1, 11).Value = "" ' "EN TRANSITO"
|
||||
' libro.Cell(Fila + 1, 12).Value = "" ' "VALOR UNITARIO DEL PRODUCTO HP"
|
||||
' libro.Cell(Fila + 1, 13).Value = "" ' "VALOR TOTAL DEL INVENTARIO"
|
||||
' libro.Cell(Fila + 1, 14).Value = "" ' "NOMBRE DE LA TIENDA"
|
||||
' libro.Cell(Fila + 1, 15).Value = "" ' "Codigo de la tienda"
|
||||
' libro.Cell(Fila + 1, 16).Value = "MXN" ' "MONEDA"
|
||||
' Next
|
||||
' End If
|
||||
|
||||
Fila = Fila + 1
|
||||
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 2, 4)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(217, 225, 242))
|
||||
libro.Range(libro.Cell(Fila + 3, 1), libro.Cell(Fila + 3, 4)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
||||
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 4)).Style.Border.InsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
||||
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 4)).Style.Border.OutsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
||||
libro.Cell(Fila + 1, 1).Value = "TIPO DEL REGISTRO"
|
||||
libro.Cell(Fila + 1, 2).Value = "TOTAL DE REGISTROS"
|
||||
libro.Cell(Fila + 1, 3).Value = "Suma del Inventario Disponible"
|
||||
libro.Cell(Fila + 1, 4).Value = "Suma del Inventario Total"
|
||||
' Fila = Fila + 1
|
||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 2, 4)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(217, 225, 242))
|
||||
' libro.Range(libro.Cell(Fila + 3, 1), libro.Cell(Fila + 3, 4)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 4)).Style.Border.InsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 4)).Style.Border.OutsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
||||
' libro.Cell(Fila + 1, 1).Value = "TIPO DEL REGISTRO"
|
||||
' libro.Cell(Fila + 1, 2).Value = "TOTAL DE REGISTROS"
|
||||
' libro.Cell(Fila + 1, 3).Value = "Suma del Inventario Disponible"
|
||||
' libro.Cell(Fila + 1, 4).Value = "Suma del Inventario Total"
|
||||
|
||||
Fila = Fila + 1
|
||||
libro.Cell(Fila + 1, 1).Value = "RECORD TYPE"
|
||||
libro.Cell(Fila + 1, 2).Value = "COUNT OF RECORDS"
|
||||
libro.Cell(Fila + 1, 3).Value = "SUM OF “"On Hand”""
|
||||
libro.Cell(Fila + 1, 4).Value = "SUM OF “"Total Inventory"”"
|
||||
' Fila = Fila + 1
|
||||
' libro.Cell(Fila + 1, 1).Value = "RECORD TYPE"
|
||||
' libro.Cell(Fila + 1, 2).Value = "COUNT OF RECORDS"
|
||||
' libro.Cell(Fila + 1, 3).Value = "SUM OF “"On Hand”""
|
||||
' libro.Cell(Fila + 1, 4).Value = "SUM OF “"Total Inventory"”"
|
||||
|
||||
|
||||
Fila = Fila + 1
|
||||
libro.Cell(Fila + 1, 1).Value = "OBLIGATORIO"
|
||||
libro.Cell(Fila + 1, 2).Value = "OBLIGATORIO"
|
||||
libro.Cell(Fila + 1, 3).Value = "OBLIGATORIO"
|
||||
libro.Cell(Fila + 1, 4).Value = "OBLIGATORIO"
|
||||
' Fila = Fila + 1
|
||||
' libro.Cell(Fila + 1, 1).Value = "OBLIGATORIO"
|
||||
' libro.Cell(Fila + 1, 2).Value = "OBLIGATORIO"
|
||||
' libro.Cell(Fila + 1, 3).Value = "OBLIGATORIO"
|
||||
' libro.Cell(Fila + 1, 4).Value = "OBLIGATORIO"
|
||||
|
||||
Dim Codigo As Double = 0
|
||||
Dim SaldoFCant As Double = 0
|
||||
Dim SaldoFImp As Double = 0
|
||||
If Not IsNothing(dt) AndAlso dt.Rows.Count > 0 Then
|
||||
Codigo = dt.COUNT("Codigo", "CvePS>0")
|
||||
SaldoFCant = dt.SUM("SaldoFCant", "CvePS>0")
|
||||
SaldoFImp = dt.SUM("SaldoFImp", "CvePS>0")
|
||||
End If
|
||||
Fila = Fila + 1
|
||||
libro.Cell(Fila + 1, 1).Value = "IT"
|
||||
libro.Cell(Fila + 1, 2).Value = String.Format("{0}", Codigo)
|
||||
'libro.Cell(Fila + 1, 2).Style.NumberFormat.Format = "N2"
|
||||
libro.Cell(Fila + 1, 3).Value = String.Format("{0}", SaldoFCant)
|
||||
'libro.Cell(Fila + 1, 3).Style.NumberFormat.Format = "N2"
|
||||
libro.Cell(Fila + 1, 4).Value = String.Format("{0}", SaldoFCant)
|
||||
'libro.Cell(Fila + 1, 4).Style.NumberFormat.Format = "$ #,##0.00"
|
||||
' Dim Codigo As Double = 0
|
||||
' Dim SaldoFCant As Double = 0
|
||||
' Dim SaldoFImp As Double = 0
|
||||
' If Not IsNothing(dt) AndAlso dt.Rows.Count > 0 Then
|
||||
' Codigo = dt.COUNT("Codigo", "CvePS>0")
|
||||
' SaldoFCant = dt.SUM("SaldoFCant", "CvePS>0")
|
||||
' SaldoFImp = dt.SUM("SaldoFImp", "CvePS>0")
|
||||
' End If
|
||||
' Fila = Fila + 1
|
||||
' libro.Cell(Fila + 1, 1).Value = "IT"
|
||||
' libro.Cell(Fila + 1, 2).Value = String.Format("{0}", Codigo)
|
||||
' 'libro.Cell(Fila + 1, 2).Style.NumberFormat.Format = "N2"
|
||||
' libro.Cell(Fila + 1, 3).Value = String.Format("{0}", SaldoFCant)
|
||||
' 'libro.Cell(Fila + 1, 3).Style.NumberFormat.Format = "N2"
|
||||
' libro.Cell(Fila + 1, 4).Value = String.Format("{0}", SaldoFCant)
|
||||
' 'libro.Cell(Fila + 1, 4).Style.NumberFormat.Format = "$ #,##0.00"
|
||||
|
||||
|
||||
''Guarda streem y descarga
|
||||
Dim fs As Stream = New MemoryStream()
|
||||
wb.SaveAs(fs)
|
||||
fs.Position = 0
|
||||
Dim memoryStream As New MemoryStream()
|
||||
Using input As Stream = fs
|
||||
input.CopyTo(memoryStream)
|
||||
End Using
|
||||
memoryStream.Position = 0
|
||||
' ''Guarda streem y descarga
|
||||
' Dim fs As Stream = New MemoryStream()
|
||||
' wb.SaveAs(fs)
|
||||
' fs.Position = 0
|
||||
' Dim memoryStream As New MemoryStream()
|
||||
' Using input As Stream = fs
|
||||
' input.CopyTo(memoryStream)
|
||||
' End Using
|
||||
' memoryStream.Position = 0
|
||||
|
||||
Response.Clear()
|
||||
Response.Buffer = True
|
||||
' Response.Clear()
|
||||
' Response.Buffer = True
|
||||
|
||||
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
||||
Response.AddHeader("content-disposition", String.Format("attachment;filename={0}.xlsx", "Reporte de Inventarios HP"))
|
||||
Response.BinaryWrite(memoryStream.ToArray())
|
||||
Response.End()
|
||||
' Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
||||
' Response.AddHeader("content-disposition", String.Format("attachment;filename={0}.xlsx", "Reporte de Inventarios HP"))
|
||||
' Response.BinaryWrite(memoryStream.ToArray())
|
||||
' Response.End()
|
||||
|
||||
''endGuarda streem y descarga
|
||||
Catch
|
||||
' ''endGuarda streem y descarga
|
||||
' Catch
|
||||
|
||||
' continuar = False
|
||||
' End Try
|
||||
' If Not continuar Then
|
||||
' Alert("Ocurrió un error al gener el excel", TipoMensaje.MsgAdvertencia)
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
continuar = False
|
||||
End Try
|
||||
If Not continuar Then
|
||||
Alert("Ocurrió un error al gener el excel", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -680,7 +680,7 @@
|
||||
<%--<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="15%" />--%>
|
||||
<asp:TemplateField HeaderText="Serie" ItemStyle-Width="15%" Visible="false" >
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtSerie" Width="90px" runat="server" Text='<%# Eval("Serie") %>' ></asp:TextBox>
|
||||
<asp:TextBox ID="TxtSerie" Width="90px" runat="server" Text='<%# Eval("Serie") %>'></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lote" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center" Visible="false" >
|
||||
|
||||
@@ -940,72 +940,34 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim FechaCaducidad As Date
|
||||
|
||||
Dim TextoExistencia As StringBuilder = New StringBuilder
|
||||
Dim Existencia As Decimal
|
||||
Dim CantidadenGrid As Decimal
|
||||
TextoExistencia.Append("Los siguiente productos se ajustaron por falta de existencia:<br/>")
|
||||
If Not CargadoDeMov Then
|
||||
TextoExistencia.Append("Los siguiente productos no tienen existencia:<br/>")
|
||||
|
||||
For Each dr As DataRow In DtMovimientos.Rows
|
||||
CveSeccionAlmacen = If(dr("CveSeccionAlmacen").ToString = "", -1, dr("CveSeccionAlmacen").ToString.ToEntero)
|
||||
Serie = If(dr("Serie").ToString = "", "-1", dr("Serie").ToString)
|
||||
Lote = If(dr("Lote").ToString = "", "-1", dr("Lote").ToString)
|
||||
FechaCaducidad = If(dr("FechaCaducidad").ToString = "", MinFecha, dr("FechaCaducidad").ToString.ToDate)
|
||||
Dim tLote As String = If(Lote <> "-1", String.Format("AND Lote = '{0}' ", Lote), "")
|
||||
Dim tFechaCaducidad As String = If(FechaCaducidad > MinFecha, String.Format("AND FechaCaducidad = '{0}' ", FechaCaducidad), "")
|
||||
For Each gvr As GridViewRow In GvDatos.Rows
|
||||
Dim Existencia As Decimal = 0
|
||||
CveSeccionAlmacen = If(gvr.DataKey("CveSeccionAlmacen") = "", -1, gvr.DataKey("CveSeccionAlmacen").ToEntero)
|
||||
Serie = If(gvr.DataKey("Serie") = "", "-1", gvr.DataKey("Serie"))
|
||||
Lote = If(gvr.DataKey("Lote") = "", "-1", gvr.DataKey("Lote"))
|
||||
FechaCaducidad = If(gvr.DataKey("FechaCaducidad") = "", MinFecha, gvr.DataKey("FechaCaducidad").ToDate)
|
||||
|
||||
Dim ExistenciaEspecificada As Decimal = 0
|
||||
CantidadenGrid = DtMovimientos.SUMD("Cantidad", String.Format("CvePS = {0} AND CveUM = {1} {2} {3} {4} ", dr("CvePS"), dr("CveUM"), If(Not dr("Serie").ToString.Contiene("-1", ""), $" AND Serie = '{dr("Serie")}'", ""), tLote, tFechaCaducidad))
|
||||
If ObjInventario.GetExistenciasProducto(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
|
||||
'si hay existencia en almacen costeado, lo tengo que sacar
|
||||
Existencia = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||
End If
|
||||
If ObjInventario.GetExistenciasProducto(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
|
||||
'si hay existencia en almacen costeado, lo tengo que sacar
|
||||
Existencia = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||
End If
|
||||
Existencia -= gvr.FCTextBox("TxtCantidad2").Text.ToEntero()
|
||||
|
||||
'Existencia = ObjInventario.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=1)
|
||||
Existencia -= CantidadenGrid
|
||||
'DtMovimientos.SUM("Cantidad", String.Format("CvePS = {0}", dr("CvePS").ToString.ToEntero))
|
||||
'la primera vez valida, que la existencia global, cumpla, considerando lo pendiente por surtir
|
||||
'las segunda consulta, que tenga existencia, ya con los parametros especificos
|
||||
If FechaCaducidad > MinFecha OrElse (Lote <> "-1" AndAlso Lote <> "") OrElse (Serie <> "-1" AndAlso Serie <> "") Then
|
||||
If ObjInventario.GetExistenciasProducto(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
|
||||
ExistenciaEspecificada = ObjInventario.DtResultados.FiltroPrimeroValor("Existencia", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||
End If
|
||||
Existencia = ExistenciaEspecificada - CantidadenGrid
|
||||
End If
|
||||
If Existencia < 0 Then
|
||||
ErrorExistencia = True
|
||||
|
||||
If Existencia < 0 Then
|
||||
ErrorExistencia = True
|
||||
dr("EstatusExistencia") = "-1"
|
||||
dr("Cantidad") = Existencia
|
||||
TextoExistencia.AppendFormat("- #{0} {1}<br/>", dr("No").ToString, dr("PS").ToString)
|
||||
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
For Each gvr As GridViewRow In GvDatos.Rows
|
||||
CveSeccionAlmacen = If(gvr.DataKey("CveSeccionAlmacen") = "", -1, gvr.DataKey("CveSeccionAlmacen").ToEntero)
|
||||
Serie = If(gvr.DataKey("Serie") = "", "-1", gvr.DataKey("Serie"))
|
||||
Lote = If(gvr.DataKey("Lote") = "", "-1", gvr.DataKey("Lote"))
|
||||
FechaCaducidad = If(gvr.DataKey("FechaCaducidad") = "", MinFecha, gvr.DataKey("FechaCaducidad").ToDate)
|
||||
|
||||
If ObjInventario.GetExistenciasProducto(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
|
||||
'si hay existencia en almacen costeado, lo tengo que sacar
|
||||
Existencia = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CVeAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||
End If
|
||||
'Existencia = ObjInventario.GetExistenciasPS(gvr.DataKey("CvePS").ToString.ToEntero, gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=1)
|
||||
Existencia -= gvr.FCTextBox("TxtCantidad2").Text.ToEntero
|
||||
If Existencia < 0 Then
|
||||
ErrorExistencia = True
|
||||
|
||||
gvr.FCTextBox("TxtCantidad2").Text = (Existencia + gvr.FCTextBox("TxtCantidad2").Text.ToEntero).ToString
|
||||
TextoExistencia.AppendFormat("- #{0} {1}<br/>", gvr.DataKey("No").ToString, gvr.DataKey("PS").ToString)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
'gvr.FCTextBox("TxtCantidad2").Text = (Existencia + gvr.FCTextBox("TxtCantidad2").Text.ToEntero).ToString
|
||||
TextoExistencia.AppendFormat("-<b>#{0}</b> {1} {2} Existencia: <b>{3}</b><br/>", gvr.DataKey("No"), gvr.DataKey("PS"), If(gvr.DataKey("Serie").ToString().Trim().Length > 0, $" Serie: <b>{gvr.DataKey("Serie")}</b>", ""), (Existencia + gvr.FCTextBox("TxtCantidad2").Text.ToEntero))
|
||||
End If
|
||||
Next
|
||||
|
||||
If ErrorExistencia Then
|
||||
ObjInventario.Dispose()
|
||||
Alert(TextoExistencia.ToString, TipoMensaje.MsgError)
|
||||
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
|
||||
ObjInventario.Dispose()
|
||||
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
@@ -1808,6 +1770,11 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
e.Row.FCTextBox("TxtCaducidad").Visible = True
|
||||
End If
|
||||
|
||||
e.Row.FCTextBox("TxtSerie").ReadOnly = True
|
||||
|
||||
'e.Row.FCTextBox("TxtSerie").Enabled = False
|
||||
|
||||
|
||||
End If
|
||||
|
||||
'FUNCIONALIDAD PISTOLA DE CODIGOS
|
||||
@@ -1818,7 +1785,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnCancelarTraspaso_Click(sender As Object, e As EventArgs)
|
||||
|
||||
@@ -226,6 +226,8 @@
|
||||
<asp:BoundField DataField="Marca" HeaderText="Marca" Visible="false" ItemStyle-Width="20px" />
|
||||
<asp:BoundField DataField="VentaMinima" HeaderText="Venta Mínima" Visible="false" ItemStyle-Width="20px" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="CodigoBarras" HeaderText="Código Barras" Visible="false" />
|
||||
<asp:BoundField DataField="Compuesto" HeaderText="Compuesto" Visible="false" />
|
||||
<asp:BoundField DataField="RegistroRSCO" HeaderText="RSCO" Visible="false" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
@@ -304,6 +306,10 @@
|
||||
<asp:CheckBox ID="ChkVentaMinima" runat="server" Text="Venta Mínima" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkCodigoBarras" runat="server" Text="Código Barras" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkCompuesto" runat="server" Text="Compuesto" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkRSCO" runat="server" Text="RSCO" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -118,6 +118,8 @@ Partial Class CatPS
|
||||
GvDatos.Columns(12).Visible = ChkMarca.Checked
|
||||
GvDatos.Columns(13).Visible = ChkVentaMinima.Checked
|
||||
GvDatos.Columns(14).Visible = ChkCodigoBarras.Checked
|
||||
GvDatos.Columns(15).Visible = ChkCompuesto.Checked
|
||||
GvDatos.Columns(16).Visible = ChkRSCO.Checked
|
||||
|
||||
CargaDatos()
|
||||
OrdenaDatos()
|
||||
|
||||
@@ -1969,7 +1969,7 @@ Partial Class PV
|
||||
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
|
||||
PedidoContrato:="", AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero,
|
||||
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero, TipoDocto:="Rem", CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal,
|
||||
OrdenCompra:="", RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=0) Then
|
||||
OrdenCompra:="", RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=0, ServicioDomicilio:=ChkServicioDomicilio.Checked) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
@@ -4446,26 +4446,26 @@ Partial Class PV
|
||||
Descuento = 0
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
'LTH AA Paq. 2 baterias, LTH AAA Paq. 02 baterias, LTH AA Paq. 4 baterias, LTH AAA Paq. 4 Baterias
|
||||
If CvePS.Contiene(521445, 521448, 402917, 402918) Then
|
||||
'SI TIENE BATERIAS AGREGADAS CON LA MARCA LTH, APLICAR PROMOCION, LA CLASIFICACION DEBE SER ACUMULADORES
|
||||
If TmpDT.SUMD("Cantidad", "CveMarca IN (819,826,1085,1052) AND CveClasificacion IN (20520,20522,20513,20521,20512,20514,20229)") >= 1D Then
|
||||
Descuento = 0
|
||||
SeAjustoPU = True
|
||||
'Paq. 2 baterias
|
||||
If CvePS.Contiene(521445, 521448) Then
|
||||
PUPromocion = 25D
|
||||
End If
|
||||
'Paq. 4 baterias
|
||||
If CvePS.Contiene(402917, 402918) Then
|
||||
PUPromocion = 40D
|
||||
End If
|
||||
PUModificado = Math.Round(PUPromocion / (1 + PorcentajeIVA), 6)
|
||||
End If
|
||||
End If
|
||||
'If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
' 'LTH AA Paq. 2 baterias, LTH AAA Paq. 02 baterias, LTH AA Paq. 4 baterias, LTH AAA Paq. 4 Baterias
|
||||
' If CvePS.Contiene(521445, 521448, 402917, 402918) Then
|
||||
' 'SI TIENE BATERIAS AGREGADAS CON LA MARCA LTH, APLICAR PROMOCION, LA CLASIFICACION DEBE SER ACUMULADORES
|
||||
' If TmpDT.SUMD("Cantidad", "CveMarca IN (819,826,1085,1052) AND CveClasificacion IN (20520,20522,20513,20521,20512,20514,20229)") >= 1D Then
|
||||
' Descuento = 0
|
||||
' SeAjustoPU = True
|
||||
' 'Paq. 2 baterias
|
||||
' If CvePS.Contiene(521445, 521448) Then
|
||||
' PUPromocion = 25D
|
||||
' End If
|
||||
' 'Paq. 4 baterias
|
||||
' If CvePS.Contiene(402917, 402918) Then
|
||||
' PUPromocion = 40D
|
||||
' End If
|
||||
' PUModificado = Math.Round(PUPromocion / (1 + PorcentajeIVA), 6)
|
||||
' End If
|
||||
' End If
|
||||
|
||||
End If
|
||||
'End If
|
||||
|
||||
ObjDescuento.ImporteDescuento = Descuento
|
||||
ObjDescuento.CvePromocionDetalle = CvePromocionDetalle
|
||||
|
||||
@@ -5085,12 +5085,23 @@ Partial Class Ventas
|
||||
VentaActual.PorcentajeIVA = DbRowVenta("PorcentajeIVA").ToString.ToDecimal
|
||||
VentaActual.UsuarioActual = UsuarioActual
|
||||
VentaActual.CveSubProyecto = DbRowVenta("CveSubProyecto").ToString.ToEntero
|
||||
VentaActual.IdCtaContableCliente = IIf(VentaActual.CveMoneda = 1, ViewState("IdCtaContClientes"), ViewState("IdCtaContMonedaExtranjera")).ToString.ToEntero
|
||||
VentaActual.IdCtaContableClienteComplementaria = ViewState("IdCtaContComplementaria").ToString.ToEntero
|
||||
|
||||
VentaActual.IdCtaContableClienteAnticipo = ViewState("IdCtaContAnticipos").ToString.ToEntero
|
||||
VentaActual.IdCtaContableClienteAnticipoExtranjera = ViewState("IdCtaContAnticiposExtranjera").ToString.ToEntero
|
||||
VentaActual.IdCtaContableClienteAnticipoComplementaria = ViewState("IdCtaContAnticiposComplementaria").ToString.ToEntero
|
||||
If CveEmpresaCRM > 0 Then
|
||||
VentaActual.IdCtaContableCliente = -1
|
||||
VentaActual.IdCtaContableClienteComplementaria = -1
|
||||
|
||||
VentaActual.IdCtaContableClienteAnticipo = -1
|
||||
VentaActual.IdCtaContableClienteAnticipoExtranjera = -1
|
||||
VentaActual.IdCtaContableClienteAnticipoComplementaria = -1
|
||||
Else
|
||||
VentaActual.IdCtaContableCliente = IIf(VentaActual.CveMoneda = 1, ViewState("IdCtaContClientes"), ViewState("IdCtaContMonedaExtranjera")).ToString.ToEntero
|
||||
VentaActual.IdCtaContableClienteComplementaria = ViewState("IdCtaContComplementaria").ToString.ToEntero
|
||||
|
||||
VentaActual.IdCtaContableClienteAnticipo = ViewState("IdCtaContAnticipos").ToString.ToEntero
|
||||
VentaActual.IdCtaContableClienteAnticipoExtranjera = ViewState("IdCtaContAnticiposExtranjera").ToString.ToEntero
|
||||
VentaActual.IdCtaContableClienteAnticipoComplementaria = ViewState("IdCtaContAnticiposComplementaria").ToString.ToEntero
|
||||
End If
|
||||
|
||||
|
||||
HdnAmortizacion.Value = LblAmort.Text.ToDouble.ToString()
|
||||
HdnSubTotalDescuestos.Value = (TxtSubTotal.Text.Replace(",", "").ToDouble - LblDescuentos.Text.Replace(",", "").ToDouble - LblAmortizacion.Text.Trim.Replace(",", "").ToDouble - TxtRetISR.Text.Replace(",", "").ToDouble).FormatoNumero(2)
|
||||
@@ -21180,7 +21191,8 @@ Partial Class Ventas
|
||||
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
|
||||
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(),
|
||||
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), TipoDocto:="Rem", CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal,
|
||||
OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=TxtKilometraje.Text.ToDouble, CveUsoCFDi:=DdlUsoCFDI.SelectedValue.ToEntero(), CveVendedor:=DdlVendedor.SelectedValue.ToEntero()) Then
|
||||
OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=TxtKilometraje.Text.ToDouble, CveUsoCFDi:=DdlUsoCFDI.SelectedValue.ToEntero(),
|
||||
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), ServicioDomicilio:=TrServicioDomicilio.Visible) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
|
||||
Reference in New Issue
Block a user