This commit is contained in:
2022-06-30 17:00:15 -07:00
51 changed files with 2480 additions and 856 deletions

View File

@@ -546,7 +546,7 @@
"title": "Ventas"
}],
"graphs": [{
"balloonText": "[[category]]: <b>[[value]]</b> [[Moneda]]",
"balloonText": "[[Texto]]: <b>[[value]]</b> [[Moneda]]",
"colorField": "Color",
"fillAlphas": 1,
"lineAlpha": 0.1,
@@ -560,7 +560,7 @@
"cursorAlpha": 0,
"zoomable": false
},
"categoryField": "Texto",
"categoryField": "Categoria",
"categoryAxis": {
"gridPosition": "start",
"labelRotation": 90
@@ -579,7 +579,7 @@
"dataProvider":
data,
"valueField": "Valor",
"titleField": "Texto",
"titleField": "Categoria",
"outlineAlpha": 0.4,
"depth3D": 0,
"balloonText": "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]% [[Moneda]])</span>",

View File

@@ -675,6 +675,8 @@ Partial Class Ventas_RepProductosServicios
Dim Row As DataRow = Nothing
Row = Dt.NewRow()
Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
Row("Moneda") = Dr("Moneda").ToString
Select Case DdlVer.SelectedValue.ToEntero
Case 1
Row("Valor") = Dr("Total").ToString.FormatoNumero
@@ -684,9 +686,11 @@ Partial Class Ventas_RepProductosServicios
Row("Valor") = Dr("IVA").ToString.FormatoNumero
Case 4
Row("Valor") = Dr("Cantidad").ToString.FormatoNumero
Row("Texto") = $"{Dr("GPO").ToString}"
End Select
Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString
Row("Moneda") = Dr("Moneda").ToString
Dt.Rows.Add(Row)
RowColorIndex += 1
If RowColorIndex = 17 Then
@@ -695,7 +699,12 @@ Partial Class Ventas_RepProductosServicios
End If
Next
Dim query = From s In Dt.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
Dim query = From s In Dt.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString(), .Categoria = s("Texto").ToString()}
If DdlVer.SelectedValue.ToEntero = 4 Then
query = From s In Dt.AsEnumerable() Select New With {.Texto = s("Texto").ToString() & " Cantidad", .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = "", .Categoria = s("Texto").ToString()}
End If
Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(query)
Select Case DdlGrafica.SelectedValue.ToEntero
Case 1

View File

@@ -202,9 +202,11 @@
</div>
<label class="col-md-1 ">Cliente:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlClientes" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
<%--<asp:DropDownList ID="DdlClientes" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</asp:DropDownList>--%>
</div>
<label class="col-md-1 truncate">Fecha Mostrada:</label>
<div class="col-md-2">

View File

@@ -70,14 +70,18 @@ public partial class Ventas_RepProductosServiciosPeriodo : ClsPaginas
{
DdlTipoComprobante.SelectedValueExist(Opcion);
DdlGrupo.SelectedValueExist("7");
DdlTipoComprobante_SelectedIndexChanged(DdlTipoComprobante, EventArgs.Empty);
DdlEstatus.SelectedValue = "-1";
}
}
private void CargaCombos()
{
//CargaClientes
DdlTipoComprobante_SelectedIndexChanged(DdlTipoComprobante, EventArgs.Empty);
DdlEstatus.SelectedValue = "-1";
}
}
private void CargaCombos()
{
////CargaClientes
//ClsClientes ObjClientes = new ClsClientes();
//if (ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa))
//{
// DdlClientes.DataSource = ObjClientes.DtResultados;
//}
//ObjClientes.Dispose();
//DdlClientes.DataBind();
@@ -260,10 +264,10 @@ public partial class Ventas_RepProductosServiciosPeriodo : ClsPaginas
DdlGrupo.SelectedValueExist("8");
}
#endregion
#region SELECTED INDEX CHANGE
#region SELECTED INDEX CHANGE
protected void DdlClienteClasificacion_SelectedIndexChanged(object sender, EventArgs e)
{

View File

@@ -114,9 +114,10 @@
</div>
<div class="col-md-1 truncate">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%">
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
<%--<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>
</asp:DropDownList>--%>
</div>
<div class="col-md-1 truncate">Clasificación Cli.:</div>
<div class="col-md-2 ">

View File

@@ -76,9 +76,16 @@ public partial class Ventas_RepRecuperacionPeriodo : ClsPaginas
DdlBanco.Items.Insert(0, new ListItem("Todos", "-1"));
DdlBanco.DataBind();
//Carga Clasificacion Cliente
ClsClientes ObjCliente = new ClsClientes();
if (ObjCliente.GetClienteClasificacion(UsuarioActual.CveEmpresa))
{
DdlClienteClasificacion.DataSource = ObjCliente.DtResultados;
}
ObjCliente.Dispose();
DdlClienteClasificacion.Items.Insert(0, new ListItem("Todos", "-1"));
DdlClienteClasificacion.DataBind();
DdlClientes.setEsWebService(true);
@@ -92,7 +99,7 @@ public partial class Ventas_RepRecuperacionPeriodo : ClsPaginas
}
private void GenerarPDF(string Opcion)
{
{
string FechaInicio, FechaFin, Sucursal, Grupo, Vendedor,Cliente, ClasificacionCliente,Banco,CuentaBancaria,TipoDocto,EstatusCliente,Registro,Responsable;
if (txtFechaI.Text == "") { FechaInicio = ""; } else { FechaInicio = $"&emsp;<b>Fecha Inicio:</b> {txtFechaI.Text}"; }
if (txtFechaF.Text == "") { FechaFin = ""; } else { FechaFin = $"&emsp;<b>Fecha Fin:</b> {txtFechaF.Text}"; }

View File

@@ -226,9 +226,11 @@
</div>
<label class="col-md-1 ">Cliente:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlClientes" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<%--<asp:DropDownList ID="DdlClientes" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</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>
<label title="Clasificación Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Clasificacion Cli.:</label>
<div class="col-md-2">

View File

@@ -96,16 +96,20 @@ Partial Class RepVentasPeriodo
End Sub
Private Sub CargaCombos()
'CargaClientes
Dim ObjClientes As New ClsClientes
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
DdlClientes.DataSource = ObjClientes.DtResultados
Else
DdlClientes.DataSource = Nothing
End If
ObjClientes.Dispose()
DdlClientes.DataBind()
Private Sub CargaCombos()
''CargaClientes
'Dim ObjClientes As New ClsClientes
'If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
' DdlClientes.DataSource = ObjClientes.DtResultados
'Else
' DdlClientes.DataSource = Nothing
'End If
'ObjClientes.Dispose()
'DdlClientes.DataBind()
DdlClientes.setEsWebService(True)
DdlClientes.Attributes.Add("data-metodo", "getcliente")
DdlClientes.SelectedText = "Todos"
DdlClientes.SelectedValue = "-1"
'CargaSucursales
@@ -192,8 +196,10 @@ Partial Class RepVentasPeriodo
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim.ToDate, MinFecha)
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim.ToDate, MaxFecha)
Dim ModalidadContable As Boolean = Not ChkLecturaAdmin.Checked
Dim ModalidadContable As Boolean = Not ChkLecturaAdmin.Checked
If ObjVentas.GetRepVentasPeriodos(FechaI, FechaF, FechaIEjec, FechaFEjec, DdlClientes.SelectedValue.ToEntero, DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero,
DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlTipoComprobante.SelectedValue,
DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario,
@@ -408,11 +414,13 @@ Partial Class RepVentasPeriodo
CargaClientes()
End Sub
Private Sub CargaClientes()
DdlClientes.Items.Clear()
Private Sub CargaClientes()
DdlClientes.ddl.Items.Clear()
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltraParametros($"CveClienteClasificacion = {DdlClienteClasificacion.SelectedValue.ToEntero} OR {DdlClienteClasificacion.SelectedValue.ToEntero} = -1")
DdlClientes.DataBind()
DdlClientes.Items.Insert(0, New ListItem("Todos", "-1"))
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
End Class

View File

@@ -9583,7 +9583,7 @@ Partial Class Ventas
Try
'MANDA CORREO
Dim strURLHOST = String.Format("{0}://{1}:{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port)
Dim Factura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False)
Dim Factura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False, CargaDTDetalle:=False, CargaDatosCliente:=False, CargaDatosRelacionados:=False)
Dim Hilo As New System.Threading.Thread(Sub() GeneraPDFFactura(ChkEnviarFactura.Checked, Factura, UsuarioActual, strURLHOST))
Hilo.Start()
Catch ex As Exception
@@ -15200,7 +15200,7 @@ Partial Class Ventas
End Try
If CveVenta > 0 Then
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False)
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False, CargaDTDetalle:=False, CargaDatosCliente:=False, CargaDatosRelacionados:=False)
End If
LocalSerieFolio = ObjFactura.SerieFolio
@@ -16438,7 +16438,7 @@ Partial Class Ventas
Try
'MANDA CORREO
Dim strURLHOST = String.Format("{0}://{1}:{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port)
Dim Factura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False)
Dim Factura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False, CargaDTDetalle:=False, CargaDatosCliente:=False, CargaDatosRelacionados:=False)
Dim Hilo As New System.Threading.Thread(Sub() GeneraPDFFactura(ChkEnviarFactura.Checked, Factura, UsuarioActual, strURLHOST))
Hilo.Start()
Catch ex As Exception
@@ -23693,7 +23693,7 @@ Partial Class Ventas
End Function
Public Sub EnviarPDFCancelacion(CveVenta As Integer)
Dim FacturaRef As New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa)
Dim FacturaRef As New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, CargaDTDetalle:=False, CargaDatosRelacionados:=False)
If FacturaRef IsNot Nothing Then
Dim ObjetoPDF As Byte() = DescargarPDF(Encripta(String.Format("OP=CAN&CVEVTA={0}", CveVenta)))
@@ -26942,10 +26942,20 @@ Partial Class Ventas
If CveVentaUsado > 0 Then
DivSMU.Visible = True
Dim FacUsado As New Modelos.Factura(UsuarioActual, CveVentaUsado, UsuarioActual.CveEmpresa)
Dim SaldoMaximoUsados As Decimal = FacUsado.DtDetalle.SUM("Total", "EsCargo = True").ToDecimal() + FacUsado.DtDetalle.SUM("ImporteIVA", "EsCargo = True").ToDecimal()
HdnSaldoMaximoUsados.Value = SaldoMaximoUsados.ToString()
LtlSMU.Text = String.Format("{0:N2}", SaldoMaximoUsados)
'Dim FacUsado As New Modelos.Factura(UsuarioActual, CveVentaUsado, UsuarioActual.CveEmpresa, CargaDatosCliente:=False, CargaDatosRelacionados:=False)
Dim DtDetalleUsado As DataTable = Nothing
Using ObjVentas As New ClsVentas
If ObjVentas.GetVentaDetalle(CveVentaUsado) Then
DtDetalleUsado = ObjVentas.DtResultados.Copy()
End If
End Using
If DtDetalleUsado IsNot Nothing Then
Dim SaldoMaximoUsados As Decimal = DtDetalleUsado.SUM("Total", "EsCargo = True").ToDecimal() + DtDetalleUsado.SUM("ImporteIVA", "EsCargo = True").ToDecimal()
HdnSaldoMaximoUsados.Value = SaldoMaximoUsados.ToString()
LtlSMU.Text = String.Format("{0:N2}", SaldoMaximoUsados)
End If
Else
If CargarSoloGarantias Then
Dim SaldoMaximo As Decimal = DtNC.SUMD("Saldo", "TipoRNC = 1 AND EsGarantia = True")
@@ -27062,17 +27072,27 @@ Partial Class Ventas
If CveVentaUsado > 0 Then
DivSMU.Visible = True
Dim FacUsado As New Modelos.Factura(UsuarioActual, CveVentaUsado, UsuarioActual.CveEmpresa)
Dim SaldoMaximoUsados As Decimal = FacUsado.DtDetalle.SUM("Total", "EsCargo = True").ToDecimal() + FacUsado.DtDetalle.SUM("ImporteIVA", "EsCargo = True").ToDecimal()
'Dim FacUsado As New Modelos.Factura(UsuarioActual, CveVentaUsado, UsuarioActual.CveEmpresa)
Dim DtDetalleUsado As DataTable = Nothing
Using ObjVentas As New ClsVentas
If ObjVentas.GetVentaDetalle(CveVentaUsado) Then
DtDetalleUsado = ObjVentas.DtResultados.Copy()
End If
End Using
If SaldoMaximoUsados > 0 Then
HdnSaldoMaximoUsados.Value = SaldoMaximoUsados.ToString()
LtlSMU.Text = String.Format("{0:N2}", SaldoMaximoUsados)
Else
HdnSaldoMaximoUsados.Value = "0"
LtlSMU.Text = "0"
If DtDetalleUsado IsNot Nothing Then
Dim SaldoMaximoUsados As Decimal = DtDetalleUsado.SUM("Total", "EsCargo = True").ToDecimal() + DtDetalleUsado.SUM("ImporteIVA", "EsCargo = True").ToDecimal()
If SaldoMaximoUsados > 0 Then
HdnSaldoMaximoUsados.Value = SaldoMaximoUsados.ToString()
LtlSMU.Text = String.Format("{0:N2}", SaldoMaximoUsados)
Else
HdnSaldoMaximoUsados.Value = "0"
LtlSMU.Text = "0"
End If
End If
Else
If CargaSoloGarantias Then
Dim SaldoMaximo As Decimal = TmpDTRNCDetalle.SUMD("Total", "TipoRNC = 1")
@@ -30196,59 +30216,59 @@ Partial Class Ventas
UpParametros.Update()
End Sub
Private Function AjustarTotalCotizacionFacturada(CveCotizacion As Integer, TotalAjustar As Decimal) As Boolean
Dim ErrorAjuste As Boolean = False
'Private Function AjustarTotalCotizacionFacturada(CveCotizacion As Integer, TotalAjustar As Decimal) As Boolean
' Dim ErrorAjuste As Boolean = False
Dim ObjCotizacion As New Modelos.Factura(UsuarioActual, CveCotizacion, UsuarioActual.CveEmpresa)
' Dim ObjCotizacion As New Modelos.Factura(UsuarioActual, CveCotizacion, UsuarioActual.CveEmpresa)
If ObjCotizacion.CveMoneda = 1 Then
Dim TotalNuevoDocumento As Decimal = TotalAjustar
' If ObjCotizacion.CveMoneda = 1 Then
' Dim TotalNuevoDocumento As Decimal = TotalAjustar
Dim Diferencia As Decimal = (ObjCotizacion.Total - TotalNuevoDocumento)
' Dim Diferencia As Decimal = (ObjCotizacion.Total - TotalNuevoDocumento)
If Diferencia <> 0 Then
'AJUSTAR EN EL IVA
For Each RowNuevoDocumento As DataRow In TmpDT.Rows
Dim CveVentaDetalleCotizacion As Integer = RowNuevoDocumento("CveVentaDetalleCotizacion").ToString().ToEntero()
' If Diferencia <> 0 Then
' 'AJUSTAR EN EL IVA
' For Each RowNuevoDocumento As DataRow In TmpDT.Rows
' Dim CveVentaDetalleCotizacion As Integer = RowNuevoDocumento("CveVentaDetalleCotizacion").ToString().ToEntero()
Dim ImporteIVANuevoDocumento As Decimal = RowNuevoDocumento("ImporteIVA").ToString().ToDecimal()
Dim ImporteIEPSNuevoDocumento As Decimal = RowNuevoDocumento("ImporteIEPS").ToString().ToDecimal()
' Dim ImporteIVANuevoDocumento As Decimal = RowNuevoDocumento("ImporteIVA").ToString().ToDecimal()
' Dim ImporteIEPSNuevoDocumento As Decimal = RowNuevoDocumento("ImporteIEPS").ToString().ToDecimal()
If CveVentaDetalleCotizacion > 0 Then
'AJUSTAR IVA
If ImporteIVANuevoDocumento > 0 Then
Dim ImporteIVACotizacion As Decimal = ObjCotizacion.DtDetalle.FiltroPrimeroValor("ImporteIVA", $"CveVentaDetalle={CveVentaDetalleCotizacion}").ToDecimal
' If CveVentaDetalleCotizacion > 0 Then
' 'AJUSTAR IVA
' If ImporteIVANuevoDocumento > 0 Then
' Dim ImporteIVACotizacion As Decimal = ObjCotizacion.DtDetalle.FiltroPrimeroValor("ImporteIVA", $"CveVentaDetalle={CveVentaDetalleCotizacion}").ToDecimal
If ImporteIVANuevoDocumento <> ImporteIVACotizacion Then
RowNuevoDocumento("ImporteIVA") = ImporteIVACotizacion
End If
End If
' If ImporteIVANuevoDocumento <> ImporteIVACotizacion Then
' RowNuevoDocumento("ImporteIVA") = ImporteIVACotizacion
' End If
' End If
'AJUSTAR IEPS
If ImporteIEPSNuevoDocumento > 0 Then
Dim ImporteIEPSCotizacion As Decimal = ObjCotizacion.DtDetalle.FiltroPrimeroValor("ImporteIEPS", $"CveVentaDetalle={CveVentaDetalleCotizacion}").ToDecimal
' 'AJUSTAR IEPS
' If ImporteIEPSNuevoDocumento > 0 Then
' Dim ImporteIEPSCotizacion As Decimal = ObjCotizacion.DtDetalle.FiltroPrimeroValor("ImporteIEPS", $"CveVentaDetalle={CveVentaDetalleCotizacion}").ToDecimal
If ImporteIEPSNuevoDocumento <> ImporteIEPSCotizacion Then
RowNuevoDocumento("ImporteIEPS") = ImporteIEPSCotizacion
End If
End If
' If ImporteIEPSNuevoDocumento <> ImporteIEPSCotizacion Then
' RowNuevoDocumento("ImporteIEPS") = ImporteIEPSCotizacion
' End If
' End If
End If
Next
End If
' End If
' Next
' End If
CalculaTotalesVenta(RecalculaImpuestosLocales:=False)
' CalculaTotalesVenta(RecalculaImpuestosLocales:=False)
If Math.Abs(ObjCotizacion.Total - TotalAjustar) > 0 OrElse Math.Abs(TxtTotal.Text.ToDecimal - TotalAjustar) > 0 Then
ErrorAjuste = True
End If
' If Math.Abs(ObjCotizacion.Total - TotalAjustar) > 0 OrElse Math.Abs(TxtTotal.Text.ToDecimal - TotalAjustar) > 0 Then
' ErrorAjuste = True
' End If
End If
ObjCotizacion.Dispose()
' End If
' ObjCotizacion.Dispose()
Return Not ErrorAjuste
End Function
' Return Not ErrorAjuste
'End Function
Private Class MVentaDetalleCotizacion
Public Property CveVentaDetalle As Integer
@@ -32135,7 +32155,7 @@ Partial Class Ventas
Dim TerminarCiclo As Boolean = False
For Each Dr As DataRow In TmpDTRNCDetalleSelecciondas.FiltraParametros("", DistinctColumns:={"CveVenta"}).Rows
Dim RemNC As New Modelos.Factura(UsuarioActual, Dr("CveVenta").ToString().ToEntero(), UsuarioActual.CveEmpresa)
Dim RemNC As New Modelos.Factura(UsuarioActual, Dr("CveVenta").ToString().ToEntero(), UsuarioActual.CveEmpresa, CargaDatosCliente:=False, CargaDatosRelacionados:=False)
Dim TotalRNC As Decimal = 0
For Each GvRow As GridViewRow In GvRemisionesNCDetalle.Rows
@@ -32191,7 +32211,7 @@ Partial Class Ventas
For Each GvRow As GridViewRow In GvRemisionesNC.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
If GvRow.FCCheckBox("ChkAplicar").Checked Then
Dim RemNC As New Modelos.Factura(UsuarioActual, GvRow.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa)
Dim RemNC As New Modelos.Factura(UsuarioActual, GvRow.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa, CargaDatosCliente:=False, CargaDatosRelacionados:=False)
RemNC.TotalRemNCAplicado = GvRow.FCTextBox("TxtImporte").Text.ToDecimal()
'MARCA LA VENTA QUE FUE USADA PARA EL FILTRO
RemNC.Num3 = DdlVentaUsado.SelectedValue.ToEntero()
@@ -32255,7 +32275,7 @@ Partial Class Ventas
Dim TerminarCiclo As Boolean = False
For Each Dr As DataRow In TmpDTRNCDetalleSelecciondas.FiltraParametros("", DistinctColumns:={"CveVenta"}).Rows
Dim RemNC As New Modelos.Factura(UsuarioActual, Dr("CveVenta").ToString().ToEntero(), UsuarioActual.CveEmpresa)
Dim RemNC As New Modelos.Factura(UsuarioActual, Dr("CveVenta").ToString().ToEntero(), UsuarioActual.CveEmpresa, CargaDatosCliente:=False, CargaDatosRelacionados:=False)
Dim TotalRNC As Decimal = 0
For Each GvRow As GridViewRow In GvRemisionesNCBonDetalle.Rows
@@ -32311,7 +32331,7 @@ Partial Class Ventas
For Each GvRow As GridViewRow In GvRemisionesNCBon.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
If GvRow.FCCheckBox("ChkAplicar").Checked Then
Dim RemNC As New Modelos.Factura(UsuarioActual, GvRow.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa)
Dim RemNC As New Modelos.Factura(UsuarioActual, GvRow.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa, CargaDatosCliente:=False, CargaDatosRelacionados:=False)
RemNC.TotalRemNCAplicado = GvRow.FCTextBox("TxtImporte").Text.ToDecimal()
RemNC.CveVentaRNCCargo = GvRow.DataKey("CveVentaRNCCargo").ToEntero()
TotalRemNCAplicado += RemNC.TotalRemNCAplicado
@@ -32436,7 +32456,7 @@ Partial Class Ventas
Dim TerminarCiclo As Boolean = False
For Each Dr As DataRow In TmpDTRNCDetalleSelecciondas.FiltraParametros("", DistinctColumns:={"CveVenta"}).Rows
Dim RemNC As New Modelos.Factura(UsuarioActual, Dr("CveVenta").ToString().ToEntero(), UsuarioActual.CveEmpresa)
Dim RemNC As New Modelos.Factura(UsuarioActual, Dr("CveVenta").ToString().ToEntero(), UsuarioActual.CveEmpresa, CargaDatosCliente:=False, CargaDatosRelacionados:=False)
Dim TotalRNC As Decimal = 0
For Each GvRow As GridViewRow In GvDescNCCargosDetalle.Rows
@@ -32507,7 +32527,7 @@ Partial Class Ventas
For Each GvRow As GridViewRow In GvDescNCCargos.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
If GvRow.FCCheckBox("ChkAplicar").Checked Then
Dim RemNC As New Modelos.Factura(UsuarioActual, GvRow.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa)
Dim RemNC As New Modelos.Factura(UsuarioActual, GvRow.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa, CargaDatosCliente:=False, CargaDatosRelacionados:=False)
RemNC.TotalRemNCAplicado = GvRow.FCTextBox("TxtImporte").Text.ToDecimal()
TotalRemNCAplicado += RemNC.TotalRemNCAplicado
@@ -32591,7 +32611,7 @@ Partial Class Ventas
Dim TerminarCiclo As Boolean = False
For Each Dr As DataRow In TmpDTRNCBonificacionDetalleSeleccionadas.FiltraParametros("", DistinctColumns:={"CveVenta"}).Rows
Dim RemNC As New Modelos.Factura(UsuarioActual, Dr("CveVenta").ToString().ToEntero(), UsuarioActual.CveEmpresa)
Dim RemNC As New Modelos.Factura(UsuarioActual, Dr("CveVenta").ToString().ToEntero(), UsuarioActual.CveEmpresa, CargaDatosCliente:=False, CargaDatosRelacionados:=False)
Dim TotalRNC As Decimal = 0
For Each GvRow As GridViewRow In GvDescNCBonDetalle.Rows
@@ -32647,7 +32667,7 @@ Partial Class Ventas
For Each GvRow As GridViewRow In GvDescNCBonificaciones.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
If GvRow.FCCheckBox("ChkAplicar").Checked Then
Dim RemNC As New Modelos.Factura(UsuarioActual, GvRow.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa)
Dim RemNC As New Modelos.Factura(UsuarioActual, GvRow.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa, CargaDatosCliente:=False, CargaDatosRelacionados:=False)
RemNC.TotalRemNCAplicado = GvRow.FCTextBox("TxtImporte").Text.ToDecimal()
RemNC.CveVentaRNCCargo = GvRow.DataKey("CveVentaRNCCargo").ToEntero()
TotalRemNCAplicado += RemNC.TotalRemNCAplicado
@@ -32669,7 +32689,7 @@ Partial Class Ventas
For Each GvRow As GridViewRow In GvDescNCBonificaciones.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
If GvRow.FCCheckBox("ChkAplicar").Checked Then
Dim RemNC As New Modelos.Factura(UsuarioActual, GvRow.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa)
Dim RemNC As New Modelos.Factura(UsuarioActual, GvRow.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa, CargaDatosCliente:=False, CargaDatosRelacionados:=False)
RemNC.TotalRemNCAplicado = GvRow.FCTextBox("TxtImporte").Text.ToDecimal()
RemNC.CveVentaRNCCargo = GvRow.DataKey("CveVentaRNCCargo").ToEntero()
TotalRemNCAplicado += RemNC.TotalRemNCAplicado
@@ -33915,7 +33935,7 @@ Partial Class Ventas
For Each GvRow As GridViewRow In GvRNCDevoluciones.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
If GvRow.FCCheckBox("ChkAplicar").Checked Then
Dim RemNC As New Modelos.Factura(UsuarioActual, GvRow.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa)
Dim RemNC As New Modelos.Factura(UsuarioActual, GvRow.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa, CargaDatosCliente:=False, CargaDatosRelacionados:=False)
RemNC.TotalRemNCAplicado = GvRow.FCTextBox("TxtImporte").Text.ToDecimal()
TotalRemNCAplicado += RemNC.TotalRemNCAplicado