Merge branch 'master' of http://agonzalez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -2662,12 +2662,17 @@ Partial Class Ventas_ClientesAbonar
|
||||
If tCveMoneda = 2 Then
|
||||
Dim ImporteFluctuacion As Decimal = 0
|
||||
ImporteFluctuacion = Saldo * (TCPago - TCVenta)
|
||||
|
||||
If CveSubProyecto <= 0 Then
|
||||
MsgError = $"No se pudo obtener el sub proyecto de la venta {gr.DataKey("SerieFolio").ToString}"
|
||||
End If
|
||||
|
||||
If TCPago > TCVenta Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
Else
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -277,7 +277,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
private Modelos.Factura.MCancelacionVentaMensaje CancelarDocumento(int CveVenta, int CveEstatus, int CveCliente, string Folio, string FolioFiscal, string CancelacionAcuse, DateTime CancelacionFecha, string TipoComprobante, double Total, int CvePACCancelacion, bool EsRefacturacion = false)
|
||||
{
|
||||
Modelos.Factura.MCancelacionVentaMensaje retorno = null;
|
||||
var factura = new Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa);
|
||||
var factura = new Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:true);
|
||||
if (EsRefacturacion)
|
||||
{
|
||||
retorno = factura.CancelarPorRefacturacion();
|
||||
|
||||
@@ -159,6 +159,28 @@
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<asp:Panel ID="pnlOrden" Visible="false" runat="server" CssClass="row">
|
||||
<label class="col-md-1 truncate">Orden:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlOrden" runat="server" CssClass="select2me" Width="100%">
|
||||
<asp:ListItem Text="Seleccione" Value="-1" Selected="True" />
|
||||
<asp:ListItem Text="Marca,Modelo,Rin,Medida de Barrenación" Value="1" />
|
||||
<asp:ListItem Text="Familia,Marca,Rin,Medida de Barrenación" Value="2" />
|
||||
<asp:ListItem Text="Familia,Linea,Rin,Medida de Barrenación" Value="3" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<%--<div class="col-md-3">
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate">Marca:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:ListBox ID="DdlMarca" runat="server" DataTextField="Marca" DataValueField="CveMarca" data-text="Todos" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%; height:50px !important;">
|
||||
<asp:ListItem Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:ListBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>--%>
|
||||
</asp:Panel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -21,6 +21,20 @@ Partial Class Ventas_RepPS
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
pnlOrden.Visible = False
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
pnlOrden.Visible = True
|
||||
DdlOrden.SelectedValue = "2"
|
||||
'Using ObjPS As New ClsProductosServicios
|
||||
' If ObjPS.GetMarcas(UsuarioActual.CveEmpresa) Then
|
||||
' DdlMarca.DataSource = ObjPS.DtResultados.Copy()
|
||||
' End If
|
||||
'End Using
|
||||
'DdlMarca.DataBind()
|
||||
'DdlMarca.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
|
||||
CargaDatosIniciales()
|
||||
CargaCombos()
|
||||
CargaDatos()
|
||||
@@ -69,6 +83,7 @@ Partial Class Ventas_RepPS
|
||||
End Sub
|
||||
|
||||
Private Sub CargaTipoCentroCosto()
|
||||
Dim index As Integer = 17
|
||||
|
||||
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then
|
||||
DdlSubProyecto.Items.Clear()
|
||||
@@ -88,13 +103,19 @@ Partial Class Ventas_RepPS
|
||||
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 3 Then
|
||||
DdlGrupo.Items.Insert(0, New ListItem("Proyecto", "1"))
|
||||
DdlGrupo.Items.Insert(1, New ListItem("SubProyecto", "2"))
|
||||
DdlGrupo.Items.Insert(17, New ListItem("SubProyecto Ejec.", "19"))
|
||||
If DdlGrupo.Items.Count < 17 Then
|
||||
index = DdlGrupo.Items.Count
|
||||
End If
|
||||
DdlGrupo.Items.Insert(index, New ListItem("SubProyecto Ejec.", "19"))
|
||||
DdlGrupo.DataBind()
|
||||
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then
|
||||
LblSubProyecto.InnerText = "Proyecto:"
|
||||
DdlGrupo.Items.Insert(0, New ListItem("Proyecto", "1"))
|
||||
DdlGrupo.Items.Insert(1, New ListItem("SubProyecto", "2"))
|
||||
DdlGrupo.Items.Insert(17, New ListItem("SubProyecto Ejec.", "19"))
|
||||
If DdlGrupo.Items.Count < 17 Then
|
||||
index = DdlGrupo.Items.Count
|
||||
End If
|
||||
DdlGrupo.Items.Insert(index, New ListItem("SubProyecto Ejec.", "19"))
|
||||
DdlGrupo.DataBind()
|
||||
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then
|
||||
LblSubProyecto.InnerText = "Sucursal:"
|
||||
@@ -117,7 +138,7 @@ Partial Class Ventas_RepPS
|
||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
|
||||
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
If ObjVentas.GetRepPSEcono(CveSubProyecto, CvePS, FechaI, FechaF, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=Grupo, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico, Clasificacion:=Clasificacion, Linea:=Linea, Marca:=Marca) Then
|
||||
If ObjVentas.GetRepPSEcono(CveSubProyecto, CvePS, FechaI, FechaF, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=Grupo, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico, Clasificacion:=Clasificacion, Linea:=Linea, Marca:=Marca, orden:=DdlOrden.SelectedValue.ToEntero()) Then
|
||||
DtReporte = ObjVentas.DtResultados.Copy()
|
||||
GvDatos.DataSource = DtReporte
|
||||
Else
|
||||
|
||||
Reference in New Issue
Block a user