This commit is contained in:
@@ -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