Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1921,7 +1921,9 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas X Cobrar Pendientes" ToolTip="Listado de CxC"
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas X Cobrar Pendientes" ToolTip="Listado de CxC"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-height="300" GridLines="None" DataKeyNames="CveVenta">
|
||||
<Columns>
|
||||
|
||||
@@ -1931,6 +1933,9 @@
|
||||
<asp:Literal ID="LtlFactura" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:BoundField HeaderText="Metodo Pago" DataField="ClaveMetodoPagoSAT" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Fecha Venta" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Fecha Vencimiento" DataField="FechaVencimiento" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Días Vencidos" DataField="DiasVencidos" DataFormatString="{0}" ItemStyle-HorizontalAlign="Center" />
|
||||
@@ -1974,6 +1979,8 @@
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2003,14 +2010,15 @@
|
||||
</div>
|
||||
|
||||
<div class="portlet-body">
|
||||
<div class="row col-md-12" align="right">
|
||||
<div class="col-md-12" align="right">
|
||||
<input type="text" id="TxtCxCHistorial" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtCxCHistorial','{0}')", GvCxCHistorial.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtCxCHistorial','{0}')", GvCxCHistorial.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvCxCHistorial" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró Historial de Cuentas X Cobrar"
|
||||
ToolTip="Listado de Historia CxC" CssClass="table table-striped table-advance table-hover table-grid Widthall ScrollAD" data-height="300"
|
||||
GridLines="None">
|
||||
@@ -2052,6 +2060,7 @@
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -911,7 +911,7 @@ Partial Class ProductosyServicios
|
||||
|
||||
Public Sub CargaDdlSATPS()
|
||||
DdlSATPS.setEsWebService(True)
|
||||
DdlSATPS.Attributes.Add("data-metodo", "getpssat")
|
||||
DdlSATPS.ddlWS.Attributes.Add("data-metodo", "getpssat")
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDdlFraccionArancelaria()
|
||||
@@ -1123,6 +1123,10 @@ Partial Class ProductosyServicios
|
||||
End Sub
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
If DdlSATPS.SelectedValue = "46920" Then
|
||||
Alert("El Producto Servicio SAT con clave '01010101' no es valido, por favor seleccione otro", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If TxtPS.Text.Trim.Length = 0 Or DdlTipoPS.SelectedValue.ToEntero <= 0 Or DdlUnidadMedida.SelectedValue.ToEntero <= 0 Or DdlClasificacion.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("Los campos Producto/Servicio, Tipo, Unidad de medida, Clasificación Contable son requeridos por favor ingreselos.", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
@@ -1782,6 +1782,15 @@ Partial Class Ventas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property VentaDesglosaIEPS As Boolean
|
||||
Get
|
||||
Return CBool(IfNull(ViewState("VentaDesglosaIEPS"), "False", ViewState("VentaDesglosaIEPS")))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("VentaDesglosaIEPS") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
'#Region "AuxiliarConta"
|
||||
@@ -5325,8 +5334,7 @@ Partial Class Ventas
|
||||
|
||||
CargarAlmacenes()
|
||||
|
||||
If UsuarioActual.Empresa.FacturaProduccion Then
|
||||
End If
|
||||
|
||||
CargaDocumentacionCliente()
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 1, 119) Then
|
||||
@@ -8483,7 +8491,7 @@ Partial Class Ventas
|
||||
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {DdlMoneda.SelectedValue}")
|
||||
ObjFactura.TipoDocto = If(IfNull(ViewState("CveRemision"), 0).ToString().ToEntero() > 0, "Ing", DdlTipoComprobante.SelectedValue)
|
||||
ObjFactura.FacturarSucursal = (Me.FacturarSucursal AndAlso DdlSucursalCliente.SelectedValue.ToEntero() > 0 AndAlso (Me.ClienteSucursal IsNot Nothing AndAlso Not String.IsNullOrEmpty(Me.ClienteSucursal.RFC)))
|
||||
|
||||
ObjFactura.VentaDesglosaIEPS = Me.VentaDesglosaIEPS
|
||||
'ObjFactura.RefDocto = TxtDocto.Text.Trim
|
||||
'si es cancelacion, debe de conservar el folio actual
|
||||
If Not EsCancelacion Then ObjFactura.Folio = If(EstablecioFolio Or VistaPrevia Or (CveVenta > 0 And (NuevaFactura.Contiene(0, 2))), TxtFolio.Text.Trim.ToEntero(), -1)
|
||||
@@ -9868,16 +9876,23 @@ Partial Class Ventas
|
||||
|
||||
ObjClientes.Dispose()
|
||||
|
||||
BtnEmitirImprimir.Text = "Facturar"
|
||||
|
||||
'REGISTRAR UNA ENTREGA DIRECTA
|
||||
If TmpDT.COUNT("EntregaDirecta", "EntregaDirecta = 1") > 0 Then
|
||||
trPaqueteriaOpciones.Visible = False
|
||||
trPaqueteriOpcionesLabel.Visible = False
|
||||
trPaqueteriaDirectaLabel.Visible = True
|
||||
End If
|
||||
|
||||
BtnEmitirImprimir.Text = "Facturar"
|
||||
DdlTipoComprobante.SelectedValue = "Ing"
|
||||
DdlTipoComprobante.Enabled = False
|
||||
DdlTipoComprobante.Items.Clear()
|
||||
DdlTipoComprobante.Items.Insert(0, New ListItem("Ingresos", "Ing"))
|
||||
DdlTipoComprobante.Items.Insert(1, New ListItem("Remisión", "Rem"))
|
||||
DdlTipoComprobante.Enabled = True
|
||||
|
||||
Else
|
||||
DdlTipoComprobante.SelectedValue = "Ing"
|
||||
DdlTipoComprobante.Enabled = False
|
||||
End If
|
||||
|
||||
Tab.ActiveTab = TabGenerales
|
||||
TabGenerales.Enabled = True
|
||||
@@ -10048,7 +10063,8 @@ Partial Class Ventas
|
||||
CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero() > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)),
|
||||
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, CveAcercamientoCRM:=CveAcercamientoCRM,
|
||||
DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False),
|
||||
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text, FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal) Then
|
||||
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text,
|
||||
FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS) Then
|
||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
Else
|
||||
If factura.TipoDocto.Contiene("Dev", "Egs") Or DtVentasNC IsNot Nothing Or CveEstatusRefacturacion = 1 Then
|
||||
@@ -14534,119 +14550,121 @@ Partial Class Ventas
|
||||
TxtPrecio.Enabled = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(68) Then TxtPrecio.Enabled = False
|
||||
Dim PSCodigoSAT As String = drPS("SATClavePS").ToString
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(68) AndAlso Not PSCodigoSAT.Contiene("84111506", "80141610") Then TxtPrecio.Enabled = False
|
||||
|
||||
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count = 0 Then
|
||||
DdlMoneda.SelectedValueExist(drPS("CveMoneda").ToString())
|
||||
CambiaMoneda()
|
||||
End If
|
||||
|
||||
'SUGIERE PRECIO
|
||||
Dim PrecioSugerido = 0.0
|
||||
PrecioSugerido = drPS("Precio").ToString().ToDouble
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(1) Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPorcentajeProductos(CveCliente) Then
|
||||
Dim PrecioAplicado = ObjPS.DtResultados.FiltraParametros($"CvePS = {CvePSParametro}").FiltroPrimeroValor("PrecioA").ToDouble
|
||||
If PrecioAplicado > 0 Then
|
||||
PrecioSugerido = PrecioAplicado
|
||||
End If
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(404).ToEntero > 0 Then 'cuando el valor es 10.- secuencia Cliente/Sucursal, 20 - sucursal/cliente
|
||||
Dim TipoPrecioLista As Integer = UsuarioActual.Empresa.Funcionalidad(404).ToEntero
|
||||
' si es 10. primero el cliente
|
||||
Dim CvePrecioListaPS As Integer
|
||||
Dim PorcentajePrecio As Double = 0
|
||||
|
||||
If TipoPrecioLista = 10 Then
|
||||
|
||||
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
||||
If CvePrecioListaPS <= 0 Then
|
||||
|
||||
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
|
||||
If CvePrecioListaPS <= 0 Then
|
||||
|
||||
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
||||
|
||||
End If
|
||||
|
||||
DdlMoneda.SelectedValueExist(drPS("CveMoneda").ToString())
|
||||
CambiaMoneda()
|
||||
End If
|
||||
|
||||
If CvePrecioListaPS > 0 Then
|
||||
'SUGIERE PRECIO
|
||||
Dim PrecioSugerido = 0.0
|
||||
PrecioSugerido = drPS("Precio").ToString().ToDouble
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(1) Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
||||
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDouble
|
||||
PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDouble
|
||||
If ObjPS.GetPorcentajeProductos(CveCliente) Then
|
||||
Dim PrecioAplicado = ObjPS.DtResultados.FiltraParametros($"CvePS = {CvePSParametro}").FiltroPrimeroValor("PrecioA").ToDouble
|
||||
If PrecioAplicado > 0 Then
|
||||
PrecioSugerido = PrecioAplicado
|
||||
End If
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
End If
|
||||
|
||||
If PrecioSugerido = 0 Then
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
||||
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
||||
If CostoPS = 0 Then CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
||||
ObjInventarios.Dispose()
|
||||
If CostoPS > 0 And PorcentajePrecio > 0 Then
|
||||
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
|
||||
If UsuarioActual.Empresa.Funcionalidad(404).ToEntero > 0 Then 'cuando el valor es 10.- secuencia Cliente/Sucursal, 20 - sucursal/cliente
|
||||
Dim TipoPrecioLista As Integer = UsuarioActual.Empresa.Funcionalidad(404).ToEntero
|
||||
' si es 10. primero el cliente
|
||||
Dim CvePrecioListaPS As Integer
|
||||
Dim PorcentajePrecio As Double = 0
|
||||
|
||||
If TipoPrecioLista = 10 Then
|
||||
|
||||
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
||||
If CvePrecioListaPS <= 0 Then
|
||||
|
||||
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
|
||||
If CvePrecioListaPS <= 0 Then
|
||||
|
||||
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If CvePrecioListaPS > 0 Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
||||
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDouble
|
||||
PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDouble
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
End If
|
||||
|
||||
If PrecioSugerido = 0 Then
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
||||
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
||||
If CostoPS = 0 Then CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
||||
ObjInventarios.Dispose()
|
||||
If CostoPS > 0 And PorcentajePrecio > 0 Then
|
||||
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
|
||||
End If
|
||||
End If
|
||||
CvePrecioLista = CvePrecioListaPS
|
||||
End If
|
||||
CvePrecioLista = CvePrecioListaPS
|
||||
End If
|
||||
|
||||
|
||||
'Dim ObjClasificaciones As New ClsClasificaciones
|
||||
'If ObjClasificaciones.GetClasificaciones() Then
|
||||
' PrecioBaseCosto = ObjClasificaciones.DtResultados.FiltroPrimeroValor("PrecioBaseCosto", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveClasificacion = {drPS("CveClasificacion")}").ToDecimal
|
||||
'End If
|
||||
'Dim ObjClasificaciones As New ClsClasificaciones
|
||||
'If ObjClasificaciones.GetClasificaciones() Then
|
||||
' PrecioBaseCosto = ObjClasificaciones.DtResultados.FiltroPrimeroValor("PrecioBaseCosto", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveClasificacion = {drPS("CveClasificacion")}").ToDecimal
|
||||
'End If
|
||||
|
||||
If PrecioSugerido > 0 Then
|
||||
Dim PrecioBaseCosto As Decimal = 0
|
||||
PrecioBaseCosto = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=drPS("CveClasificacion").ToString().ToEntero()).FiltroPrimeroValor("PrecioBaseCosto", "").ToDecimal
|
||||
If PrecioSugerido > 0 Then
|
||||
Dim PrecioBaseCosto As Decimal = 0
|
||||
PrecioBaseCosto = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=drPS("CveClasificacion").ToString().ToEntero()).FiltroPrimeroValor("PrecioBaseCosto", "").ToDecimal
|
||||
|
||||
If PrecioBaseCosto > 0 Then
|
||||
PrecioSugerido = PrecioSugerido * ((PrecioBaseCosto / 100) + 1)
|
||||
If PrecioBaseCosto > 0 Then
|
||||
PrecioSugerido = PrecioSugerido * ((PrecioBaseCosto / 100) + 1)
|
||||
End If
|
||||
TxtPrecio.Text = PrecioSugerido.ToString("#,###.####") ' que muestre hasta los 4 digitos si lo requiere
|
||||
End If
|
||||
TxtPrecio.Text = PrecioSugerido.ToString("#,###.####") ' que muestre hasta los 4 digitos si lo requiere
|
||||
End If
|
||||
|
||||
|
||||
If IsNumeric(TxtCantidad.Text.Trim) Then
|
||||
LblTotalPS.Text = (TxtCantidad.Text.Trim.ToDouble * TxtPrecio.Text.ToDouble).ToString().FormatoNumero(2)
|
||||
Else
|
||||
LblTotalPS.Text = "0.00"
|
||||
End If
|
||||
LblPrecio1.Text = TxtPrecio.Text
|
||||
UPPDescuento.Update()
|
||||
|
||||
HdnIVAPS.Value = If(drPS("IVA").ToString() = "-1", ViewState("IVA"), drPS("IVA").ToString()).ToString()
|
||||
HdnIVARetAPS.Value = drPS("RetIVA").ToString()
|
||||
HdnAsientoContable.Value = drPS("AsientoContableVentas").ToString()
|
||||
HdnCtaContable.Value = drPS("IdCtaContVentas").ToString()
|
||||
HdnAplicaParaConcepto.Value = drPS("AplicaParaConcepto").ToString()
|
||||
HdnCodigo.Value = drPS("Codigo").ToString()
|
||||
If DdlClasificacion.SelectedIndex = 0 Then
|
||||
If drPS("CveClasificacion").ToString() IsNot Nothing Then
|
||||
DdlClasificacion.SelectedValueExist(drPS("CveClasificacion").ToString())
|
||||
If IsNumeric(TxtCantidad.Text.Trim) Then
|
||||
LblTotalPS.Text = (TxtCantidad.Text.Trim.ToDouble * TxtPrecio.Text.ToDouble).ToString().FormatoNumero(2)
|
||||
Else
|
||||
Alert("El Productos/Servicio no tiene asignada una Clasificación.", TipoMensaje.MsgInformacion)
|
||||
LblTotalPS.Text = "0.00"
|
||||
End If
|
||||
LblPrecio1.Text = TxtPrecio.Text
|
||||
UPPDescuento.Update()
|
||||
|
||||
HdnIVAPS.Value = If(drPS("IVA").ToString() = "-1", ViewState("IVA"), drPS("IVA").ToString()).ToString()
|
||||
HdnIVARetAPS.Value = drPS("RetIVA").ToString()
|
||||
HdnAsientoContable.Value = drPS("AsientoContableVentas").ToString()
|
||||
HdnCtaContable.Value = drPS("IdCtaContVentas").ToString()
|
||||
HdnAplicaParaConcepto.Value = drPS("AplicaParaConcepto").ToString()
|
||||
HdnCodigo.Value = drPS("Codigo").ToString()
|
||||
If DdlClasificacion.SelectedIndex = 0 Then
|
||||
If drPS("CveClasificacion").ToString() IsNot Nothing Then
|
||||
DdlClasificacion.SelectedValueExist(drPS("CveClasificacion").ToString())
|
||||
Else
|
||||
Alert("El Productos/Servicio no tiene asignada una Clasificación.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ElseIf CvePSParametro = -2 Then
|
||||
ElseIf CvePSParametro = -2 Then
|
||||
CargaPS(DdlClasificacion.SelectedValue.ToEntero(), Ddl)
|
||||
End If
|
||||
|
||||
@@ -15668,13 +15686,10 @@ Partial Class Ventas
|
||||
ObjPS.Dispose()
|
||||
End Sub
|
||||
Private Function AgregarProductoServicio(Cantidad As Decimal, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, Obs As String,
|
||||
PU As Decimal, Descuento As Decimal,
|
||||
CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String,
|
||||
Optional Serie As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0,
|
||||
Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0,
|
||||
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0,
|
||||
Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0,
|
||||
Optional SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1, Optional EsCargo As Boolean = False) As Boolean
|
||||
PU As Decimal, Descuento As Decimal, CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String, Optional Serie As String = "", Optional TiempoEntrega As String = "",
|
||||
Optional EntregaDirecta As Integer = 0, Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0,
|
||||
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0, Optional CuentaPredial As String = "",
|
||||
Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1, Optional EsCargo As Boolean = False) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
If Not CvePS > 0 Then
|
||||
@@ -15758,12 +15773,21 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
'VERIFICA SI EN LA FACTURA PADRE SE DESGLOSO EL IEPS
|
||||
Dim FacturaDesglosoIEPS As Boolean = ((CveDevolucion > 0 AndAlso NuevaFactura = 1) AndAlso (Me.ObjFacturaNC IsNot Nothing AndAlso Me.ObjFacturaNC.VentaDesglosaIEPS))
|
||||
|
||||
If Not ClienteDesglosaIEPS Then
|
||||
If Not RegeneraIEPS Then
|
||||
If Not RegeneraIEPS AndAlso Not FacturaDesglosoIEPS Then
|
||||
PU = PU * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal)
|
||||
VentaDesglosaIEPS = True
|
||||
End If
|
||||
DrPS("IEPSPorcentaje") = 0
|
||||
End If
|
||||
'SI YA SE DESGLOSO EL IEPS SE GUARDA LA BANDERA EN ESTA FACTURA
|
||||
If FacturaDesglosoIEPS Then
|
||||
VentaDesglosaIEPS = True
|
||||
End If
|
||||
|
||||
|
||||
TotalCalculableImpuestos = (Cantidad * (PU)) - Descuento
|
||||
TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal)
|
||||
|
||||
Reference in New Issue
Block a user