This commit is contained in:
2023-10-19 13:16:24 -07:00
16 changed files with 117 additions and 70 deletions

View File

@@ -233,6 +233,7 @@
<Columns>
<asp:HyperLinkField ItemStyle-HorizontalAlign="Left" Target="_blank" HeaderText="Grupo" DataTextField="GPO" DataNavigateUrlFields="FechaI,FechaF,CveSubProyecto,CveCliente,CveVendedor,Grupo,GPO,CvePS,CveClasificacion,CveMarca,CveCategoria" DataNavigateUrlFormatString="RepVentasUtilidad.aspx?FechaI={0}&FechaF={1}&CveSubProyecto={2}&CveCliente={3}&CveVendedor={4}&Gpo={5}&CveGpo={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}&CveCategoria={10}" />
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Ventas" DataField="Ventas" DataFormatString="{0:N2}" />
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="%" DataField="ProcentajeVentas" DataFormatString="{0:N2}" ItemStyle-Width="30px" />
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Descuento" DataField="Descuento" DataFormatString="{0:N2}" />
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Bonificación" DataField="Bonificacion" DataFormatString="{0:N2}" />
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Costo" DataField="Costo" DataFormatString="{0:N2}" />

View File

@@ -252,7 +252,7 @@ Partial Class Ventas_RepVentasUtilidadPadre
e.Row.DBCampo("Grupo"), e.Row.DBCampo("GPO"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CveMarca"), e.Row.DBCampo("CveCategoria"))
e.Row.Cells(0).Text = String.Format("<a class=""{0}"" href=""{1}"">{2}</a>", Css, Liga, e.Row.Cells(0).Text)
Else
e.Row.Cells(9).BackColor = Drawing.Color.LightGray
e.Row.Cells(10).BackColor = Drawing.Color.LightGray
End If

View File

@@ -4620,7 +4620,7 @@ Partial Class Ventas
For Each Dr As DataRow In TmpDTNCVinculadas.Rows
If Dr("CveConceptoContable").ToString().ToEntero() = 91 Then
CargaNCDT(Dr("CveVenta").ToString().ToEntero(), Dr("Importe").ToString().ToDecimal, Dr("FolioFiscal").ToString(), TC:=Dr("TipoCambio").ToString().ToDecimal)
CargaNCDT(Dr("CveVenta").ToString().ToEntero(), DbRowVenta("TipoDocto").ToString(), Dr("Importe").ToString().ToDecimal, Dr("FolioFiscal").ToString(), TC:=Dr("TipoCambio").ToString().ToDecimal)
End If
Next
@@ -13106,8 +13106,6 @@ Partial Class Ventas
End If
End If
Next
'LO LIMPIA PARA QUE NO VUELVA A APLICAR
Me.AplicaRelacionManual = False
End If
'SI SE SELECCIONO UNA FACTURA PARA DEVOLUCION DE EFECTIVO DEBE ASOCIARLA A LA NOTA DE CREDITO
@@ -13155,7 +13153,7 @@ Partial Class Ventas
If DtVentasNC Is Nothing Then
InicializaDTVentasNC()
End If
CargaNCDT(factura.CveVentaPadre, factura.Total, NuevaFactura:=NuevaFactura, ObjVentas:=ObjVentas)
CargaNCDT(factura.CveVentaPadre, DdlTipoComprobante.SelectedValue, factura.Total, NuevaFactura:=NuevaFactura, ObjVentas:=ObjVentas)
End If
'Se agregan los PS
@@ -17230,9 +17228,12 @@ Partial Class Ventas
If Not FacturarDocumentoNuevo Then
If Not CveEmpresaCRM > 0 Then
BtnCrearApartirDe.Enabled = EstatusCliente
BtnEmitirImprimir.Visible = EstatusCliente
TrVistaPrevia.Visible = EstatusCliente
'SI ES UNA REMISION EXISTENTE, NO MOSTRAR LOS BOTONES
If Not (CveVenta > 0 AndAlso DdlTipoComprobante.SelectedValue = "Rem") Then
BtnCrearApartirDe.Enabled = EstatusCliente
BtnEmitirImprimir.Visible = EstatusCliente
TrVistaPrevia.Visible = EstatusCliente
End If
Else
If TipoDoctoConsulta.Contiene("Ing", "Egs", "Ant", "Dev") Then
BtnCrearApartirDe.Enabled = EstatusCliente
@@ -27558,7 +27559,7 @@ Partial Class Ventas
DtImpuestos.Merge(CargaDtImpuestosNC(Gvr.DataKey("CveVenta").ToString().ToEntero(), Gvr.FCTextBox("TxtImporte").Text.ToString().ToDecimal, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero()), True, MissingSchemaAction.Ignore)
'CARGA FACTURA A LA CUAL SE APLICA LA NC
AcumuladoNC += Gvr.FCTextBox("TxtImporte").Text.ToString().ToDecimal
CargaNCDT(Gvr.DataKey("CveVenta").ToString().ToEntero(), Gvr.FCTextBox("TxtImporte").Text.ToString().ToDecimal)
CargaNCDT(Gvr.DataKey("CveVenta").ToString().ToEntero(), DdlTipoComprobante.SelectedValue, Gvr.FCTextBox("TxtImporte").Text.ToString().ToDecimal)
If UsuarioActual.CveEmpresa = 140 AndAlso NumVentasAplicar = 1 Then
DdlMetodoPago33.Enabled = True
DdlMetodoPago33.SelectedValueExist(Gvr.DataKey("CveMetodoPago33").ToString())
@@ -27824,7 +27825,7 @@ Partial Class Ventas
If Not AplicaNCMasiva Then
Dim TT As Decimal = TxtNCImporte.Text.ToDecimal
If TT > TxtTotal.Text.ToDecimal Then TT = TxtTotal.Text.ToDecimal
CargaNCDT(CveVenta, TT)
CargaNCDT(CveVenta, DdlTipoComprobante.SelectedValue, TT)
End If
'verifica el tipo de cambio que se actualice
@@ -28740,8 +28741,8 @@ Partial Class Ventas
DtVentasNC.Columns.Add(New DataColumn With {.ColumnName = "Folio", .DataType = GetType(String), .DefaultValue = ""})
End Sub
Private Sub CargaNCDT(pCveVenta As Integer, Importe As Decimal, Optional FolioFiscal As String = "", Optional NuevaFactura As Integer = -1, Optional ByRef ObjVentas As ClsVentas = Nothing, Optional TC As Decimal = 1)
If (pCveVenta > 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Egs")) OrElse (pCveVenta > 0 AndAlso NuevaFactura = 1) Then
Private Sub CargaNCDT(pCveVenta As Integer, TipoDocumento As String, Importe As Decimal, Optional FolioFiscal As String = "", Optional NuevaFactura As Integer = -1, Optional ByRef ObjVentas As ClsVentas = Nothing, Optional TC As Decimal = 1)
If (pCveVenta > 0 AndAlso TipoDocumento.Contiene("Egs")) OrElse (pCveVenta > 0 AndAlso NuevaFactura = 1) Then
Dim CveEstatusFacturaNC As Integer = -1
Dim TCCambioValuacion As Decimal = 1
Dim Folio As String = ""