This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1181,13 +1181,14 @@ Namespace Modelos
|
||||
'Se agregan los PS
|
||||
For Each Row As DataRow In TmpDTDetalle.Rows
|
||||
If Not ObjVentas.AddVentaDetalle(ObjVentas.CveVenta, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("CveUM").ToString.ToEntero,
|
||||
Row("PU").ToString.ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("IVA").ToString.ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Math.Round((Row("Total").ToString.ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("IVA").ToString.ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)))), 6),
|
||||
Row("PU").ToString.ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("ImporteIVA").ToString.ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Math.Round((Row("Total").ToString.ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("PorcentajeIVA").ToString.ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)))), 6),
|
||||
Row("Obs").ToString, Row("Descuento").ToString.ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("TipoDescuento").ToString.ToEntero, Row("CveSubProyecto").ToString.ToEntero, Row("CvePresupuestoIngreso").ToString.ToEntero,
|
||||
TiempoEntrega:=Row("TiempoEntrega").ToString, CveVentaDetallePadre:=Row("CveVentaDetalle").ToString.ToEntero, CveContratoDetalle:=Row("CveContratoDetalle").ToString.ToEntero,
|
||||
CvePromocionDetalle:=If(DtPromociones IsNot Nothing, DtPromociones.FiltroPrimeroValor("CvePromocionDetalle", $"CvePS={Row("CvePS").ToString}").ToEntero, -1),
|
||||
IEPS:=Row("ImporteIEPS").ToString.ToDouble, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString.ToEntero,
|
||||
ImporteRetIVA:=Row("ImporteRetIVA").ToString.ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString.ToDouble,
|
||||
PorcentajeIEPS:=Row("PorcentajeIEPS").ToString.ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString.ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString.ToDouble, CuentaPredial:=Row("CuentaPredial").ToString) Then
|
||||
PorcentajeIEPS:=Row("PorcentajeIEPS").ToString.ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString.ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString.ToDouble, CuentaPredial:=Row("CuentaPredial").ToString,
|
||||
PorcentajeIVA:=Row("PorcentajeIVA").ToString.ToDecimal) Then
|
||||
ErrorList.Add("Ocurrió un error al agregar un Producto o Servicio a la factura.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
Exit For
|
||||
Else
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Literal ID="LtlTitulo" runat="server" Text="Pagos"></asp:Literal> <asp:Literal ID="LtlIE" runat="server"></asp:Literal>
|
||||
</asp:Content>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
@@ -307,6 +307,8 @@ Partial Class Bancos_PopIECompras
|
||||
Public Class IEMovimiento
|
||||
Public Property SubTotal As Decimal
|
||||
Public Property IVA As Decimal
|
||||
Public Property IVADeducible As Decimal
|
||||
Public Property IVANoDeducible As Decimal
|
||||
Public Property RetIVA As Decimal
|
||||
Public Property RetISR As Decimal
|
||||
Public Property Total As Decimal
|
||||
@@ -615,6 +617,8 @@ Partial Class Bancos_PopIECompras
|
||||
MovimientoPagar = New IEMovimiento
|
||||
MovimientoPagar.SubTotal = dr("SubTotal").ToString.ToDecimal
|
||||
MovimientoPagar.IVA = dr("IVA").ToString.ToDecimal
|
||||
MovimientoPagar.IVADeducible = dr("IVADeducible").ToString.ToDecimal
|
||||
MovimientoPagar.IVANoDeducible = dr("IVANoDeducible").ToString.ToDecimal
|
||||
MovimientoPagar.RetIVA = dr("RetIVA").ToString.ToDecimal
|
||||
MovimientoPagar.RetISR = dr("RetISR").ToString.ToDecimal
|
||||
MovimientoPagar.Total = dr("Total").ToString.ToDecimal
|
||||
@@ -2250,16 +2254,16 @@ Partial Class Bancos_PopIECompras
|
||||
|
||||
If TotalImporte = CompraSaldo Then
|
||||
If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
|
||||
ImporteMovimiento = MovimientoPagar.IVA
|
||||
ImporteMovimiento = MovimientoPagar.IVADeducible
|
||||
ImporteMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso CveMonedaCompra = 2 Then
|
||||
ImporteMovimiento = (MovimientoPagar.IVA)
|
||||
ImporteMovimiento = (MovimientoPagar.IVADeducible)
|
||||
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 1 Then
|
||||
ImporteMovimiento = (MovimientoPagar.IVA)
|
||||
ImporteMovimiento = (MovimientoPagar.IVADeducible)
|
||||
ImporteMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 2 Then
|
||||
ImporteMovimiento = (MovimientoPagar.IVA)
|
||||
ImporteMovimiento = (MovimientoPagar.IVADeducible)
|
||||
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
|
||||
@@ -2273,16 +2277,92 @@ Partial Class Bancos_PopIECompras
|
||||
End If
|
||||
Else
|
||||
If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
|
||||
ImporteMovimiento = MovimientoPagar.IVA * PorcentajePago
|
||||
ImporteMovimiento = MovimientoPagar.IVADeducible * PorcentajePago
|
||||
ImporteMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso CveMonedaCompra = 2 Then
|
||||
ImporteMovimiento = (MovimientoPagar.IVA * PorcentajePago)
|
||||
ImporteMovimiento = (MovimientoPagar.IVADeducible * PorcentajePago)
|
||||
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 1 Then
|
||||
ImporteMovimiento = (MovimientoPagar.IVA * PorcentajePago)
|
||||
ImporteMovimiento = (MovimientoPagar.IVADeducible * PorcentajePago)
|
||||
ImporteMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 2 Then
|
||||
ImporteMovimiento = (MovimientoPagar.IVA * PorcentajePago)
|
||||
ImporteMovimiento = (MovimientoPagar.IVADeducible * PorcentajePago)
|
||||
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
|
||||
ImporteMX = Math.Round(ImporteMX, 2)
|
||||
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
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditableSIG").ToString.ToEntero
|
||||
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 = Math.Round(ImporteMovimiento, 2)
|
||||
ImporteMX = Math.Round(ImporteMX, 2)
|
||||
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 = Math.Round(ImporteMovimiento, 2)
|
||||
|
||||
@@ -2062,7 +2062,7 @@ Partial Class Bancos_PopIEVentas
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
|
||||
tipoCambioVentaDiferenciaCambiaria = If(FechaVenta < FechaUltimaFluctuacion, TipoCambioFluctuacion, TipoCambioOriginal)
|
||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
|
||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVentaDiferenciaCambiaria)
|
||||
TimpocambioGeneral = TCImpuestos
|
||||
|
||||
Dim Diferencia As Decimal = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVentaValuacion) - ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
|
||||
@@ -2090,7 +2090,7 @@ Partial Class Bancos_PopIEVentas
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
||||
tipoCambioVentaDiferenciaCambiaria = If(FechaVenta < FechaUltimaFluctuacion, TipoCambioFluctuacion, TipoCambioOriginal)
|
||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
|
||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVentaDiferenciaCambiaria)
|
||||
TimpocambioGeneral = TCImpuestos
|
||||
|
||||
|
||||
|
||||
@@ -358,7 +358,7 @@
|
||||
<asp:UpdatePanel ID="UPCompras" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvCxP" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas X Pagar Pendientes"
|
||||
DataKeyNames="CveCompra,ImporteProgramo,Saldo,SubTotal,IVA,IEPS,RetIVA,RetISR,Original,UUID,RFC,CveFactura,SerieFolio,Descripcion,CvePrePoliza,Fecha,EstatusInventario,CveProveedor,TipoCambio, CveMoneda,CveRetIVAConcepto,IVAPorPagar,IEPSPorPagar,CveRetISRConcepto,PorcentajeIVA"
|
||||
DataKeyNames="CveCompra,ImporteProgramo,Saldo,SubTotal,IVA,IVADeducible,IVANoDeducible,IEPS,RetIVA,RetISR,Original,UUID,RFC,CveFactura,SerieFolio,Descripcion,CvePrePoliza,Fecha,EstatusInventario,CveProveedor,TipoCambio, CveMoneda,CveRetIVAConcepto,IVAPorPagar,IVAPorPagarDeducible,IVAPorPagarNoDeducible,IEPSPorPagar,CveRetISRConcepto,PorcentajeIVA"
|
||||
Width="100%" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
|
||||
@@ -310,7 +310,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ViewState("CveCuentaRetISR") = 0
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 4, 5, 7, 11, 12, 72, 80, 126, 119, 122,145) Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 4, 5, 7, 11, 12, 72, 80, 126, 119, 122) Then
|
||||
rowComisiones.Visible = True
|
||||
End If
|
||||
|
||||
@@ -1506,16 +1506,16 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
'funcionalidad que toma el 100% del pago para acreditamiento de iva
|
||||
If TotalImporte = gvr.DataKey("Saldo").ToDecimal Then
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||
importeMX = gvr.DataKey("IVA").ToDecimal * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
||||
importeMX = gvr.DataKey("IVADeducible").ToDecimal * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
@@ -1528,16 +1528,79 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
End If
|
||||
Else
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
|
||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagarDeducible").ToDecimal - (gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagarDeducible").ToDecimal, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
|
||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagarDeducible").ToDecimal - (gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagarDeducible").ToDecimal, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
|
||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagarDeducible").ToDecimal - (gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagarDeducible").ToDecimal, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
|
||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagarDeducible").ToDecimal - (gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagarDeducible").ToDecimal, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||
|
||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
End If
|
||||
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
|
||||
PorcentajeImpuesto = gvr.DataKey("PorcentajeIVA").ToDecimal
|
||||
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 ImporteMovimiento <> 0 AndAlso 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
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditableSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
Case 280 'Iva Acreditado No Deducible
|
||||
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
||||
'funcionalidad que toma el 100% del pago para acreditamiento de iva
|
||||
If TotalImporte = gvr.DataKey("Saldo").ToDecimal Then
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = gvr.DataKey("IVANoDeducible").ToDecimal
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
ImporteMovimiento = gvr.DataKey("IVANoDeducible").ToDecimal
|
||||
importeMX = gvr.DataKey("IVANoDeducible").ToDecimal * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = gvr.DataKey("IVANoDeducible").ToDecimal
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
ImporteMovimiento = gvr.DataKey("IVANoDeducible").ToDecimal
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||
|
||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
Else
|
||||
ImporteMovimiento = 0
|
||||
importeMX = 0
|
||||
End If
|
||||
Else
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal - (gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal, gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal - (gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal, gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal - (gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal, gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal - (gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal, gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
|
||||
@@ -3,116 +3,175 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Widthall {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
|
||||
.sinlink td a {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
color: black;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.white a {
|
||||
color: white !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Tipos de Ordenes de Servicio
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="250px">
|
||||
<asp:LinkButton ID="LbTipoOrdenServicio" runat="server" CausesValidation="false" Text="" CommandArgument="TipoOrdenServicio" OnClick="LbOrden_Click">
|
||||
Tipo de Orden de Servicio
|
||||
<asp:Literal ID="ImgTipoOrdenServicio" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng" OnClick="LbOrden_Click">
|
||||
Fecha Ing.
|
||||
<asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="161px">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td style="text-align: center">
|
||||
<asp:TextBox ID="TxtTipoOrdenServicio" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="234px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoOrdenServicio" runat="server" ControlToValidate="TxtTipoOrdenServicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Orden de Servicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCTipoOrdenServicio" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoOrdenServicio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveOrdenServicioTipo" EmptyDataText="No se encontraron Tipos de Orden Servicios Registrados" ToolTip="Listado de Tipos de Ordenes de Servicios" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipoOrdenServicio" runat="server" Text='<%# Eval("OrdenServicioTipo", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtTipoOrdenServicio" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("OrdenServicioTipo") %>' ValidationGroup="GrpGV" Width="234px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoOrdenServicio" runat="server" ControlToValidate="TxtTipoOrdenServicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Orden de Servicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCTipoOrdenServicio" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoOrdenServicio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarTiposOS" data-toggle="tooltip" data-placement="left" Text="<i class='fa fa-plus'></i> Agregar Tipo de OS"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpGral" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="Widthall" style="text-align: right!important; margin-top: 20px!important; margin-bottom: 2px!important">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvTiposOS.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvTiposOS.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin:5px">
|
||||
<asp:UpdatePanel ID="UPGvTiposOS" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvTiposOS" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveOrdenServicioTipo, OrdenServicioTipo, Estatus"
|
||||
EmptyDataText="No se encontraron registros"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true"
|
||||
data-freezerows="1"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Tipo de Orden de Servicio">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblTiposOS" runat="server" Text='<%# Eval("OrdenServicioTipo") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="150px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblPuntos" runat="server" Text='<%# Eval("Estatus")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" ItemStyle-Width="150px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="300px" HeaderText="Usuario">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="80px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgE" OnClick="Edit_ClickTiposOS" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="40px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" OnClick="Remove_ClickTiposOS" runat="server" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<div id="DivAgregarTiposOS" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposOS" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposOS" runat="server">Agregar Tipo Defecto</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTiposOS" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtTiposOS" runat="server" ControlToValidate="TxtTiposOS" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposOS"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtTiposOS.ClientID.ToString()%>">Tipo:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
<div ID="DivEstatus" runat="server" class="form-group form-md-line-input input-iconright" Visible="false">
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarTiposOSModal" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposOS" />
|
||||
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content9" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -6,179 +6,165 @@ Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class OS_CatTiposOrdenesServicios
|
||||
Inherits ClsPaginas
|
||||
Inherits ClsPaginas
|
||||
|
||||
Public Property PuedeEditar As Boolean
|
||||
Get
|
||||
Return CBool(ViewState("PuedeEditar"))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PuedeEditar") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveOrdenServicioTipo As Integer
|
||||
Get
|
||||
If Not ViewState("CveOrdenServicioTipo") Is Nothing Then
|
||||
Return ViewState("CveOrdenServicioTipo").ToString.ToEntero
|
||||
Else
|
||||
Return -1
|
||||
End If
|
||||
|
||||
Public Property PuedeEliminar As Boolean
|
||||
Get
|
||||
Return CBool(ViewState("PuedeEditar"))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PuedeEditar") = value
|
||||
End Set
|
||||
End Property
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveOrdenServicioTipo") = value
|
||||
End Set
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
End Property
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjSubTipoOrdenServicios As New ClsOS
|
||||
Private Property Actualizar As Boolean
|
||||
Get
|
||||
If Not ViewState("Actualizar") Is Nothing Then
|
||||
Return DirectCast(ViewState("Actualizar"), Boolean)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("Actualizar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
CargadatosGvTiposOS()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargadatosGvTiposOS()
|
||||
|
||||
Dim ObjSubTipoOrdenServicios As New ClsOS
|
||||
If ObjSubTipoOrdenServicios.GetTipoOrdenesServicios(-1) Then
|
||||
ViewState("DTTipoOrdenServicios") = ObjSubTipoOrdenServicios.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GvTiposOS.DataSource = ObjSubTipoOrdenServicios.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTSubTipoOrdenServicios = ObjSubTipoOrdenServicios.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
GvTiposOS.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjSubTipoOrdenServicios.Dispose()
|
||||
ObjSubTipoOrdenServicios.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
GvTiposOS.DataBind()
|
||||
UpGral.Update()
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjTipoOrdenServicios As New ClsOS
|
||||
If ObjTipoOrdenServicios.AddTipoOrdenServicio(TxtTipoOrdenServicio.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtTipoOrdenServicio.Text = ""
|
||||
Alert("El nuevo Tipo de Orden de Servicio se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTTipoOrdenServicios") = ObjTipoOrdenServicios.DtResultados '.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
'GlobalDTTipoOrdenServicios(-1) = ObjTipoOrdenServicios.DtResultados
|
||||
End Sub
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
ObjTipoOrdenServicios.Dispose()
|
||||
End Sub
|
||||
Protected Sub BtnAgregarTiposOS_Click(sender As Object, e As EventArgs) Handles BtnAgregarTiposOS.Click
|
||||
LtlTituloModalTiposOS.Text = "Agregar Tipo de Orden de Servicio"
|
||||
BtnAgregarTiposOSModal.Text = "Agregar"
|
||||
DivEstatus.Visible = False
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(250)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(61)
|
||||
TxtTiposOS.Text = ""
|
||||
|
||||
Actualizar = False
|
||||
UpGral.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposOS"))
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarTiposOSModal_Click(sender As Object, e As EventArgs) Handles BtnAgregarTiposOSModal.Click
|
||||
|
||||
Dim ObjTipoOrdenServicios As New ClsOS
|
||||
|
||||
If Not Actualizar Then
|
||||
If ObjTipoOrdenServicios.AddTipoOrdenServicio(TxtTiposOS.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
TxtTiposOS.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
|
||||
CargadatosGvTiposOS()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposOS"), "jsHideModalTiposOS")
|
||||
'GeneraGlobalDT()
|
||||
UpGral.Update()
|
||||
|
||||
Alert("Tipo de Orden de Servicio Agregado Correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrio un error al guardar el Tipo de Orden de Servicio", TipoMensaje.MsgError)
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjTipoOrdenServicios As New ClsOS
|
||||
If ObjTipoOrdenServicios.RemoveTipoOrdenServicio(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTTipoOrdenServicios") = ObjTipoOrdenServicios.DtResultados '.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
'GlobalDTTipoOrdenServicios(-1) = ObjTipoOrdenServicios.DtResultados
|
||||
Alert("El Tipo de Orden de Servicio se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
ObjTipoOrdenServicios.Dispose()
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
If ObjTipoOrdenServicios.UpdateTipoOrdenServicio(TxtTiposOS.Text.Trim, False, ChkEstatus.Checked, CveOrdenServicioTipo) Then
|
||||
|
||||
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
||||
GvDatos.EditIndex = -1
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
TxtTiposOS.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
|
||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
Dim ObjTipoOrdenServicios As New ClsOS
|
||||
Dim TipoOrdenServicio As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtTipoOrdenServicio"), TextBox).Text.Trim
|
||||
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
Dim CveTipoOrdenServicio As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
CargadatosGvTiposOS()
|
||||
'GeneraGlobalDT()
|
||||
UpModalTiposOS.Update()
|
||||
|
||||
If ObjTipoOrdenServicios.UpdateTipoOrdenServicio(TipoOrdenServicio, False, Estatus, CveTipoOrdenServicio) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTTipoOrdenServicios") = ObjTipoOrdenServicios.DtResultados '.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
'GlobalDTTipoOrdenServicios(-1) = ObjTipoOrdenServicios.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposOS"), "jsHideModalTiposOS")
|
||||
|
||||
UpGral.Update()
|
||||
Alert("Tipo de Orden de Servicio Actualizado Correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrio un error al Actualizar el Tipo de Orden de Servicio", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
CveOrdenServicioTipo = -1
|
||||
Actualizar = False
|
||||
|
||||
ObjTipoOrdenServicios.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
GvDatos.EditIndex = e.NewEditIndex
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Public Sub Remove_ClickTiposOS(sender As Object, e As EventArgs)
|
||||
|
||||
Dim ObjTipoOrdenServicios As New ClsOS
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = False
|
||||
CveOrdenServicioTipo = GvRow.DataKey("CveOrdenServicioTipo").ToEntero
|
||||
|
||||
If ObjTipoOrdenServicios.RemoveTipoOrdenServicio(CveOrdenServicioTipo) Then
|
||||
CargadatosGvTiposOS()
|
||||
'GeneraGlobalDT()
|
||||
|
||||
Alert("El Tipo de Orden de Servicio se eliminó Correctamente ", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
CargaGrid("")
|
||||
Alert("Ocurrio un error al Eliminar el Tipo de Orden de Servicio", TipoMensaje.MsgError)
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
ObjTipoOrdenServicios.Dispose()
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
CargadatosGvTiposOS()
|
||||
|
||||
CveOrdenServicioTipo = -1
|
||||
|
||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} ASC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-asc' style='color:#999' ></i>")
|
||||
Else
|
||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} DESC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid(Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTTipoOrdenServicios"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatos.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatos.DataSource = CType(ViewState("DTTipoOrdenServicios"), DataTable)
|
||||
End If
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
Public Sub Edit_ClickTiposOS(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = False
|
||||
|
||||
LtlTituloModalTiposOS.Text = "Editar Tipo de Orden de Servicio"
|
||||
Actualizar = True
|
||||
DivEstatus.Visible = True
|
||||
|
||||
CveOrdenServicioTipo = GvRow.DataKey("CveOrdenServicioTipo").ToEntero
|
||||
|
||||
TxtTiposOS.Text = GvRow.DataKey("OrdenServicioTipo")
|
||||
ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False)
|
||||
|
||||
BtnAgregarTiposOSModal.Text = "Actualizar"
|
||||
|
||||
UpModalTiposOS.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposOS"))
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
End Class
|
||||
@@ -86,7 +86,7 @@
|
||||
<div class="col-md-4">
|
||||
<asp:Label ID="LblCliente" runat="server"></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="col-md-2">
|
||||
<b>Fecha Recibido:</b>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
@@ -106,7 +106,7 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div id="DivClienteSucursal" runat="server" visible="false">
|
||||
<div class="col-md-2">
|
||||
<b>Sucursal del Cliente:</b>
|
||||
@@ -152,6 +152,8 @@
|
||||
<div class="col-md-3" style="margin-top: 5px;">
|
||||
<asp:DropDownList ID="DdlTipoOrdenOS" CssClass="form-control input-sm select2me" runat="server" DataTextField="OrdenServicioTipo" DataValueField="CveOrdenServicioTipo" Width="100%" Height="30px">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoOS" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlTipoOrdenOS" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Orden''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETipoOS" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoOS" Width="100px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -87,10 +87,10 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgImprimir" runat="server"> <i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
|
||||
<asp:LinkButton ID="ImgImprimir" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
@@ -164,9 +164,8 @@
|
||||
Cliente:
|
||||
</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlClientes" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;">
|
||||
</ADS:Dropdownlost>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
@@ -232,8 +231,8 @@
|
||||
<div id="dvCa" style="width: 100%; top: 40px">
|
||||
<table id="dTable" class="correcto table Widthall Titulos">
|
||||
<tr>
|
||||
<td id="dvInv" runat="server" class="dataTables_scrollHead" style="text-align: center!important; width: 30.5%; font-size: 14px;"><b>Venta</b></td>
|
||||
<td id="dvVen" runat="server" class="dataTables_scrollHead" style="text-align: center!important; font-size: 14px; border-right-color: white!important; border-left-color: white!important; width: 32.5%; border-style: solid;"><b>Costo</b></td>
|
||||
<td id="dvInv" runat="server" class="dataTables_scrollHead" style="text-align: center!important; width: 42%; font-size: 14px;"><b>Venta</b></td>
|
||||
<td id="dvVen" runat="server" class="dataTables_scrollHead" style="text-align: center!important; font-size: 14px; border-right-color: white!important; border-left-color: white!important; width: 25%; border-style: solid;"><b>Costo</b></td>
|
||||
<td id="dvUt" runat="server" class="dataTables_scrollHead" style="text-align: center!important; width: 40%; font-size: 14px;"><b>Utilidad/Pérdida</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -250,6 +249,9 @@
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Center" HeaderText="Serie Folio" DataTextField="SerieFolio" DataTextFormatString="{0}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}"/>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Center" HeaderText="Fecha" DataTextField="FechaVenta" DataTextFormatString="{0:d}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}"/>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" HeaderText="SubTotal" DataTextField="SubTotal" DataTextFormatString="{0:N}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}"/>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" HeaderText="Descuento" DataTextField="Descuento" DataTextFormatString="{0:N}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}"/>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" HeaderText="Bonificacion" DataTextField="Bonificacion" DataTextFormatString="{0:N}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}"/>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Right" HeaderText="SubTotal2" DataTextField="SubTotal2" DataTextFormatString="{0:N}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}"/>
|
||||
<asp:HyperLinkField Text="Ir" DataNavigateUrlFields="CveVenta" ItemStyle-Width="2.5%" ItemStyle-HorizontalAlign="Center" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Center" HeaderText="Folio" ItemStyle-CssClass="Texto" DataTextField="FolioMovto" DataTextFormatString="{0}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}"/>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Center" HeaderText="Fecha" DataTextField="FechaMovto" DataTextFormatString="{0:d}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}"/>
|
||||
|
||||
@@ -38,8 +38,15 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
||||
|
||||
'Carga Clientes
|
||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||
DdlClientes.DataBind()
|
||||
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
If EsWS Then
|
||||
DdlClientes.setEsWebService(True)
|
||||
Else
|
||||
DdlClientes.setEsWebService(False)
|
||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlClientes.DataBind()
|
||||
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
'CargaSubProyectos
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
@@ -84,7 +91,10 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
|
||||
DdlSubProyecto.SelectedValuesIfExistM(CveSubProyecto)
|
||||
DdlVendedor.SelectedValuesIfExistM(CveVendedor)
|
||||
DdlClientes.SelectedValueExist(CveCliente)
|
||||
If CveCliente <> "-1" Then
|
||||
DdlClientes.SelectedValue = CveCliente
|
||||
DdlClientes.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros($"CveCliente = {CveCliente}").FiltroPrimeroValor("Nombre")
|
||||
End If
|
||||
DdlClasificacion.SelectedValueExist(CveClasificacion)
|
||||
DdlPS.SelectedValue = CvePS
|
||||
If CvePS.ToEntero > 0 AndAlso GlobalDTPS(UsuarioActual.CveEmpresa, CvePS.ToEntero).Rows.Count > 0 Then
|
||||
@@ -184,17 +194,25 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.DBCampo("CveVenta") = "" Then
|
||||
e.Row.Cells(6).Text = ""
|
||||
e.Row.Cells(7).Text = ""
|
||||
e.Row.Cells(8).Text = ""
|
||||
e.Row.Cells(10).Text = ""
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CveMovimiento") = "" Then
|
||||
e.Row.Cells(3).Text = ""
|
||||
e.Row.Cells(7).Text = ""
|
||||
e.Row.Cells(8).Text = ""
|
||||
e.Row.Cells(10).Text = ""
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CveVenta") = "" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CveVenta") = "" Then
|
||||
e.Row.Cells(7).Text = ""
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim Liga As String = String.Format("/Ventas/RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}",
|
||||
@@ -249,7 +267,7 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
If txtFechaI.Text = "" Then FechaI = MinFecha
|
||||
If txtFechaF.Text = "" Then FechaF = MaxFecha
|
||||
|
||||
Dim Cliente = If(DdlClientes.SelectedValue = "", "", $" <b>Cliente:</b> {DdlClientes.SelectedItem.Text}")
|
||||
Dim Cliente = If(DdlClientes.SelectedValue = "", "", $" <b>Cliente:</b> {DdlClientes.SelectedText}")
|
||||
Dim Sucursal = If(DdlSubProyecto.GetSelectedText = "", "", $" <b>Sucursal:</b> {DdlSubProyecto.GetSelectedText}")
|
||||
Dim Vendedor = If(DdlVendedor.GetSelectedText = "", "", $" <b>Vendedor:</b> {DdlVendedor.GetSelectedText}")
|
||||
Dim PS = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S.:</b> {DdlPS.SelectedText}")
|
||||
@@ -305,7 +323,7 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
Dim Sucursal = If(DdlSubProyecto.GetSelectedText = "", "", $" <b>Sucursal:</b> {DdlSubProyecto.GetSelectedText}")
|
||||
Dim FechaIn As String = $" <b>Fecha Inicio:</b> {txtFechaI.Text}"
|
||||
Dim FechaFn As String = $" <b>Fecha Fin:</b> {txtFechaF.Text}"
|
||||
Dim Cliente = If(DdlClientes.SelectedValue = "-1", "", $" <b>Cliente:</b> {DdlClientes.SelectedItem.Text}")
|
||||
Dim Cliente = If(DdlClientes.SelectedValue = "-1", "", $" <b>Cliente:</b> {DdlClientes.SelectedText}")
|
||||
Dim Vendedor = If(DdlVendedor.GetSelectedText = "", "", $" <b>Vendedor:</b> {DdlVendedor.GetSelectedText}")
|
||||
Dim PS = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S.:</b> {DdlPS.SelectedText}")
|
||||
Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificacion:</b> {DdlClasificacion.SelectedItem.Text}")
|
||||
|
||||
@@ -139,9 +139,7 @@
|
||||
Cliente:
|
||||
</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlClientes" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientesWS" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width:150px;"></ADS:Dropdownlost>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Vendedor:
|
||||
|
||||
@@ -44,8 +44,14 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
||||
|
||||
'Carga Clientes
|
||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||
DdlClientes.DataBind()
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
DdlClientesWS.setEsWebService(True)
|
||||
Else
|
||||
DdlClientesWS.setEsWebService(False)
|
||||
DdlClientesWS.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlClientesWS.DataBind()
|
||||
DdlClientesWS.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
'CargaSubProyectos
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
@@ -100,7 +106,7 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetReportePadreVentasUtilidad(If(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM), DdlClientes.SelectedValue.ToEntero,
|
||||
If ObjVentas.GetReportePadreVentasUtilidad(If(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM), DdlClientesWS.SelectedValue.ToEntero,
|
||||
If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM), txtFechaI.Text.ToDate, txtFechaF.Text.ToDate,
|
||||
UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero) Then
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
@@ -211,10 +217,10 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
If txtFechaI.Text <> "" Then StrFiltro.AppendFormat(" <b>Fecha Inicio </b>: {0}", txtFechaI.Text.ToDate.ToShortDateString)
|
||||
If txtFechaF.Text <> "" Then StrFiltro.AppendFormat(" <b>Fecha Fin </b>: {0}", txtFechaF.Text.ToDate.ToShortDateString)
|
||||
If DdlSubProyecto.GetSelectedText <> "" Then StrFiltro.AppendFormat(" <b>SubProyecto</b>: {0}", DdlSubProyecto.GetSelectedText)
|
||||
If DdlClientes.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Cliente</b>: {0}", DdlClientes.SelectedItem.Text)
|
||||
If DdlClientesWS.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Cliente</b>: {0}", DdlClientesWS.SelectedText)
|
||||
If DdlPS.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>P.S.</b>: {0}", DdlPS.SelectedText)
|
||||
If DdlClasificacion.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Clasificación</b>: {0}", DdlClasificacion.SelectedItem.Text)
|
||||
If DdlClientes.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Cliente</b>: {0}", DdlClientes.SelectedItem.Text)
|
||||
If DdlClientesWS.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Cliente</b>: {0}", DdlClientesWS.SelectedText)
|
||||
If DdlVendedor.GetSelectedText <> "" Then StrFiltro.AppendFormat(" <b>Vendedor</b>: {0}", DdlVendedor.GetSelectedText)
|
||||
Dim params As List(Of ReportParameter) = New List(Of ReportParameter)()
|
||||
Dim Imagen As System.IO.FileInfo = New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
|
||||
14008
Ventas/Ventas.aspx
14008
Ventas/Ventas.aspx
File diff suppressed because it is too large
Load Diff
@@ -9,7 +9,6 @@ Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Security.Cryptography.X509Certificates
|
||||
Imports System.Globalization
|
||||
|
||||
|
||||
Partial Class Ventas
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -4318,9 +4317,7 @@ Partial Class Ventas
|
||||
DdlMetodoPago33.DataBind()
|
||||
DdlMetodoPago33.SelectedValue = "3"
|
||||
|
||||
|
||||
CargaFormaPago(DdlMetodoPago33.SelectedValue.ToEntero)
|
||||
|
||||
CargaFormaPago(DdlMetodoPago33.SelectedValue.ToEntero)
|
||||
|
||||
'End If
|
||||
|
||||
@@ -6559,7 +6556,7 @@ Partial Class Ventas
|
||||
'ContPAQ El movimiento 1 es el de Venta
|
||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ant", "Rem", "Cot", "Ped", "Pd2", "PA") Then
|
||||
If UsuarioActual.CveEmpresa = 119 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ant", "Rem", "Cot", "Ped", "Pd2", "PA", "NC") Then
|
||||
AutoConta = False
|
||||
End If
|
||||
|
||||
@@ -8803,7 +8800,7 @@ Partial Class Ventas
|
||||
'Se agregan los PS
|
||||
For Each Row As DataRow In TmpDTDetalle.Rows
|
||||
If Not ObjVentas.AddVentaDetalle(ObjVentas.CveVenta, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("CveUM").ToString.ToEntero,
|
||||
Row("PU").ToString.ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("IVA").ToString.ToDouble, Math.Round((Row("Total").ToString.ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("IVA").ToString.ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)))), 6),
|
||||
Row("PU").ToString.ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("ImporteIVA").ToString.ToDouble, Math.Round((Row("Total").ToString.ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("PorcentajeIVA").ToString.ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)))), 6),
|
||||
Row("Obs").ToString, Row("Descuento").ToString.ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("TipoDescuento").ToString.ToEntero, Row("CveSubProyecto").ToString.ToEntero, Row("CvePresupuestoIngreso").ToString.ToEntero,
|
||||
TiempoEntrega:=Row("TiempoEntrega").ToString, CveVentaDetallePadre:=Row("CveVentaDetalle").ToString.ToEntero, CveContratoDetalle:=Row("CveContratoDetalle").ToString.ToEntero, CvePromocionDetalle:=If(DtPromociones IsNot Nothing, DtPromociones.FiltroPrimeroValor("CvePromocionDetalle", $"CvePS={Row("CvePS").ToString}").ToEntero, -1),
|
||||
IEPS:=Row("ImporteIEPS").ToString.ToDouble, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString.ToEntero,
|
||||
@@ -9352,7 +9349,7 @@ Partial Class Ventas
|
||||
ImporteMN251 = Dr("Importe").ToString.ToDecimal * TCFluctuacion
|
||||
ElseIf DdlMoneda.SelectedValue.ToEntero = 1 AndAlso Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then
|
||||
ImporteMN251 = Dr("Importe").ToString.ToDecimal / TipoCambioNC
|
||||
Else
|
||||
Else
|
||||
ImporteMN251 = Dr("Importe").ToString.ToDecimal
|
||||
End If
|
||||
|
||||
@@ -10191,8 +10188,8 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
'REGRESA SALDO A LAS REMISIONES QUE SE FACTURARON EN EL INGRESO QUE SE ESTA CANCELANDO
|
||||
If ObjFactura.TipoDocto = "Ing" And ValorMultiplicador = -1 AndAlso NuevaFactura <> 1 AndAlso Not SeCancelaRemisionProceso Then ' se debe de excluir cuando es refacturación
|
||||
'REGRESA SALDO A LAS REMISIONES QUE SE FACTURARON EN EL INGRESO QUE SE ESTA CANCELANDO
|
||||
If ObjFactura.TipoDocto = "Ing" And ValorMultiplicador = -1 AndAlso NuevaFactura <> 1 AndAlso Not SeCancelaRemisionProceso Then ' se debe de excluir cuando es refacturación
|
||||
If ObjVentas.GetRemisionesRelacionadas(ObjFactura.CveVenta, ObjFactura.TipoDocto) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
For Each Dr As DataRow In ObjVentas.DtResultados.Rows
|
||||
Dim Selecciono As Boolean = False
|
||||
@@ -14408,7 +14405,7 @@ Partial Class Ventas
|
||||
If TotalAmortizacion > 0 AndAlso TotalSubTotal = TotalAmortizacion Then ' si se amortizó completa la factura, debe de limpiar los impuestos
|
||||
If DdlTipoAmortizacionAnticipo.SelectedValue.Contiene("3") Then
|
||||
For Each dr As DataRow In TmpDT.Rows
|
||||
dr("ImporteIVA") = 0 : dr("ImporteIEPS") = 0 : dr("ImporteRetIVA") = 0 : dr("ImporteRetISR") = 0
|
||||
dr("ImporteIVA") = 0 : dr("ImporteIEPS") = 0 : dr("ImporteRetIVA") = 0 : dr("ImporteRetISR") = 0 : dr("PorcentajeIVA") = 0 : dr("IVA") = 0
|
||||
Next
|
||||
|
||||
If TmpDTImpuestos IsNot Nothing Then
|
||||
@@ -15823,7 +15820,7 @@ Partial Class Ventas
|
||||
End If
|
||||
Else
|
||||
If Not ObjVentas.AddVentaDetalle(CveVenta, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("CveUM").ToString.ToEntero,
|
||||
Row("PU").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("IVA").ToString.ToDouble, Math.Round((Row("Total").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)) * (1 + Row("IVA").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)))), 6),
|
||||
Row("PU").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("ImporteIVA").ToString.ToDouble, Math.Round((Row("Total").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)) * (1 + Row("PorcentajeIVA").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)))), 6),
|
||||
Row("Obs").ToString, Row("Descuento").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("TipoDescuento").ToString.ToEntero, Row("CveSubProyecto").ToString.ToEntero, Row("CvePresupuestoIngreso").ToString.ToEntero, PorcentajeIVA:=Row("PorcentajeIVA").ToString.ToDecimal, IEPS:=Row("IEPS").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), PorcentajeIEPS:=Row("PorcentajeIEPS").ToString.ToDouble, TiempoEntrega:=Row("TiempoEntrega").ToString,
|
||||
CveVentaDetallePadre:=Row("CveVentaDetalle").ToString.ToEntero, CveContratoDetalle:=Row("CveContratoDetalle").ToString.ToEntero, CvePromocionDetalle:=If(DtPromociones IsNot Nothing, DtPromociones.FiltroPrimeroValor("CvePromocionDetalle", $"CvePS={Row("CvePS").ToString}").ToEntero, -1),
|
||||
ImporteRetIVA:=Row("ImporteRetIVA").ToString.ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString.ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString.ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString.ToDouble, CuentaPredial:=Row("CuentaPredial").ToString) Then
|
||||
@@ -16086,7 +16083,7 @@ Partial Class Ventas
|
||||
Alert("El producto no fue encontrado.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub DdlMoneda_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlMoneda.SelectedIndexChanged
|
||||
Private Sub DdlMoneda_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlMoneda.SelectedIndexChanged
|
||||
CambiaMoneda()
|
||||
End Sub
|
||||
Private Sub CambiaMoneda()
|
||||
@@ -18330,7 +18327,9 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, CancelacionAcuse, CancelacionFecha, CveVenta, IDPoliza, CvePAC:=CvePACCancelacion, CveEstatusRefacturacion:=CveEstatusRefacturacion) Then
|
||||
|
||||
If Not ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, CancelacionAcuse, CancelacionFecha, CveVenta, IDPoliza, CvePAC:=CvePACCancelacion, CveEstatusRefacturacion:=CveEstatusRefacturacion,
|
||||
CveUsuarioCambiaEstatus:=UsuarioActual.CveUsuario, FechaCambioEstatus:=Now.ToString("yyyy-MM-dd hh:mm:ss.mmm")) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al guardar el estatus de cancelación."
|
||||
End If
|
||||
@@ -20879,7 +20878,7 @@ Partial Class Ventas
|
||||
If AplicaNCMasiva Then
|
||||
For Each Gvr As GridViewRow In GvCxC.Rows
|
||||
If Gvr.FCCheckBox("ChkCxC").Checked Then
|
||||
DtImpuestos.Merge(CargaDtImpuestosNC(Gvr.DataKey("CveVenta").ToString.ToEntero, Gvr.FCTextBox("TxtImporte").Text.ToString.ToDecimal))
|
||||
DtImpuestos.Merge(CargaDtImpuestosNC(Gvr.DataKey("CveVenta").ToString.ToEntero, Gvr.FCTextBox("TxtImporte").Text.ToString.ToDecimal), True, MissingSchemaAction.Ignore)
|
||||
'CARGA FACTURA A LA CUAL SE APLICA LA NC
|
||||
CargaNCDT(Gvr.DataKey("CveVenta").ToString.ToEntero, Gvr.FCTextBox("TxtImporte").Text.ToString.ToDecimal)
|
||||
End If
|
||||
@@ -21753,7 +21752,8 @@ Partial Class Ventas
|
||||
CambiaMetodoPago33()
|
||||
End Sub
|
||||
Private Sub CambiaMetodoPago33()
|
||||
CargaFormaPago(DdlMetodoPago33.SelectedValue.ToEntero)
|
||||
CargaFormaPago(DdlMetodoPago33.SelectedValue.ToEntero)
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
@@ -21883,7 +21883,7 @@ Partial Class Ventas
|
||||
'RE-INSERTA DETALLES
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
If Not ObjVentas.AddVentaDetalle(CveVenta, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("CveUM").ToString.ToEntero,
|
||||
Row("PU").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("IVA").ToString.ToDouble, Math.Round((Row("Total").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)) * (1 + Row("IVA").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)))), 6),
|
||||
Row("PU").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("ImporteIVA").ToString.ToDouble, Math.Round((Row("Total").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)) * (1 + Row("PorcentajeIVA").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)))), 6),
|
||||
Row("Obs").ToString, Row("Descuento").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("TipoDescuento").ToString.ToEntero, Row("CveSubProyecto").ToString.ToEntero, Row("CvePresupuestoIngreso").ToString.ToEntero,
|
||||
PorcentajeIVA:=Row("PorcentajeIVA").ToString.ToDecimal, IEPS:=Row("IEPS").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), PorcentajeIEPS:=Row("PorcentajeIEPS").ToString.ToDouble, TiempoEntrega:=Row("TiempoEntrega").ToString) Then
|
||||
MensajeError = "Ocurrió un error al guardar las partidas de la cotización"
|
||||
|
||||
Reference in New Issue
Block a user