Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -177,6 +177,10 @@
|
||||
</asp:DropDownList>--%>
|
||||
<asp:ListBox ID="DdlVendedor" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">Categoría</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlCategoria" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlCategoria_SelectedIndexChanged" Width="100%" DataTextField="Categoria" DataValueField="CveCategoria"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Clasificación:
|
||||
</div>
|
||||
|
||||
@@ -38,7 +38,7 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
||||
|
||||
'Carga Clientes
|
||||
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
Dim EsWS As Boolean = True
|
||||
If EsWS Then
|
||||
DdlClientes.setEsWebService(True)
|
||||
DdlClientes.SelectedValue = "-1"
|
||||
@@ -63,6 +63,11 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
DdlVendedor.Enabled = False
|
||||
End If
|
||||
|
||||
'Cargo categorias
|
||||
DdlCategoria.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa)
|
||||
DdlCategoria.DataBind()
|
||||
|
||||
|
||||
'Cargo Clasificaciones
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClasificacion.DataBind()
|
||||
@@ -133,6 +138,14 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
txtFechaF.Text = CveGpo
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub DdlCategoria_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveCategoria:=DdlCategoria.SelectedValue.ToEntero)
|
||||
DdlClasificacion.DataBind()
|
||||
DdlClasificacion.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
@@ -151,7 +164,7 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
Dim Sucursales As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString
|
||||
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
|
||||
|
||||
If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero) Then
|
||||
If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero) Then
|
||||
DtVentas = ObjVentas.DtResultados
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
GvDatos.DataBind()
|
||||
@@ -302,7 +315,7 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
Dim Sucursales As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString
|
||||
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
|
||||
|
||||
If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero) Then
|
||||
If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero) Then
|
||||
|
||||
Dim FechaInicio As String = txtFechaI.Text
|
||||
Dim FechaFin As String = txtFechaF.Text
|
||||
|
||||
@@ -79,24 +79,16 @@
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">Grupo:</div>
|
||||
<div class="col-md-2 truncate">
|
||||
<asp:DropDownList ID="DdlGrupo" runat="server" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Text="Año Venta" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Año/Mes Venta" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Fecha Venta" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Text="Cliente" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Sucursal" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Vendedor" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Producto/Servicio" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Clasificación" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Marca" Value="9"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Sucursal:
|
||||
</div>
|
||||
<div class="col-md-1 " style="min-width:135px !important">
|
||||
<asp:ListBox ID="DdlSubProyecto" SelectionMode="Multiple" data-text="Todas" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="col-md-1" style="min-width:120px !important">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
@@ -113,7 +105,7 @@
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Fin:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="col-md-1" style="min-width:120px !important">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
@@ -127,17 +119,27 @@
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">Grupo:</div>
|
||||
<div class="col-md-1 truncate">
|
||||
<asp:DropDownList ID="DdlGrupo" runat="server" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Text="Año Venta" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Año/Mes Venta" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Fecha Venta" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Text="Cliente" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Sucursal" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Vendedor" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Producto/Servicio" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Clasificación" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Marca" Value="9"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Sucursal:
|
||||
</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:ListBox ID="DdlSubProyecto" SelectionMode="Multiple" data-text="Todas" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Cliente:
|
||||
</div>
|
||||
@@ -150,6 +152,10 @@
|
||||
<div class="col-md-2 ">
|
||||
<asp:ListBox ID="DdlVendedor" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">Categoría</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlCategoria" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlCategoria_SelectedIndexChanged" Width="100%" DataTextField="Categoria" DataValueField="CveCategoria"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Clasificación:
|
||||
</div>
|
||||
|
||||
@@ -68,6 +68,10 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
DdlVendedor.Enabled = False
|
||||
End If
|
||||
|
||||
'Cargo categorias
|
||||
DdlCategoria.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa)
|
||||
DdlCategoria.DataBind()
|
||||
|
||||
'Cargo Clasificaciones
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClasificacion.DataBind()
|
||||
@@ -94,6 +98,12 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
LblPorNeto.Text = "0"
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlCategoria_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveCategoria:=DdlCategoria.SelectedValue.ToEntero)
|
||||
DdlClasificacion.DataBind()
|
||||
DdlClasificacion.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
If DdlPS.UsaWebService Then
|
||||
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||
@@ -114,7 +124,7 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
Dim ObjVentas As New ClsVentas
|
||||
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,
|
||||
UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero,
|
||||
DdlMarcas.SelectedValue.ToEntero) Then
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
DtDatos = ObjVentas.DtResultados
|
||||
|
||||
@@ -802,7 +802,7 @@ Partial Class Ventas
|
||||
End Property
|
||||
Private ReadOnly Property IdCtaContClientes As Integer
|
||||
Get
|
||||
Return ViewState("IdCtaContClientes").ToString().ToEntero()
|
||||
Return IfNull(ViewState("IdCtaContClientes"), "").ToString().ToEntero()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -2089,6 +2089,13 @@ Partial Class Ventas
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If Not IsPostBack Then
|
||||
|
||||
If IfNull(Request("Opcionx"), "").ToString = "Saldar" And UsuarioActual.CveUsuario = 100 Then
|
||||
TxtFechaSaldarVenta.Text = "2021/12/31"
|
||||
SaldarVenta()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Modalidad = ""
|
||||
Opcion = ""
|
||||
Index = 0
|
||||
@@ -3062,6 +3069,8 @@ Partial Class Ventas
|
||||
End If
|
||||
MostrarOpcionesPaqueteria()
|
||||
|
||||
|
||||
|
||||
'If ViewState("CveCotizacion").ToString().ToEntero() > 0 Then
|
||||
|
||||
'If Not AjustarTotalCotizacionFacturada(ViewState("CveCotizacion").ToString().ToEntero(), TxtTotal.Text.ToDecimal) Then
|
||||
@@ -8078,7 +8087,7 @@ Partial Class Ventas
|
||||
|
||||
Me.CveAutorizacion = -1
|
||||
'SI ES A CREDITO DEBE VERIFICAR SI TIENE AUTORIZACIONES
|
||||
If UsuarioActual.CveRol = 1 AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveCliente > 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Egs") AndAlso RBLPago.SelectedValue = "1" Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveCliente > 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Egs") AndAlso RBLPago.SelectedValue = "1" Then
|
||||
Dim TipoDocumentoAutorizacion As String = ""
|
||||
Dim ImporteAutorizacion As Decimal = 0
|
||||
Dim TipoAutorizacion As Integer = 0
|
||||
@@ -8735,10 +8744,6 @@ Partial Class Ventas
|
||||
DebeTimbrar = False
|
||||
End If
|
||||
|
||||
'Si es BDH no debe timbrar
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
DebeTimbrar = False
|
||||
End If
|
||||
|
||||
If ObjFactura.TipoDocto.Contiene("Ing", "Egs", "Ant", "Dev") Then
|
||||
If UsuarioActual.Empresa.TipoFacturacion = "CFDi" AndAlso (UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1) Then
|
||||
@@ -15544,11 +15549,6 @@ Partial Class Ventas
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'Si es BDH no debe timbrar
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.TipoFacturacion = "CFDi" Then
|
||||
If UsuarioActual.Empresa.EstatusFacturacion Then
|
||||
|
||||
@@ -25027,6 +25027,8 @@ Partial Class Ventas
|
||||
|
||||
'RegistraScript("$('#ModalSaldarVenta').modal('hide')", "ModalSaldarVentaHidde")
|
||||
|
||||
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
ObjConta.IniciaTransacSQL()
|
||||
Dim CvePrePoliza As Integer = 0
|
||||
@@ -25060,19 +25062,55 @@ Partial Class Ventas
|
||||
'End If
|
||||
|
||||
' ObjIE.Dispose()
|
||||
|
||||
|
||||
Dim IdCtaContable As Integer = IdCtaContClientes
|
||||
Dim PorcentajePago As Decimal = SaldoVenta / TxtTotal.Text.ToDecimal
|
||||
Dim Saldo As Decimal = SaldoVenta
|
||||
Dim SubTotal As Decimal = PorcentajePago * TxtSubTotal.Text.ToDecimal
|
||||
Dim IVA As Decimal = PorcentajePago * TxtIVA.Text.ToDecimal
|
||||
Dim IEPS As Decimal = PorcentajePago * TxtIEPS.Text.ToDecimal
|
||||
Dim TCVenta As Decimal = TxtTipoCambio.Text.ToDecimal
|
||||
Dim FechaVenta As Date = TxtFecha.Text.ToDate
|
||||
Dim FechaPago As Date = TxtFechaSaldarVenta.Text.ToDate
|
||||
Dim tCveMoneda As Integer = DdlMoneda.SelectedValue.ToEntero()
|
||||
Dim TCPago As Decimal = GlobalTipoCambio(TxtFechaSaldarVenta.Text.ToDate).FormatoNumero(4).ToDecimal
|
||||
Dim Total As Decimal = 0
|
||||
Dim Saldo As Decimal = 0
|
||||
Dim SubTotal As Decimal
|
||||
Dim IVA As Decimal
|
||||
Dim IEPS As Decimal
|
||||
Dim Descuentos As Decimal
|
||||
Dim TCVenta As Decimal
|
||||
Dim FechaVenta As Date
|
||||
Dim FechaPago As Date = Request("FechaSaldar").ToDate
|
||||
Dim tCveMoneda As Integer
|
||||
Dim PorcentajePago As Decimal
|
||||
Dim SerieFolio As String = ""
|
||||
Dim CveSubProyecto As Integer
|
||||
Dim CveClasificacion As Integer
|
||||
Dim PorcentajeImpuesto As Decimal = 0
|
||||
|
||||
ViewState("CveVenta") = IfNull(Request("CveVenta"), 0).ToString.ToEntero
|
||||
|
||||
Dim Obj As New ClsVentas
|
||||
If Obj.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
Dim DbRowVenta As DataRow = Obj.DtResultados.FiltroPrimero("")
|
||||
ViewState("SaldoVenta") = DbRowVenta("Saldo").ToString()
|
||||
Total = DbRowVenta("Total").ToString.ToDecimal
|
||||
SubTotal = DbRowVenta("Saldo").ToString.ToDecimal
|
||||
SerieFolio = DbRowVenta("SerieFolio").ToString
|
||||
Saldo = SaldoVenta
|
||||
PorcentajePago = SaldoVenta / Total
|
||||
|
||||
IVA = PorcentajePago * DbRowVenta("IVA").ToString.ToDecimal
|
||||
IEPS = PorcentajePago * DbRowVenta("IEPS").ToString.ToDecimal
|
||||
Descuentos = PorcentajePago * DbRowVenta("Descuento").ToString.ToDecimal
|
||||
TCVenta = DbRowVenta("TipoCambio").ToString.ToDecimal
|
||||
FechaVenta = DbRowVenta("Fecha").ToString.ToDate
|
||||
' FechaPago = TxtFechaSaldarVenta.Text.ToDate
|
||||
tCveMoneda = DbRowVenta("CveMoneda").ToString.ToEntero
|
||||
ViewState("CveCliente") = DbRowVenta("CveCliente").ToString.ToEntero
|
||||
CveSubProyecto = DbRowVenta("CveSubProyecto").ToString.ToEntero
|
||||
PorcentajeImpuesto = DbRowVenta("PorcentajeIVA").ToString.ToDecimal
|
||||
|
||||
If Obj.GetVentaDetalle(CveVenta) Then
|
||||
CveClasificacion = Obj.DtResultados.MAX("CveClasificacion").ToEntero
|
||||
End If
|
||||
SubTotal = Saldo - IVA - IEPS
|
||||
|
||||
End If
|
||||
Obj.Dispose()
|
||||
|
||||
Dim TCPago As Decimal = GlobalTipoCambio(FechaPago).FormatoNumero(4).ToDecimal
|
||||
Dim CveConceptoDeduccion As Integer = 211
|
||||
|
||||
|
||||
@@ -25090,9 +25128,8 @@ Partial Class Ventas
|
||||
Dim CveConceptoCliente As Integer = 2
|
||||
Dim ImpuestosMovto As Boolean = False
|
||||
Dim IdCuentaContableNoDeducible As Integer = 0
|
||||
Dim SerieFolio As String = LblSerie.Text & "-" & TxtFolio.Text
|
||||
Dim ConceptoPartida As String = "saldado " & SerieFolio
|
||||
Dim CveSubProyecto As Integer = DdlSubProyectoDatos.SelectedValue.ToEntero()
|
||||
|
||||
|
||||
If CveConceptoDeduccion = 255 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(266).ToEntero()
|
||||
If CveConceptoDeduccion = 211 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(559).ToEntero()
|
||||
@@ -25110,8 +25147,8 @@ Partial Class Ventas
|
||||
|
||||
Dim UsaComplementaria As Boolean = True
|
||||
|
||||
If MsgError = "" Then
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Ventas/Saldarr", 47, SaldoVenta, SaldoVenta, tCveMoneda, TxtFechaSaldarVenta.Text.ToDate, ConceptoPartida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If MsgError = "" AndAlso Saldo > 0 Then
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Ventas/Saldarr", 47, SaldoVenta, SaldoVenta, tCveMoneda, FechaPago, ConceptoPartida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If tCveMoneda = 2 Then
|
||||
IdCtaContable = IdCtaContMonedaExtranjera
|
||||
@@ -25155,10 +25192,6 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
|
||||
' iva
|
||||
Dim PorcentajeImpuesto As Decimal = DdlIVA.SelectedValue.ToEntero()
|
||||
|
||||
Dim IdCtaIVAXTrasladar As Integer = 0
|
||||
|
||||
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
|
||||
@@ -25175,10 +25208,14 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
'al gasto,Subtotal
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, SubtotalMovto, SubTotal, SerieFolio, CveConceptoDeduccion, ConceptoPartida, FechaPago, IdCuentaContableNoDeducible, -1, CveCliente:=CveCliente, CveVenta:=CveVenta, ImporteMX:=SubTotal, CveCuenta:=-1, TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero()) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, SubtotalMovto, SubTotal, SerieFolio, CveConceptoDeduccion, ConceptoPartida, FechaPago, IdCuentaContableNoDeducible, -1, CveCliente:=CveCliente, CveVenta:=CveVenta, ImporteMX:=SubTotal, CveCuenta:=-1, TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
|
||||
'If Descuentos > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not SubtotalMovto, Descuentos, SerieFolio, 103, ConceptoPartida, FechaPago, IdCuentaContableNoDeducible, -1, CveCliente:=CveCliente, CveVenta:=CveVenta, ImporteMX:=Descuentos, CveCuenta:=-1, TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto) Then
|
||||
' MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
'End If
|
||||
|
||||
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
MsgError = ObjConta.MensajePolizaDescuadre + " " + ObjConta.ValorDiferencia
|
||||
@@ -25186,6 +25223,8 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
MsgError = "Saldo Cero"
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user