This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -4303,6 +4303,13 @@ Partial Class Compras_Compras
|
||||
If RBLPago.SelectedValue.ToEntero = 4 And EstatusCredito.Contiene(1, 101) Then
|
||||
CveEstatusFactura = 6
|
||||
End If
|
||||
'hay amortización directa como descuento. RMF Temporal
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
If LblAmortizacion.Text.ToDouble > 0 AndAlso TxtDescuento.Text.ToDouble = 0 Then
|
||||
TxtDescuento.Text = LblAmortizacion.Text
|
||||
LblAmortizacion.Text = "0.00"
|
||||
End If
|
||||
End If
|
||||
|
||||
'Compra
|
||||
If ObjCompras.AddCompra(DdlTipoComprobante.SelectedValue, TxtDescripcion.Text.Trim, TxtSerie.Text.Trim, TxtFolio.Text.Trim, TxtFolioSecundario.Text.Trim, CveProveedor, TxtSubTotal.Text.ToDouble, TxtDescuento.Text.ToDouble,
|
||||
@@ -6889,24 +6896,24 @@ Partial Class Compras_Compras
|
||||
Dim ImporteIVA As Decimal = Math.Round(PorcentajePagoAnt * TxtIVA.Text.ToDecimal, 2)
|
||||
|
||||
'Agregamos el 14
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteIVA, Referencia, 14, Concepto, FechaMovimiento, CtaIvaxAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), CveCuenta:=CveCuentaIvaxAcreditar, PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then
|
||||
If ImporteIVA > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteIVA, Referencia, 14, Concepto, FechaMovimiento, CtaIvaxAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), CveCuenta:=CveCuentaIvaxAcreditar, PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
'Agregamos el 19
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteIVA, Referencia, 19, Concepto, FechaMovimiento, CtaIvaAcreditable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then
|
||||
If ImporteIVA > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteIVA, Referencia, 19, Concepto, FechaMovimiento, CtaIvaAcreditable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
Dim ImporteIEPS As Decimal = Math.Round(PorcentajePagoAnt * TxtIEPS.Text.ToDecimal, 2)
|
||||
|
||||
'Agregamos el 25
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteIEPS, Referencia, 25, Concepto, FechaMovimiento, CtaIvaxAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), CveCuenta:=CveCuentaIvaxAcreditar, PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then
|
||||
If ImporteIEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteIEPS, Referencia, 25, Concepto, FechaMovimiento, CtaIvaxAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), CveCuenta:=CveCuentaIvaxAcreditar, PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
'Agregamos el 26
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteIEPS, Referencia, 26, Concepto, FechaMovimiento, CtaIvaAcreditable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then
|
||||
If ImporteIEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteIEPS, Referencia, 26, Concepto, FechaMovimiento, CtaIvaAcreditable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
@@ -6989,10 +6996,10 @@ Partial Class Compras_Compras
|
||||
CveCuentaPago = CveCuentaProveedorExtranjera
|
||||
End If
|
||||
|
||||
''Agregamos el 17
|
||||
'If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 17, Concepto, FechaMovimiento, IdCtaContablePago, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuentaPago, Contabilizable:=SeContabiliza) Then
|
||||
' ErrorPrepoliza = True
|
||||
'End If
|
||||
'Agregamos el 17
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 17, Concepto, FechaMovimiento, IdCtaContablePago, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuentaPago, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
End If
|
||||
' FLUCTUACION CAMBIARIA
|
||||
@@ -14800,7 +14807,7 @@ Partial Class Compras_Compras
|
||||
AddPS2(False)
|
||||
|
||||
'AJUSTE DE REDONDEO O DIFERENCIA PERMITIDA DE IMPORTE
|
||||
AjustaImporteUltimoConcepto((If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, TmpDT.SUMD("ImporteSinImpuestos"), TxtSubTotal.Text.ToDouble) + TxtOtrosImpuestos.Text.ToDouble).ToDecimal - If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, TmpDT.SUM("ImporteSinImpuestos").ToString.ToDecimal, TmpDT.SUM("Total").ToString.ToDecimal))
|
||||
AjustaImporteUltimoConcepto((If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, TmpDT.SUMD("ImporteSinImpuestos"), TxtSubTotal2.Text.ToDouble) + TxtOtrosImpuestos.Text.ToDouble).ToDecimal - If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, TmpDT.SUM("ImporteSinImpuestos").ToString.ToDecimal, TmpDT.SUM("Total").ToString.ToDecimal))
|
||||
'AjustaImporteUltimoConcepto(TxtSubTotal2.Text.ToDecimal + TxtOtrosImpuestos.Text.ToDecimal - (TmpDT.SUM("Total").ToString.ToDecimal))
|
||||
|
||||
|
||||
|
||||
@@ -1223,7 +1223,7 @@ Partial Class PopUpVerFactura
|
||||
Remision, Proveedor, CalleOrigen, NoExtOrigen, ColoniaOrigen, LocalidadOrigen, MunicipioOrigen,
|
||||
EstadoOrigen, PaisOrigen, CPOrigen, CalleDestino, NoExtDestino, ColoniaDestino, LocalidadDestino,
|
||||
MunicipioDestino, EstadoDestino, PaisDestino, CPDestino, FechaMovimiento, NombreCapturo, PuestoRecibio,
|
||||
PuestoEnrego, RazonSocial, ResponsableCarga, ResponsableRecibio)
|
||||
PuestoEnrego, RazonSocial, ResponsableCarga, ResponsableRecibio, NombreCliente)
|
||||
|
||||
End Sub
|
||||
Private Sub PUanacExtr(CveMoneda As Integer) 'preciounitario a moneda nacional o extranjera
|
||||
@@ -1240,7 +1240,7 @@ Partial Class PopUpVerFactura
|
||||
Remision As String, Proveedor As String, CalleOrigen As String, NoExtOrigen As String, ColoniaOrigen As String, LocalidadOrigen As String, MunicipioOrigen As String,
|
||||
EstadoOrigen As String, PaisOrigen As String, CPOrigen As String, CalleDestino As String, NoExtDestino As String, ColoniaDestino As String, LocalidadDestino As String, MunicipioDestino As String,
|
||||
EstadoDestino As String, PaisDestino As String, CPDestino As String, FechaMovimiento As Date, NombreCapturo As String, PuestoRecibio As String, PuestoEntrego As String,
|
||||
RazonSocial As String, ResponsableCarga As String, ResponsableRecibio As String)
|
||||
RazonSocial As String, ResponsableCarga As String, ResponsableRecibio As String, NombreCliente As String)
|
||||
|
||||
|
||||
Select Case CveConcepto
|
||||
@@ -1402,8 +1402,8 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("Fecha", Fecha))
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("Folio", Folio))
|
||||
params.Add(New ReportParameter("FacturadoA", NombreCliente))
|
||||
params.Add(New ReportParameter("FacturaProveedor", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("SerieFolio").ToString, "")))
|
||||
params.Add(New ReportParameter("FacturadoA", RazonSocial))
|
||||
params.Add(New ReportParameter("Descuentos", If(CveCompra > 0 AndAlso dr IsNot Nothing, (dr("Descuentos").ToString.ToDouble).FormatoNumero(2), "")))
|
||||
params.Add(New ReportParameter("IVA", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("IVA").ToString.FormatoNumero(2), "")))
|
||||
params.Add(New ReportParameter("Total", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("Total").ToString.FormatoNumero(2), "")))
|
||||
@@ -1586,7 +1586,7 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("Almacen", Almacen))
|
||||
params.Add(New ReportParameter("Fecha", Fecha))
|
||||
params.Add(New ReportParameter("FacturaProveedor", FolioVenta))
|
||||
params.Add(New ReportParameter("FacturadoA", DtMovimientos(0)("Nombre").ToString))
|
||||
params.Add(New ReportParameter("FacturadoA", If(DtMovimientos(0)("Nombre").ToString <> "", DtMovimientos(0)("Nombre").ToString, NombreCliente)))
|
||||
params.Add(New ReportParameter("Observaciones", Observaciones))
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("Folio", Folio))
|
||||
@@ -1672,6 +1672,7 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("Total", ""))
|
||||
'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
||||
params.Add(New ReportParameter("FacturadoA", NombreCliente))
|
||||
If (UsuarioActual.CveEmpresa = 72) Then
|
||||
params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
|
||||
End If
|
||||
@@ -1700,6 +1701,7 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("Total", ""))
|
||||
'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
||||
params.Add(New ReportParameter("FacturadoA", NombreCliente))
|
||||
If (UsuarioActual.CveEmpresa = 72) Then
|
||||
params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
|
||||
End If
|
||||
@@ -2364,7 +2366,7 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("Total", ""))
|
||||
'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
||||
|
||||
params.Add(New ReportParameter("FacturadoA", NombreCliente))
|
||||
If (UsuarioActual.CveEmpresa = 72) Then
|
||||
params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
|
||||
End If
|
||||
@@ -2393,6 +2395,7 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("Total", ""))
|
||||
'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
||||
params.Add(New ReportParameter("FacturadoA", NombreCliente))
|
||||
If (UsuarioActual.CveEmpresa = 72) Then
|
||||
params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
|
||||
End If
|
||||
@@ -2421,6 +2424,7 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("Total", ""))
|
||||
'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
||||
params.Add(New ReportParameter("FacturadoA", NombreCliente))
|
||||
If (UsuarioActual.CveEmpresa = 72) Then
|
||||
params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
|
||||
End If
|
||||
@@ -2448,6 +2452,7 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("Total", ""))
|
||||
'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
||||
params.Add(New ReportParameter("FacturadoA", NombreCliente))
|
||||
If (UsuarioActual.CveEmpresa = 72) Then
|
||||
params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
|
||||
End If
|
||||
|
||||
@@ -291,7 +291,7 @@
|
||||
|
||||
<asp:HiddenField runat="server" ID="HdnFechasComprasVinculadas" Value="-1" ClientIDMode="Static" />
|
||||
|
||||
<asp:GridView ID="GvCxP" GridLines="None" CssClass="table table-hover table-advance Widthall" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas por Pagar pendientes" DataKeyNames="CveCompra,FechaCompra,Proveedor,SerieFolio,Original,SubTotal,IVA,RetIVA,RetISR,IdCtaContProveedores,IdCtaContProveedoresSIG,CvePrePoliza,IdPoliza,CveRetIVAConcepto,CveRetISRConcepto,IVAPorcentaje">
|
||||
<asp:GridView ID="GvCxP" GridLines="None" CssClass="table table-hover table-advance Widthall" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas por Pagar pendientes" DataKeyNames="CveCompra,FechaCompra,Proveedor,SerieFolio,Original,SubTotal,IVA,RetIVA,RetISR,IdCtaContProveedores,IdCtaContProveedoresSIG,CvePrePoliza,IdPoliza,CveRetIVAConcepto,CveRetISRConcepto,IVAPorcentaje,NoDeducible,IVADeducible,IVANoDeducible">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
|
||||
@@ -696,12 +696,21 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.DataKey("IVA").ToDecimal * PorcentajePago, Referencia, 14, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAXAcreditar > 0, IdCtaContIVAXAcreditar, IdCtaIVAxAcreditar), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVA").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambio, CveCuenta:=CveCuentaIVAxAcreditar, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
|
||||
MsgError = "Detalle"
|
||||
End If
|
||||
|
||||
Dim ImporteNOIVA As Decimal = gvr.DataKey("IVA").ToDecimal * PorcentajePago
|
||||
'Agrego el IVA
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, gvr.DataKey("IVA").ToDecimal * PorcentajePago, Referencia, 19, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAAcreditable > 0, IdCtaContIVAAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVA").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
|
||||
MsgError = "Detalle"
|
||||
End If
|
||||
End If
|
||||
|
||||
If gvr.DataKey("NoDeducible") Then
|
||||
|
||||
Dim ImporteNOIVA As Decimal = gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAAcreditable > 0, IdCtaContIVAAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVA").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
|
||||
MsgError = "Detalle"
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If MsgError = "" AndAlso gvr.DataKey("RetIVA").ToDecimal > 0 Then
|
||||
@@ -1494,7 +1503,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
Protected Sub GvChequesFYE_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.FCHyperLink("HLFYE").NavigateUrl = String.Format("/RH/Personal.aspx?CvePersonal={0}", e.Row.DBCampo("CvePersonal"))
|
||||
e.Row.FCHyperLink("HLCheque").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
|
||||
'e.Row.FCHyperLink("HLCheque").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
4472
Empresas/146/Formatos/Remision.rdlc
Normal file
4472
Empresas/146/Formatos/Remision.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -523,8 +523,8 @@
|
||||
<DataSetName>DsInventarios</DataSetName>
|
||||
<Top>0.17639cm</Top>
|
||||
<Left>0.12931cm</Left>
|
||||
<Height>1.11095cm</Height>
|
||||
<Width>17.80043cm</Width>
|
||||
<Height>1.11096cm</Height>
|
||||
<Width>17.80045cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -567,10 +567,10 @@
|
||||
<Height>0.82291in</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>7.12873in</Width>
|
||||
<Width>7.05896in</Width>
|
||||
<Page>
|
||||
<PageHeader>
|
||||
<Height>3.79401cm</Height>
|
||||
<Height>4.11151cm</Height>
|
||||
<PrintOnFirstPage>true</PrintOnFirstPage>
|
||||
<PrintOnLastPage>true</PrintOnLastPage>
|
||||
<ReportItems>
|
||||
@@ -644,7 +644,7 @@
|
||||
<Value>=Parameters!LogoPath.Value</Value>
|
||||
<Sizing>FitProportional</Sizing>
|
||||
<Top>0.3175cm</Top>
|
||||
<Left>0.16459cm</Left>
|
||||
<Left>0.19987cm</Left>
|
||||
<Height>1.66316cm</Height>
|
||||
<Width>3.43141cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
@@ -669,7 +669,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox15</rd:DefaultName>
|
||||
<Top>2.09104cm</Top>
|
||||
<Top>2.40854cm</Top>
|
||||
<Left>2.30482cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>9.54145cm</Width>
|
||||
@@ -685,7 +685,6 @@
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox18">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
@@ -699,7 +698,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox18</rd:DefaultName>
|
||||
<Top>2.83214cm</Top>
|
||||
<Top>3.14964cm</Top>
|
||||
<Left>2.30482cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>9.54145cm</Width>
|
||||
@@ -731,7 +730,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox16</rd:DefaultName>
|
||||
<Top>2.843cm</Top>
|
||||
<Top>3.1605cm</Top>
|
||||
<Left>0.14172cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>2.11724cm</Width>
|
||||
@@ -766,7 +765,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox14</rd:DefaultName>
|
||||
<Top>2.09104cm</Top>
|
||||
<Top>2.40854cm</Top>
|
||||
<Left>0.12931cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>2.12965cm</Width>
|
||||
@@ -872,7 +871,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox4</rd:DefaultName>
|
||||
<Top>2.84301cm</Top>
|
||||
<Top>3.16051cm</Top>
|
||||
<Left>12.17799cm</Left>
|
||||
<Height>0.59999cm</Height>
|
||||
<Width>1.80326cm</Width>
|
||||
@@ -888,7 +887,6 @@
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox10">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
@@ -904,10 +902,10 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox6</rd:DefaultName>
|
||||
<Top>2.09105cm</Top>
|
||||
<Top>2.40855cm</Top>
|
||||
<Left>13.98125cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>3.94849cm</Width>
|
||||
<Width>3.65324cm</Width>
|
||||
<ZIndex>10</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -938,10 +936,10 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox32</rd:DefaultName>
|
||||
<Top>2.84301cm</Top>
|
||||
<Top>3.16051cm</Top>
|
||||
<Left>13.98125cm</Left>
|
||||
<Height>0.59999cm</Height>
|
||||
<Width>3.94849cm</Width>
|
||||
<Width>3.65324cm</Width>
|
||||
<ZIndex>11</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -970,7 +968,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||
<Top>2.09105cm</Top>
|
||||
<Top>2.40855cm</Top>
|
||||
<Left>12.17799cm</Left>
|
||||
<Height>0.59999cm</Height>
|
||||
<Width>1.80326cm</Width>
|
||||
|
||||
Binary file not shown.
@@ -141,7 +141,7 @@
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row" style="padding-top: 10px; position: relative;">
|
||||
|
||||
<asp:Label runat="server" ID="LblPS" CssClass="col-md-1 truncate" style="max-width: 80px;">Producto:</asp:Label>
|
||||
<asp:Label runat="server" ID="LblPS" CssClass="col-md-1 truncate" Style="max-width: 80px;">Producto:</asp:Label>
|
||||
<div class="col-md-2 " style="min-width: 250px; max-width: 300px;">
|
||||
<ADS:Dropdownlost ID="ddlProducto2" runat="server" AutoPostBack="False" DataTextField="PSCodigo" IncluyeTodos="false" DataValueField="CvePS" CssClassDdl="select2me" CssStyle="width: 250px; "></ADS:Dropdownlost>
|
||||
</div>
|
||||
@@ -181,37 +181,49 @@
|
||||
<asp:CheckBox ID="ChkAgruparAlmacen" CssClass="md-checksd" runat="server" Text="Agrupar Almacenes" Checked="False" Visible="false" />
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Clasificación:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlClasificacion" CssClass="select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 250px !important;">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate">Unidad Medida:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlUnidadMedida" runat="server" CssClass="select2me " Style="width: 200px !important;" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<asp:CheckBox ID="cbEntrada" CssClass="md-checksd" runat="server" Text="Entrada" Checked="True" />
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<asp:CheckBox ID="cbSalida" CssClass="md-checksd" runat="server" Text="Salida" Checked="True" />
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#ModalTiposAlmacen">Filtrar tipos almacén</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="DivSerie" runat="server" visible="false">
|
||||
<label class="col-md-1 truncate" style="max-width: 80px;">Serie:</label>
|
||||
<div class="col-md-1 ">
|
||||
<asp:TextBox ID="TxtSerie" CssClass="form-control input-sm" runat="server" Width="90px" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Clasificación:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlClasificacion" CssClass="select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 250px !important;">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate">Unidad Medida:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlUnidadMedida" runat="server" CssClass="select2me " Style="width: 200px !important;" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<asp:CheckBox ID="cbEntrada" CssClass="md-checksd" runat="server" Text="Entrada" Checked="True" />
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:CheckBox ID="cbSalida" CssClass="md-checksd" runat="server" Text="Salida" Checked="True" />
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#ModalTiposAlmacen">Filtrar tipos almacén</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -307,8 +319,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right">
|
||||
<asp:Literal ID="LtIndicador_Mensaje" Text="" runat="server" />
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6 text-left">
|
||||
<asp:Literal ID="LtIndicador_MensajeSerie" Text="" runat="server" />
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
<asp:Literal ID="LtIndicador_Mensaje" Text="" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -408,6 +425,7 @@
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:AsyncPostBackTrigger ControlID="btConsultar" EventName="Click" />
|
||||
@@ -454,7 +472,7 @@
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,378 +1,402 @@
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Inventarios_Kardex
|
||||
Inherits ClsPaginas
|
||||
#Region "P R O P I E D A D E S"
|
||||
'Public Property DtKardex As DataTable
|
||||
' Get
|
||||
' Return CType(ViewState("DtKardex"), DataTable)
|
||||
' End Get
|
||||
' Set(value As DataTable)
|
||||
' ViewState("DtKardex") = value
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
Private Property CveMovimiento() As Integer
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CveMovimiento")), -1, CInt(ViewState("CveMovimiento")))
|
||||
End Get
|
||||
Set
|
||||
ViewState("CveMovimiento") = Value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
TxtFechaI.Text = Now.AddMonths(-1).ToShortDateString
|
||||
TxtFechaF.Text = Now.ToShortDateString
|
||||
CargaCombos()
|
||||
ddlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
If Not UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 13, 66) Then
|
||||
GvM.Columns(6).Visible = True ' SerieLote
|
||||
GvM.Columns(7).Visible = True ' FCaducidad
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(258) Then GvM.Columns(1).Visible = True
|
||||
|
||||
ddlAlmacen.SelectedValue = If(Request("CveAlmacen") IsNot Nothing, Request("CveAlmacen").ToString, "-1")
|
||||
|
||||
If Request("FechaI") IsNot Nothing AndAlso Request("FechaI") <> "-1" Then TxtFechaI.Text = Request("FechaI").ToString
|
||||
If Request("FechaF") IsNot Nothing AndAlso Request("FechaF") <> "-1" Then TxtFechaF.Text = Request("FechaF").ToString
|
||||
|
||||
If IfNull(Request("CvePS"), "-1").ToString.ToEntero > 0 Then CargarKardex(Request("CvePS").ToString.ToEntero)
|
||||
ddlProducto2.SelectedValue = If(Request("CvePS") IsNot Nothing, Request("CvePS").ToString, "-1")
|
||||
|
||||
If Request("CvePS") IsNot Nothing And Request("CvePS") <> "-1" Then
|
||||
ddlProducto2.SelectedValue = If(Request("CvePS") IsNot Nothing, Request("CvePS").ToString, "-1")
|
||||
ddlProducto_SelectedIndexChanged(ddlProducto2, EventArgs.Empty)
|
||||
End If
|
||||
|
||||
CargaPermisos()
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Inventarios_Kardex
|
||||
Inherits ClsPaginas
|
||||
#Region "P R O P I E D A D E S"
|
||||
'Public Property DtKardex As DataTable
|
||||
' Get
|
||||
' Return CType(ViewState("DtKardex"), DataTable)
|
||||
' End Get
|
||||
' Set(value As DataTable)
|
||||
' ViewState("DtKardex") = value
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
Private Property CveMovimiento() As Integer
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CveMovimiento")), -1, CInt(ViewState("CveMovimiento")))
|
||||
End Get
|
||||
Set
|
||||
ViewState("CveMovimiento") = Value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
TxtFechaI.Text = Now.AddMonths(-1).ToShortDateString
|
||||
TxtFechaF.Text = Now.ToShortDateString
|
||||
CargaCombos()
|
||||
ddlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
If Not UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 13, 66) Then
|
||||
GvM.Columns(6).Visible = True ' SerieLote
|
||||
GvM.Columns(7).Visible = True ' FCaducidad
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(258) Then GvM.Columns(1).Visible = True
|
||||
|
||||
ddlAlmacen.SelectedValue = If(Request("CveAlmacen") IsNot Nothing, Request("CveAlmacen").ToString, "-1")
|
||||
|
||||
If Request("FechaI") IsNot Nothing AndAlso Request("FechaI") <> "-1" Then TxtFechaI.Text = Request("FechaI").ToString
|
||||
If Request("FechaF") IsNot Nothing AndAlso Request("FechaF") <> "-1" Then TxtFechaF.Text = Request("FechaF").ToString
|
||||
|
||||
If IfNull(Request("CvePS"), "-1").ToString.ToEntero > 0 Then CargarKardex(Request("CvePS").ToString.ToEntero)
|
||||
ddlProducto2.SelectedValue = If(Request("CvePS") IsNot Nothing, Request("CvePS").ToString, "-1")
|
||||
|
||||
If Request("CvePS") IsNot Nothing And Request("CvePS") <> "-1" Then
|
||||
ddlProducto2.SelectedValue = If(Request("CvePS") IsNot Nothing, Request("CvePS").ToString, "-1")
|
||||
ddlProducto_SelectedIndexChanged(ddlProducto2, EventArgs.Empty)
|
||||
End If
|
||||
|
||||
CargaPermisos()
|
||||
|
||||
If UsuarioActual.CveUsuario = 100 Then
|
||||
LblPS.ToolTip = ddlProducto2.SelectedValue
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region " INICIALIZA VALORES "
|
||||
|
||||
Private Sub CargaPermisos()
|
||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||
GvM.Columns(11).Visible = TienePermisoImportes ' costo
|
||||
GvM.Columns(12).Visible = TienePermisoImportes ' importe
|
||||
GvM.Columns(14).Visible = TienePermisoImportes ' valor
|
||||
End Sub
|
||||
|
||||
Private Function isWithFamily() As Boolean
|
||||
Return (UsuarioActual.CveEmpresa = 66)
|
||||
End Function
|
||||
Private Sub CargaCombos()
|
||||
|
||||
CargaFuncionalidad105()
|
||||
CargaPS()
|
||||
|
||||
ddlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1)
|
||||
ddlAlmacen.DataBind()
|
||||
If IfNull(Request("CveAlmacen"), "-1").ToString.ToEntero > 0 Then ddlAlmacen.SelectedValueExist(Request("CveAlmacen").ToString)
|
||||
CargaClasificaciones()
|
||||
|
||||
CBLTiposAlmacen.DataSource = GlobalDTTipoAlmacen(-1)
|
||||
CBLTiposAlmacen.DataBind()
|
||||
For Each item As ListItem In CBLTiposAlmacen.Items
|
||||
If item.Text = "Entrega Adelantado" Then
|
||||
item.Selected = False
|
||||
Else
|
||||
item.Selected = True
|
||||
End If
|
||||
|
||||
Next
|
||||
End Sub
|
||||
Private Sub CargaFuncionalidad105()
|
||||
ddlProducto2.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
|
||||
If ddlProducto2.UsaWebService Then
|
||||
ddlProducto2.ddlWS.Attributes.Add("data-Estatus", "-1")
|
||||
ddlProducto2.ddlWS.Attributes.Add("data-pagina", "Inventarios")
|
||||
ddlProducto2.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||
|
||||
'DdlClasificacion.AutoPostBack = False
|
||||
Else
|
||||
ddlProducto2.ddl.Items.Add(New ListItem("Seleccione", "-1"))
|
||||
ddlProducto2.ddl.Items.Add(New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2"))
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub CargaClasificaciones()
|
||||
|
||||
Dim CveClasificacion = If(Request("CveClasificacion") IsNot Nothing, Request("CveClasificacion").ToString, "-1")
|
||||
|
||||
If isWithFamily() Then
|
||||
|
||||
DdlClasificacion.DataSource = GlobalDTSubFamilias(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
|
||||
Else
|
||||
Dim ObjClasificaciones As New ClsClasificaciones
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
If ObjClasificaciones.GetClasificacionesExistencias(UsuarioActual.CveEmpresa) Then
|
||||
DdlClasificacion.DataSource = ObjClasificaciones.DtResultados
|
||||
' DdlClasificacion.DataBind()
|
||||
End If
|
||||
Else
|
||||
If ObjClasificaciones.GetClasificacionesExistencias(UsuarioActual.CveEmpresa) Then
|
||||
DdlClasificacion.DataSource = ObjClasificaciones.DtResultados
|
||||
' DdlClasificacion.DataBind()
|
||||
End If
|
||||
End If
|
||||
ObjClasificaciones.Dispose()
|
||||
End If
|
||||
|
||||
'DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("", "Clasificacion")
|
||||
DdlClasificacion.DataBind()
|
||||
DdlClasificacion.SelectedValueExist(CveClasificacion)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " CARGA PS "
|
||||
Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlClasificacion.SelectedIndexChanged
|
||||
CargaPS()
|
||||
End Sub
|
||||
Private Sub CargaPS()
|
||||
If Not ddlProducto2.UsaWebService Then
|
||||
Dim Filtro = If(DdlClasificacion.SelectedValue.ToEntero > 0, String.Format("CveClasificacion={0} And CveTipoPS=2", DdlClasificacion.SelectedValue), "CveTipoPS=2")
|
||||
ddlProducto2.ddl.Items.Clear()
|
||||
ddlProducto2.DataSource = GlobalDTPS(UsuarioActual.CveEmpresa).FiltraParametros(Filtro, "PSCodigo")
|
||||
ddlProducto2.DataBind()
|
||||
ddlProducto2.ddl.Items.Insert(0, New ListItem(" Seleccione ", "-1"))
|
||||
Else
|
||||
ddlProducto2.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||
ddlProducto2.SelectedText = ""
|
||||
ddlProducto2.SelectedValue = "-1"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub ddlProducto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ddlProducto2.selectedindexchange
|
||||
DdlUnidadMedida.Items.Clear()
|
||||
DdlUnidadMedida.DataSource = GlobalDTProductosServiciosEquivalencias(ddlProducto2.SelectedValue.ToEntero, -1)
|
||||
DdlUnidadMedida.DataBind()
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region " INICIALIZA VALORES "
|
||||
|
||||
Private Sub CargaPermisos()
|
||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||
GvM.Columns(11).Visible = TienePermisoImportes ' costo
|
||||
GvM.Columns(12).Visible = TienePermisoImportes ' importe
|
||||
GvM.Columns(14).Visible = TienePermisoImportes ' valor
|
||||
End Sub
|
||||
|
||||
Private Function isWithFamily() As Boolean
|
||||
Return (UsuarioActual.CveEmpresa = 66)
|
||||
End Function
|
||||
Private Sub CargaCombos()
|
||||
|
||||
CargaFuncionalidad105()
|
||||
CargaPS()
|
||||
|
||||
ddlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1)
|
||||
ddlAlmacen.DataBind()
|
||||
If IfNull(Request("CveAlmacen"), "-1").ToString.ToEntero > 0 Then ddlAlmacen.SelectedValueExist(Request("CveAlmacen").ToString)
|
||||
CargaClasificaciones()
|
||||
|
||||
CBLTiposAlmacen.DataSource = GlobalDTTipoAlmacen(-1)
|
||||
CBLTiposAlmacen.DataBind()
|
||||
For Each item As ListItem In CBLTiposAlmacen.Items
|
||||
If item.Text = "Entrega Adelantado" Then
|
||||
item.Selected = False
|
||||
Else
|
||||
item.Selected = True
|
||||
End If
|
||||
|
||||
Next
|
||||
End Sub
|
||||
Private Sub CargaFuncionalidad105()
|
||||
ddlProducto2.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
|
||||
If ddlProducto2.UsaWebService Then
|
||||
ddlProducto2.ddlWS.Attributes.Add("data-Estatus", "-1")
|
||||
ddlProducto2.ddlWS.Attributes.Add("data-pagina", "Inventarios")
|
||||
ddlProducto2.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||
|
||||
'DdlClasificacion.AutoPostBack = False
|
||||
Else
|
||||
ddlProducto2.ddl.Items.Add(New ListItem("Seleccione", "-1"))
|
||||
ddlProducto2.ddl.Items.Add(New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2"))
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub CargaClasificaciones()
|
||||
|
||||
Dim CveClasificacion = If(Request("CveClasificacion") IsNot Nothing, Request("CveClasificacion").ToString, "-1")
|
||||
|
||||
If isWithFamily() Then
|
||||
|
||||
DdlClasificacion.DataSource = GlobalDTSubFamilias(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
|
||||
Else
|
||||
Dim ObjClasificaciones As New ClsClasificaciones
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
If ObjClasificaciones.GetClasificacionesExistencias(UsuarioActual.CveEmpresa) Then
|
||||
DdlClasificacion.DataSource = ObjClasificaciones.DtResultados
|
||||
' DdlClasificacion.DataBind()
|
||||
End If
|
||||
Else
|
||||
If ObjClasificaciones.GetClasificacionesExistencias(UsuarioActual.CveEmpresa) Then
|
||||
DdlClasificacion.DataSource = ObjClasificaciones.DtResultados
|
||||
' DdlClasificacion.DataBind()
|
||||
End If
|
||||
End If
|
||||
ObjClasificaciones.Dispose()
|
||||
End If
|
||||
|
||||
'DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("", "Clasificacion")
|
||||
DdlClasificacion.DataBind()
|
||||
DdlClasificacion.SelectedValueExist(CveClasificacion)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " CARGA PS "
|
||||
Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlClasificacion.SelectedIndexChanged
|
||||
CargaPS()
|
||||
End Sub
|
||||
Private Sub CargaPS()
|
||||
If Not ddlProducto2.UsaWebService Then
|
||||
Dim Filtro = If(DdlClasificacion.SelectedValue.ToEntero > 0, String.Format("CveClasificacion={0} And CveTipoPS=2", DdlClasificacion.SelectedValue), "CveTipoPS=2")
|
||||
ddlProducto2.ddl.Items.Clear()
|
||||
ddlProducto2.DataSource = GlobalDTPS(UsuarioActual.CveEmpresa).FiltraParametros(Filtro, "PSCodigo")
|
||||
ddlProducto2.DataBind()
|
||||
ddlProducto2.ddl.Items.Insert(0, New ListItem(" Seleccione ", "-1"))
|
||||
Else
|
||||
ddlProducto2.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||
ddlProducto2.SelectedText = ""
|
||||
ddlProducto2.SelectedValue = "-1"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub ddlProducto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ddlProducto2.selectedindexchange
|
||||
DdlUnidadMedida.Items.Clear()
|
||||
DdlUnidadMedida.DataSource = GlobalDTProductosServiciosEquivalencias(ddlProducto2.SelectedValue.ToEntero, -1)
|
||||
DdlUnidadMedida.DataBind()
|
||||
DdlUnidadMedida.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
If UsuarioActual.CveUsuario = 100 Then
|
||||
LblPS.ToolTip = ddlProducto2.SelectedValue
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
Protected Sub btConsultar_Click(sender As Object, e As EventArgs) Handles btConsultar.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim CveProducto As Integer = ddlProducto2.SelectedValue.ToEntero
|
||||
|
||||
If CveProducto > 0 Then
|
||||
Dim DtTemp = CargarKardex(CveProducto)
|
||||
If DtTemp IsNot Nothing Then
|
||||
'CARGA INDICADORES
|
||||
If UsuarioActual.TienePermisoProceso(201) Then
|
||||
DivIndicadores.Visible = True
|
||||
|
||||
Dim Dr = DtTemp.FiltroUltimo("")
|
||||
Dim TC = If(GlobalTipoCambio(Now) > 0, GlobalTipoCambio(Now), 1)
|
||||
|
||||
LtIndicador_Existencia.Text = Dr("Existencias").ToString.FormatoNumero()
|
||||
|
||||
LtIndicador_ValorPesos.Text = Dr("ValorInventario").ToString.FormatoNumero()
|
||||
LtIndicador_ValorDolares.Text = (Dr("ValorInventario").ToString.ToDouble / TC).FormatoNumero()
|
||||
|
||||
Dim CostoPromedio = If(Dr("Existencias").ToString.ToDouble > 0, Dr("ValorInventario").ToString.ToDouble / Dr("Existencias").ToString.ToDouble, 0)
|
||||
LtIndicador_CPPesos.Text = CostoPromedio.FormatoNumero()
|
||||
LtIndicador_CPDolares.Text = (CostoPromedio / TC).FormatoNumero()
|
||||
|
||||
LtIndicador_UCPesos.Text = Dr("UltimoCosto").ToString.FormatoNumero()
|
||||
LtIndicador_UCDolares.Text = Dr("UltimoCostoUSD").ToString.FormatoNumero()
|
||||
|
||||
LtIndicador_Mensaje.Text = $"* Importes calculados con el tipo de cambio del dia <b> $ {TC.FormatoNumero(4)} </b>"
|
||||
|
||||
UpIndicadores.Update()
|
||||
|
||||
GvM.Attributes.Add("data-heighterror", "430")
|
||||
Else
|
||||
GvM.Attributes.Add("data-heighterror", "270")
|
||||
End If
|
||||
GvM.DataSource = DtTemp
|
||||
GvM.DataBind()
|
||||
End If
|
||||
Else
|
||||
Alert("Seleccione un producto.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function CargarKardex(CvePS As Integer) As DataTable
|
||||
Dim dt As DataTable = Nothing
|
||||
|
||||
Dim Entrada As Boolean = cbEntrada.Checked
|
||||
Dim Salida As Boolean = cbSalida.Checked
|
||||
|
||||
Dim FechaI As String = If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
|
||||
Dim FechaF As String = If(TxtFechaF.Text <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
|
||||
Dim CveAlmacen As Integer = ddlAlmacen.SelectedValue.ToEntero
|
||||
If CvePS > 0 Then ddlProducto2.SelectedText = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("PSCodigo", "")
|
||||
|
||||
Dim CveTiposAlmacen = ""
|
||||
For Each item As ListItem In CBLTiposAlmacen.Items
|
||||
CveTiposAlmacen += If(item.Selected, $"{item.Value},", "")
|
||||
Next
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.GetKardex(Entrada, Salida, CvePS, FechaI, FechaF, CveAlmacen, CveTiposAlmacen.Substring(0, CveTiposAlmacen.Length - 1), DdlUnidadMedida.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ChkAgruparAlmacen.Checked) Then
|
||||
dt = ObjInventarios.DtResultados.Copy
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
Return dt
|
||||
End Function
|
||||
Protected Sub gvMovimientos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvM.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
e.Row.Cells(0).ToolTip = e.Row.DBCampo("FechaMovto")
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(201) Then 'PERMISO PARA VER IMPORTES
|
||||
If e.Row.DBCampo("CveCompra") <> "" Then
|
||||
e.Row.FCHyperLink("hlFolioD").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DBCampo("CveCompra"))
|
||||
ElseIf e.Row.DBCampo("CveVenta") <> "" Then
|
||||
e.Row.FCHyperLink("hlFolioD").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DBCampo("CveVenta"))
|
||||
ElseIf e.Row.DBCampo("CveOrdenCompra") <> "" Then
|
||||
e.Row.FCHyperLink("hlFolioD").NavigateUrl = String.Format("/OC/OC.aspx?OC={0}", e.Row.DBCampo("CveOrdenCompra"))
|
||||
End If
|
||||
End If
|
||||
|
||||
If GvM.Columns(1).Visible Then
|
||||
If Not e.Row.DBCampo("CveMovimiento").ToEntero > 0 Then
|
||||
e.Row.Cells(1).Text = ""
|
||||
End If
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Concepto").Contains("TOTAL GENERAL") Then
|
||||
e.Row.CssClass = "Totales"
|
||||
ElseIf e.Row.DBCampo("Concepto").Contains("SALDO INICIAL") Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " IMPRIMIR "
|
||||
Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
'Imprimir("Excel")
|
||||
GenerarPDF("Excel")
|
||||
End Sub
|
||||
Private Sub Imprimir(Optional reporte As String = "PDF")
|
||||
|
||||
Dim DtKardex As DataTable = Nothing
|
||||
DtKardex = CargarKardex(ddlProducto2.SelectedValue.ToEntero)
|
||||
If (Not IsNothing(DtKardex)) Then
|
||||
Dim params As New List(Of ReportParameter)
|
||||
If IO.File.Exists(String.Format("{0}/Formatos/Kardex.rdlc", UsuarioActual.Empresa.Ruta)) Then
|
||||
ImprimirPDF(String.Format("Empresas/{0}/Formatos/Kardex.rdlc", UsuarioActual.CveEmpresa), DtKardex, params, "ReporteKardex", reporte)
|
||||
Else
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Kardex.rdlc", DtKardex, params, "Reporte Kardex", reporte)
|
||||
End If
|
||||
DtKardex.Dispose()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub ImgImprimir_Click(sender As Object, e As EventArgs) Handles ImgImprimir.Click
|
||||
GenerarPDF()
|
||||
End Sub
|
||||
Private Sub GenerarPDF(Optional Formato As String = "PDF")
|
||||
Dim Movimientos As New ClsInventarios
|
||||
Dim CvePS As Integer = ddlProducto2.SelectedValue.ToEntero
|
||||
Dim Entrada As Boolean = cbEntrada.Checked
|
||||
Dim Salida As Boolean = cbSalida.Checked
|
||||
|
||||
Dim FechaI As String = If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
|
||||
Dim FechaF As String = If(TxtFechaF.Text <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
|
||||
Dim CveAlmacen As Integer = ddlAlmacen.SelectedValue.ToEntero
|
||||
|
||||
|
||||
Dim Almacen = If(ddlAlmacen.SelectedValue = "-1", "", $" <b>Almacén:</b> {ddlAlmacen.SelectedItem.Text}")
|
||||
Dim UM = If(DdlUnidadMedida.SelectedValue = "-1", "", $" <b>Unidad de Medida:</b> {DdlUnidadMedida.SelectedItem.Text}")
|
||||
Dim FechaIn As String = If(TxtFechaI.Text = "", "", $" <b>Fecha Inicio:</b> {TxtFechaI.Text}")
|
||||
Dim FechaFn As String = If(TxtFechaF.Text = "", "", $" <b>Fecha Fin:</b> {TxtFechaF.Text}")
|
||||
Dim EntradaSalida As String = ""
|
||||
|
||||
If cbEntrada.Checked And cbSalida.Checked Then
|
||||
EntradaSalida = "Entradas y Salidas"
|
||||
ElseIf cbEntrada.Checked And cbSalida.Checked = False Then
|
||||
EntradaSalida = "Solo Entradas"
|
||||
ElseIf cbEntrada.Checked = False And cbSalida.Checked Then
|
||||
EntradaSalida = "Solo Salidas"
|
||||
End If
|
||||
|
||||
|
||||
If Movimientos.GetKardex(Entrada, Salida, CvePS, FechaI, FechaF, CveAlmacen, "1", DdlUnidadMedida.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ChkAgruparAlmacen.Checked) Then
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim dt As DataTable = Movimientos.DtResultados
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||
params.Add(New ReportParameter("FechaFin", FechaF))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("Producto", ddlProducto2.SelectedText))
|
||||
params.Add(New ReportParameter("AgrupadoPor", $"<b>Agrupado Por:</b> {EntradaSalida}{Almacen}{UM}{FechaIn}{FechaFn}"))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepKardex.rdlc", dt, params, "ReporteKardex", Formato)
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "EDITAR FECHA"
|
||||
|
||||
Protected Sub LnkEditarFecha_Click(sender As Object, e As EventArgs)
|
||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
CveMovimiento = gvRow.DataKey("CveMovimiento").ToEntero
|
||||
TxtFecha.Text = gvRow.DataKey("FechaMovto").ToDateTime.ToString("yyyy-MM-ddTHH:mm")
|
||||
RegistraScript("$('#DModalEditarFecha').modal()")
|
||||
UpModalEditarFecha.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnEditarFecha_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjMov As New ClsMovimientos
|
||||
If ObjMov.UpdateMovimientoFecha(TxtFecha.Text.ToDateTime, CveMovimiento) Then
|
||||
Alert("Actualizada correctamente a : " + TxtFecha.Text.ToDateTime.ToString("yyyy-MM-dd HH:mm"))
|
||||
RegistraScript("$('#DModalEditarFecha').modal('hide')")
|
||||
CargaDatos()
|
||||
UPDatos.Update()
|
||||
End If
|
||||
ObjMov.Dispose()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
End If
|
||||
|
||||
TxtSerie.Text = ""
|
||||
If ddlProducto2.SelectedValue.ToEntero > 0 Then
|
||||
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, ddlProducto2.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If Dr IsNot Nothing Then
|
||||
If Dr("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then
|
||||
DivSerie.Visible = True
|
||||
Else
|
||||
DivSerie.Visible = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
Protected Sub btConsultar_Click(sender As Object, e As EventArgs) Handles btConsultar.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim CveProducto As Integer = ddlProducto2.SelectedValue.ToEntero
|
||||
|
||||
If CveProducto > 0 Then
|
||||
Dim DtTemp = CargarKardex(CveProducto)
|
||||
If DtTemp IsNot Nothing Then
|
||||
'CARGA INDICADORES
|
||||
If UsuarioActual.TienePermisoProceso(201) Then
|
||||
DivIndicadores.Visible = True
|
||||
|
||||
Dim Dr = DtTemp.FiltroUltimo("")
|
||||
Dim TC = If(GlobalTipoCambio(Now) > 0, GlobalTipoCambio(Now), 1)
|
||||
|
||||
LtIndicador_Existencia.Text = Dr("Existencias").ToString.FormatoNumero()
|
||||
|
||||
LtIndicador_ValorPesos.Text = Dr("ValorInventario").ToString.FormatoNumero()
|
||||
LtIndicador_ValorDolares.Text = (Dr("ValorInventario").ToString.ToDouble / TC).FormatoNumero()
|
||||
|
||||
Dim CostoPromedio = If(Dr("Existencias").ToString.ToDouble > 0, Dr("ValorInventario").ToString.ToDouble / Dr("Existencias").ToString.ToDouble, 0)
|
||||
LtIndicador_CPPesos.Text = CostoPromedio.FormatoNumero()
|
||||
LtIndicador_CPDolares.Text = (CostoPromedio / TC).FormatoNumero()
|
||||
|
||||
LtIndicador_UCPesos.Text = Dr("UltimoCosto").ToString.FormatoNumero()
|
||||
LtIndicador_UCDolares.Text = Dr("UltimoCostoUSD").ToString.FormatoNumero()
|
||||
|
||||
LtIndicador_Mensaje.Text = $"* Importes calculados con el tipo de cambio del dia <b> $ {TC.FormatoNumero(4)} </b>"
|
||||
|
||||
If TxtSerie.Text <> "" Then
|
||||
LtIndicador_MensajeSerie.Text = $"* Existencia y costos calculada por numero de serie: <b> {TxtSerie.Text} </b>"
|
||||
Else
|
||||
LtIndicador_MensajeSerie.Text = ""
|
||||
End If
|
||||
|
||||
UpIndicadores.Update()
|
||||
|
||||
GvM.Attributes.Add("data-heighterror", "430")
|
||||
Else
|
||||
GvM.Attributes.Add("data-heighterror", "270")
|
||||
End If
|
||||
GvM.DataSource = DtTemp
|
||||
GvM.DataBind()
|
||||
End If
|
||||
Else
|
||||
Alert("Seleccione un producto.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function CargarKardex(CvePS As Integer) As DataTable
|
||||
Dim dt As DataTable = Nothing
|
||||
|
||||
Dim Entrada As Boolean = cbEntrada.Checked
|
||||
Dim Salida As Boolean = cbSalida.Checked
|
||||
|
||||
Dim FechaI As String = If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
|
||||
Dim FechaF As String = If(TxtFechaF.Text <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
|
||||
Dim CveAlmacen As Integer = ddlAlmacen.SelectedValue.ToEntero
|
||||
If CvePS > 0 Then ddlProducto2.SelectedText = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("PSCodigo", "")
|
||||
|
||||
Dim CveTiposAlmacen = ""
|
||||
For Each item As ListItem In CBLTiposAlmacen.Items
|
||||
CveTiposAlmacen += If(item.Selected, $"{item.Value},", "")
|
||||
Next
|
||||
|
||||
Dim Serie As String = If(TxtSerie.Text <> "", TxtSerie.Text, "-1")
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.GetKardex(Entrada, Salida, CvePS, FechaI, FechaF, CveAlmacen, CveTiposAlmacen.Substring(0, CveTiposAlmacen.Length - 1), DdlUnidadMedida.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ChkAgruparAlmacen.Checked, Serie) Then
|
||||
dt = ObjInventarios.DtResultados.Copy
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
Return dt
|
||||
End Function
|
||||
Protected Sub gvMovimientos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvM.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
e.Row.Cells(0).ToolTip = e.Row.DBCampo("FechaMovto")
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(201) Then 'PERMISO PARA VER IMPORTES
|
||||
If e.Row.DBCampo("CveCompra") <> "" Then
|
||||
e.Row.FCHyperLink("hlFolioD").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DBCampo("CveCompra"))
|
||||
ElseIf e.Row.DBCampo("CveVenta") <> "" Then
|
||||
e.Row.FCHyperLink("hlFolioD").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DBCampo("CveVenta"))
|
||||
ElseIf e.Row.DBCampo("CveOrdenCompra") <> "" Then
|
||||
e.Row.FCHyperLink("hlFolioD").NavigateUrl = String.Format("/OC/OC.aspx?OC={0}", e.Row.DBCampo("CveOrdenCompra"))
|
||||
End If
|
||||
End If
|
||||
|
||||
If GvM.Columns(1).Visible Then
|
||||
If Not e.Row.DBCampo("CveMovimiento").ToEntero > 0 Then
|
||||
e.Row.Cells(1).Text = ""
|
||||
End If
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Concepto").Contains("TOTAL GENERAL") Then
|
||||
e.Row.CssClass = "Totales"
|
||||
ElseIf e.Row.DBCampo("Concepto").Contains("SALDO INICIAL") Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " IMPRIMIR "
|
||||
Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
'Imprimir("Excel")
|
||||
GenerarPDF("Excel")
|
||||
End Sub
|
||||
Private Sub Imprimir(Optional reporte As String = "PDF")
|
||||
|
||||
Dim DtKardex As DataTable = Nothing
|
||||
DtKardex = CargarKardex(ddlProducto2.SelectedValue.ToEntero)
|
||||
If (Not IsNothing(DtKardex)) Then
|
||||
Dim params As New List(Of ReportParameter)
|
||||
If IO.File.Exists(String.Format("{0}/Formatos/Kardex.rdlc", UsuarioActual.Empresa.Ruta)) Then
|
||||
ImprimirPDF(String.Format("Empresas/{0}/Formatos/Kardex.rdlc", UsuarioActual.CveEmpresa), DtKardex, params, "ReporteKardex", reporte)
|
||||
Else
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Kardex.rdlc", DtKardex, params, "Reporte Kardex", reporte)
|
||||
End If
|
||||
DtKardex.Dispose()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub ImgImprimir_Click(sender As Object, e As EventArgs) Handles ImgImprimir.Click
|
||||
GenerarPDF()
|
||||
End Sub
|
||||
Private Sub GenerarPDF(Optional Formato As String = "PDF")
|
||||
Dim Movimientos As New ClsInventarios
|
||||
Dim CvePS As Integer = ddlProducto2.SelectedValue.ToEntero
|
||||
Dim Entrada As Boolean = cbEntrada.Checked
|
||||
Dim Salida As Boolean = cbSalida.Checked
|
||||
|
||||
Dim FechaI As String = If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
|
||||
Dim FechaF As String = If(TxtFechaF.Text <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
|
||||
Dim CveAlmacen As Integer = ddlAlmacen.SelectedValue.ToEntero
|
||||
|
||||
|
||||
Dim Almacen = If(ddlAlmacen.SelectedValue = "-1", "", $" <b>Almacén:</b> {ddlAlmacen.SelectedItem.Text}")
|
||||
Dim UM = If(DdlUnidadMedida.SelectedValue = "-1", "", $" <b>Unidad de Medida:</b> {DdlUnidadMedida.SelectedItem.Text}")
|
||||
Dim FechaIn As String = If(TxtFechaI.Text = "", "", $" <b>Fecha Inicio:</b> {TxtFechaI.Text}")
|
||||
Dim FechaFn As String = If(TxtFechaF.Text = "", "", $" <b>Fecha Fin:</b> {TxtFechaF.Text}")
|
||||
Dim EntradaSalida As String = ""
|
||||
|
||||
If cbEntrada.Checked And cbSalida.Checked Then
|
||||
EntradaSalida = " Entradas y Salidas"
|
||||
ElseIf cbEntrada.Checked And cbSalida.Checked = False Then
|
||||
EntradaSalida = " Solo Entradas"
|
||||
ElseIf cbEntrada.Checked = False And cbSalida.Checked Then
|
||||
EntradaSalida = " Solo Salidas"
|
||||
End If
|
||||
|
||||
Dim Serie As String = If(TxtSerie.Text <> "", TxtSerie.Text, "-1")
|
||||
|
||||
Dim SerieAgrupado As String = If(TxtSerie.Text = "", "", $"<b>Existencia y costos calculada por numero de serie:</b> {TxtSerie.Text} ")
|
||||
|
||||
If Movimientos.GetKardex(Entrada, Salida, CvePS, FechaI, FechaF, CveAlmacen, "1", DdlUnidadMedida.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ChkAgruparAlmacen.Checked, Serie) Then
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim dt As DataTable = Movimientos.DtResultados
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||
params.Add(New ReportParameter("FechaFin", FechaF))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("Producto", ddlProducto2.SelectedText))
|
||||
params.Add(New ReportParameter("AgrupadoPor", $"<b>Agrupado Por:</b> {SerieAgrupado}{EntradaSalida}{Almacen}{UM}{FechaIn}{FechaFn}"))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepKardex.rdlc", dt, params, "ReporteKardex", Formato)
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "EDITAR FECHA"
|
||||
|
||||
Protected Sub LnkEditarFecha_Click(sender As Object, e As EventArgs)
|
||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
CveMovimiento = gvRow.DataKey("CveMovimiento").ToEntero
|
||||
TxtFecha.Text = gvRow.DataKey("FechaMovto").ToDateTime.ToString("yyyy-MM-ddTHH:mm")
|
||||
RegistraScript("$('#DModalEditarFecha').modal()")
|
||||
UpModalEditarFecha.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnEditarFecha_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjMov As New ClsMovimientos
|
||||
If ObjMov.UpdateMovimientoFecha(TxtFecha.Text.ToDateTime, CveMovimiento) Then
|
||||
Alert("Actualizada correctamente a : " + TxtFecha.Text.ToDateTime.ToString("yyyy-MM-dd HH:mm"))
|
||||
RegistraScript("$('#DModalEditarFecha').modal('hide')")
|
||||
CargaDatos()
|
||||
UPDatos.Update()
|
||||
End If
|
||||
ObjMov.Dispose()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -4228,21 +4228,7 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
'ACTIVA BOTONERA | SI SON SERVICIOS DEBE PERMITIR FACTURAR
|
||||
If TmpDT.MAX("CveTipoPS") = "1" Then
|
||||
BtnsFacturar.Visible = True
|
||||
|
||||
'ACTIVA CONVERSION DE MONEDA
|
||||
If DdlMoneda.SelectedValue.ToEntero = 1 Then
|
||||
TrConversionDolares.Visible = True
|
||||
ChkConvertirDolares.Enabled = True
|
||||
TxtTipoCambioDlls.Enabled = True
|
||||
Else
|
||||
TrConversionTipoCambio.Visible = True
|
||||
ChkConvertirDoctoPesos.Enabled = True
|
||||
TxtTipoCambio.Enabled = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'Si es Empresa de Acumuladores
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
|
||||
Reference in New Issue
Block a user