From 503d21f3c29637a83182b4196a277c926fdd9287 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 4 Feb 2020 09:01:56 -0700 Subject: [PATCH 1/3] Inventario en programacion de recursos --- Bancos/RepProgramarRecursos.aspx | 1160 ++++++++++++++------------- Bancos/RepProgramarRecursos.aspx.vb | 48 +- 2 files changed, 622 insertions(+), 586 deletions(-) diff --git a/Bancos/RepProgramarRecursos.aspx b/Bancos/RepProgramarRecursos.aspx index 4867d2c07..e7232caa1 100644 --- a/Bancos/RepProgramarRecursos.aspx +++ b/Bancos/RepProgramarRecursos.aspx @@ -1,391 +1,392 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepProgramarRecursos.aspx.vb" Inherits="Bancos_RepProgramarRecursos" %> - -<%@ Import Namespace="Extensiones" %> - - - - - - - -
  • - PDF -
  • - -
  • - Excel -
  • - -
    - - Programación de Recursos - - - - - - - -
    -
    -
    - - "> - -
    -
    -
    -
    Proveedor:
    -
    - +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepProgramarRecursos.aspx.vb" Inherits="Bancos_RepProgramarRecursos" %> + +<%@ Import Namespace="Extensiones" %> + + + + + + + +
  • + PDF +
  • + +
  • + Excel +
  • + +
    + + Programación de Recursos + + + + + + + +
    +
    +
    + + "> + +
    +
    +
    +
    Proveedor:
    +
    + <%-- - --%> -
    -
    Clasificaciones:
    -
    - - - - -
    - +
    Clasificaciones:
    +
    + + + + +
    + -
    Aplica NC:
    -
    - - - - - -<%-- --%> -
    - -
    - - -
    - - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    -
    > -
    -
    Tipo Prov.:
    -
    - - - - - - -
    -
    F.I.:
    -
    -
    - - - - - - - - - - -
    -
    -
    F.F.:
    -
    -
    - - - - - - - - - - -
    -
    - - -
    -
    -
    Moneda:
    -
    - - - -
    -
    F.I.V.:
    -
    -
    - - - - - - - - - - -
    -
    -
    F.F.V.:
    -
    -
    - - - - - - - - - - -
    -
    -
    -
    -
    Registró:
    -
    - - -
    -
    Responsable:
    -
    - - - -
    -
    -
    - - - - -
    -
    -
    -
    Estatus:
    -
    - - - -
    -
    Proyecto:
    -
    - - - -
    -
    SubProyecto:
    -
    - - - - - - - -
    -
    Comprobación:
    -
    - - - - - -
    -
    -
    -
    -
    -
    -
    -
    - - - - - -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    - - - - -
    -
    -
    -
    - - Total -
    -
    Pesos
    -
    - -
    -
    Dólares
    -
    - -
    -
    T.C.
    -
    - -
    -
    Total
    -
    - -
    - -
    - -
    -
    - - - -
    -
    - - Programación -
    -
    - -
    -
    -
    -
    - -
    - -
    - -
    - -
    - -
    - -
    - -
    - -
    - - - - - -
    -
    - -
    -
    -
    -
    - - - - - - - <%# Eval("RazonSocial")%> - - -
    -  /  -
    -
    -
    + +
    +
    Aplica NC:
    +
    + + + + + + <%-- --%> +
    + +
    + + +
    + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    > +
    +
    Tipo Prov.:
    +
    + + + + + + +
    +
    F.I.:
    +
    +
    + + + + + + + + + + +
    +
    +
    F.F.:
    +
    +
    + + + + + + + + + + +
    +
    + + +
    +
    +
    Moneda:
    +
    + + + +
    +
    F.I.V.:
    +
    +
    + + + + + + + + + + +
    +
    +
    F.F.V.:
    +
    +
    + + + + + + + + + + +
    +
    +
    +
    +
    Registró:
    +
    + + +
    +
    Responsable:
    +
    + + + +
    +
    +
    + + + + +
    +
    +
    +
    Estatus:
    +
    + + + +
    +
    Proyecto:
    +
    + + + +
    +
    SubProyecto:
    +
    + + + + + + + +
    +
    Comprobación:
    +
    + + + + + +
    +
    +
    +
    + + + + + + + + + +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    + + + + +
    +
    +
    +
    + + Total +
    +
    Pesos
    +
    + +
    +
    Dólares
    +
    + +
    +
    T.C.
    +
    + +
    +
    Total
    +
    + +
    + +
    + +
    +
    + + + +
    +
    + + Programación +
    +
    + +
    +
    +
    +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + + + + + +
    +
    + +
    +
    +
    +
    + + + + + + + <%# Eval("RazonSocial")%> + + +
    +  /  +
    +
    +
    <%--
    @@ -402,158 +403,169 @@ - --%> - - - -
    -   -
    -
    - - - -
    - + --%> + + + +
    +   +
    +
    + + + +
    + <%-- Aplica NC - --%> - - - -
    -   -
    -
    - - - -
    - - - -
    -   -
    -
    - - - -
    - - -
    -   -
    -
    - - - -
    - - -
    -   -
    -
    - - - -
    - - -
    -   -
    -
    - - - - - -
    - - -
    -   -
    -
    - - - - -
    - - -
    -   -
    -
    - - - - - -
    - - -
    + --%> + + + +
    +   +
    +
    + + + +
    + + + +
    +   +
    +
    + + + +
    + + +
    +   +
    +
    + + + +
    + + +
    +   +
    +
    + + + +
    + +<%-- +
    + +
    +
    --%> + + + +
    + + +
    +   +
    +
    + + + + + +
    + + +
    +   +
    +
    + + + + +
    + + +
    +   +
    +
    + + + + + +
    + + +
    Sel - - - - - - - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
    + + + +
    +
    +
    +
    +
    +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + + + - + + - - + + + diff --git a/Bancos/RepProgramarRecursos.aspx.vb b/Bancos/RepProgramarRecursos.aspx.vb index af93c7aca..5c2cd3230 100644 --- a/Bancos/RepProgramarRecursos.aspx.vb +++ b/Bancos/RepProgramarRecursos.aspx.vb @@ -342,7 +342,9 @@ Partial Class Bancos_RepProgramarRecursos LblPesosTotal.Text = String.Format("$ {0}", DtDatos.SUM("SaldoPesos", "CveCompra > 0").ToString.FormatoNumero()) LblAcumulado.Text = String.Format("$ {0}", DtDatos.MAX("TotalProgramado", "CveCompra > 0").ToString.FormatoNumero()) - End If + End If + + Gv.Columns(6).Visible = (UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 Or UsuarioActual.Empresa.Funcionalidad(134).ToEntero > 0) Mov.Dispose() CargaGrid(Orden) @@ -434,19 +436,41 @@ Partial Class Bancos_RepProgramarRecursos e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format(" $get('{0}').readOnly = !this.checked;", e.Row.FCTextBox("TxtS").ClientID)) 'cuando estan programado, el saldo es el importe programado, para saber el total que se limite el rango, debe de ser el saldo real, saldo + importeprogramado e.Row.FCTextBox("TxtS").Attributes.Add("onkeyup", String.Format("FnMonedaRango(this,{0});", e.Row.DBCampo("Original").ToDouble + e.Row.DBCampo("Abonado").ToDouble)) + End If + + + 'If UsuarioActual.Empresa.GralSoloProyecto Then ' solo muestar el subproyecto + ' e.Row.FCDropDownList("DdlCuenta").Visible = True + ' e.Row.FCDropDownList("DdlCuenta").DataSource = DtCuentas + ' e.Row.FCDropDownList("DdlCuenta").DataBind() + + ' e.Row.FCDropDownList("DdlMov").Visible = True + ' e.Row.FCDropDownList("DdlMov").DataSource = DtTipoTransaccion + ' e.Row.FCDropDownList("DdlMov").DataBind() + + 'End If + + If UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 Or UsuarioActual.Empresa.Funcionalidad(134).ToEntero > 0 Then + Dim Str As New StringBuilder + Str.AppendFormat("Importe Almacen: ${0} ({1}%)
    ", e.Row.DBCampo("ImporteAlmacen").FormatoNumero, e.Row.DBCampo("ImporteAlmacenPorcentaje")) + If e.Row.DBCampo("ImporteServicios").ToDouble > 0 Then Str.AppendFormat("Importe Servicios: ${0} ({1}%)
    ", e.Row.DBCampo("ImporteServicios").FormatoNumero, e.Row.DBCampo("ImporteServiciosPorcentaje")) + If e.Row.DBCampo("ImporteDevolucion").ToDouble > 0 Then Str.AppendFormat("Importe Devuelto: ${0} ({1}%)
    ", e.Row.DBCampo("ImporteDevolucion").FormatoNumero, e.Row.DBCampo("ImporteDevolucionPorcentaje")) + Str.AppendFormat(" Importes SIN IVA") + + e.Row.FCLabel("LbEstatusInv").Attributes.Add("title", Str.ToString) + Select Case e.Row.DBCampo("EstatusInventario").ToEntero + Case 1 + e.Row.FCLabel("LbEstatusInv").Text = "" + e.Row.FCLabel("LbEstatusInv").ForeColor = Drawing.Color.Red + Case 2 + e.Row.FCLabel("LbEstatusInv").Text = "" + e.Row.FCLabel("LbEstatusInv").ForeColor = Drawing.Color.DarkOrange + Case 3 + e.Row.FCLabel("LbEstatusInv").Text = "" + e.Row.FCLabel("LbEstatusInv").ForeColor = Drawing.Color.Green + End Select End If - - 'If UsuarioActual.Empresa.GralSoloProyecto Then ' solo muestar el subproyecto - ' e.Row.FCDropDownList("DdlCuenta").Visible = True - ' e.Row.FCDropDownList("DdlCuenta").DataSource = DtCuentas - ' e.Row.FCDropDownList("DdlCuenta").DataBind() - - ' e.Row.FCDropDownList("DdlMov").Visible = True - ' e.Row.FCDropDownList("DdlMov").DataSource = DtTipoTransaccion - ' e.Row.FCDropDownList("DdlMov").DataBind() - - 'End If End If If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(1).ForeColor = Drawing.Color.Red From f4f49948829b0267fb91eb51f4084ac7a0cef7b6 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 4 Feb 2020 09:02:53 -0700 Subject: [PATCH 2/3] mensaje de error al no tener NC --- Ventas/ClientesAbonar.aspx.vb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index 99e1f03d7..4b8a485f2 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -1585,11 +1585,13 @@ Partial Class Ventas_ClientesAbonar If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then If MsgError = "" Then - Dim Resp = GenerarNC(ObjIE.IniciaTransacSQL(), ObjConta, ListaFacturasGenerarNC) - If Resp.CveVenta > 0 Then - NCGeneradas.Add(Resp) - Else - MsgError = "No se pudo generar la nota de credito" + If ListaFacturasGenerarNC.Count > 0 Then + Dim Resp = GenerarNC(ObjIE.IniciaTransacSQL(), ObjConta, ListaFacturasGenerarNC) + If Resp.CveVenta > 0 Then + NCGeneradas.Add(Resp) + Else + MsgError = "No se pudo generar la nota de credito" + End If End If End If End If @@ -1911,7 +1913,7 @@ Partial Class Ventas_ClientesAbonar ObjFacturaDevolucion.DtVentasNC = DtVentasNC ObjFacturaDevolucion.GenerarPDFFactura = True - Dim Resp = ObjFacturaDevolucion.EmitirFactura(False, Trasac:=Trasac, ObjContPaqTransac:=ObjConta) + Dim Resp = ObjFacturaDevolucion.EmitirFactura(False, Transac:=Trasac, ObjContPaqTransac:=ObjConta) Return Resp End Function From b9731e598c1074dd0e203dfb0c622e7d20aebc9d Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 4 Feb 2020 09:03:13 -0700 Subject: [PATCH 3/3] --- Ventas/PV.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index 1cb6a40b2..83b8cd235 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -5323,7 +5323,7 @@ Partial Class PV TxtImporteAjuste.ToolTip = $"La diferencia de ajuste fue: {(TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble).FormatoNumero()}. La diferencia de tamaños fue: {(CargoVendido - CargoGarantia).FormatoNumero}." TxtImporteAjuste.Text = ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia)).FormatoNumero - TxtPagarCliente.Text = ImportePagarCliente.FormatoNumero + 'TxtPagarCliente.Text = ImportePagarCliente.FormatoNumero Else Alert("El producto no tiene ajuste en ese periodo", TipoMensaje.MsgAdvertencia) 'cuando no está registrada, no da ajuste