Example #1
0
 public ExpenseAddForm(Form parent, ECategoriaGasto categoria)
     : base(-1, parent, categoria)
 {
     InitializeComponent();
     SetFormData();
     _mf_type = ManagerFormType.MFAdd;
 }
Example #2
0
        public static ExpenseList GetByPagoAndPendientesList(ECategoriaGasto categoria, PaymentInfo pago, bool childs)
        {
            ExpenseList byPago     = GetByPagoList(pago, childs);
            ExpenseList pendientes = GetPendientesList(categoria, childs);

            ExpenseList list = new ExpenseList();

            list.IsReadOnly = false;

            foreach (ExpenseInfo item in byPago)
            {
                list.AddItem(item);
            }

            foreach (ExpenseInfo item in pendientes)
            {
                if (list.GetItem(item.Oid) == null)
                {
                    list.AddItem(item);
                }
            }

            list.IsReadOnly = true;

            return(list);
        }
Example #3
0
        public Expense NewItem(Expedient parent, InputInvoiceInfo fac, ECategoriaGasto tipo)
        {
            Expense item = Expense.NewChild(parent, fac, tipo);

            this.AddItem(item);
            return(item);
        }
Example #4
0
        public Expense NewItem(PayrollBatch parent, ECategoriaGasto tipo)
        {
            Expense item = Expense.NewChild(parent, tipo);

            SetNextCode(item);
            this.AddItem(item);
            return(item);
        }
        public ExpenseSelectForm(Form parent, ECategoriaGasto categoria, ExpenseList list)
            : base(true, parent, categoria, list)
        {
            InitializeComponent();
            _view_mode = molView.Select;

            _action_result = DialogResult.Cancel;
        }
Example #6
0
        public static ExpenseList GetPendientesNominaList(ECategoriaGasto categoria, DateTime from, DateTime till, bool childs)
        {
            QueryConditions conditions = new QueryConditions
            {
                CategoriaGasto = categoria,
                FechaAuxIni    = from,
                FechaAuxFin    = till,
            };

            return(GetList(SELECT_PENDIENTES_NOMINAS(conditions), childs));
        }
Example #7
0
        public static ExpenseList GetPendientesLiquidacionList(ECategoriaGasto categoria, DateTime dueDateFrom, DateTime dueDateTill, bool childs)
        {
            QueryConditions conditions = new QueryConditions
            {
                CategoriaGasto = categoria,
                FechaAuxIni    = dueDateFrom,
                FechaAuxFin    = dueDateTill,
            };

            return(GetList(Expense.SELECT_PENDIENTES_LIQUIDACION(conditions, false), childs));
        }
Example #8
0
        public static ExpenseList GetList(ECategoriaGasto categoria, DateTime from, DateTime till, bool childs)
        {
            QueryConditions conditions = new QueryConditions
            {
                CategoriaGasto = categoria,
                FechaIni       = from,
                FechaFin       = till,
            };

            return(GetList(conditions, childs));
        }
Example #9
0
        public ExpenseInfo GetItemByExpediente(long oid, ETipoAcreedor tipo, ECategoriaGasto categoria)
        {
            foreach (ExpenseInfo item in this)
            {
                if ((item.OidExpediente == oid) && (item.ETipoAcreedor == tipo) && (item.ECategoriaGasto == categoria))
                {
                    return(item);
                }
            }

            return(null);
        }
Example #10
0
        public static ExpenseList GetPendientesList(ECategoriaGasto categoria, PaymentInfo payment, DateTime from, DateTime till, bool childs)
        {
            QueryConditions conditions = new QueryConditions
            {
                CategoriaGasto = categoria,
                Payment        = payment,
                FechaAuxIni    = from,
                FechaAuxFin    = till,
            };

            return(GetPendientesList(conditions, childs));
        }
Example #11
0
        public static Expenses GetPendientesList(ECategoriaGasto categoria, Payment pago, DateTime f_ini, DateTime f_fin, bool childs)
        {
            QueryConditions conditions = new QueryConditions
            {
                CategoriaGasto = categoria,
                Payment        = (pago != null) ? pago.GetInfo(false) : null,
                FechaIni       = f_ini,
                FechaFin       = f_fin,
            };

            return(GetPendientesList(conditions, childs));
        }
Example #12
0
        public Expense GetItemByFactura(ETipoAcreedor tipo_acreedor, ECategoriaGasto tipo)
        {
            foreach (Expense item in this)
            {
                if ((item.ECategoriaGasto == tipo) && (item.ETipoAcreedor == tipo_acreedor))
                {
                    return(item);
                }
            }

            return(null);
        }
Example #13
0
        public List <Expense> GetSubList(ECategoriaGasto tipo)
        {
            List <Expense> list = new List <Expense>();

            foreach (Expense item in this)
            {
                if (item.ECategoriaGasto == tipo)
                {
                    list.Add(item);
                }
            }

            return(list);
        }
Example #14
0
        public List <ExpenseInfo> GetSubListInfoByTipo(ECategoriaGasto tipo)
        {
            List <ExpenseInfo> list = new List <ExpenseInfo>();

            foreach (Expense item in this)
            {
                if (item.ECategoriaGasto == tipo)
                {
                    list.Add(item.GetInfo());
                }
            }

            return(list);
        }
Example #15
0
        protected override void GetFormSourceData(object[] parameters)
        {
            if (parameters[0] == null)
            {
                ECategoriaGasto categoria = (ECategoriaGasto)parameters[1];

                _entity = Expense.New();
                _entity.BeginEdit();
                _entity.ECategoriaGasto = (categoria != ECategoriaGasto.GeneralesExpediente) ? categoria : ECategoriaGasto.Otros;
            }
            else
            {
                _entity = (Expense)parameters[0];
                _entity.BeginEdit();
            }
        }
Example #16
0
        public static ETipoPago ToETipoPago(ECategoriaGasto source)
        {
            switch (source)
            {
            case ECategoriaGasto.Todos: return(ETipoPago.Todos);

            case ECategoriaGasto.Nomina: return(ETipoPago.Nomina);

            case ECategoriaGasto.GeneralesExpediente:
            case ECategoriaGasto.Stock:
            case ECategoriaGasto.Expediente:
            case ECategoriaGasto.OtrosExpediente:
                return(ETipoPago.Factura);

            default: return(ETipoPago.Gasto);
            }
        }
        private void CheckGasto(ECategoriaGasto category, ETipoAcreedor providerType, ExpedientInfo expedient, ExpenseList list, List <GastoPrint> pList)
        {
            ExpenseInfo info = list.GetItemByExpediente(expedient.Oid, providerType, category);

            if (info == null)
            {
                Expense item = Expense.New();
                item.Codigo           = "---";
                item.OidExpediente    = expedient.Oid;
                item.CodigoExpediente = expedient.Codigo;
                item.ECategoriaGasto  = ECategoriaGasto.GeneralesExpediente;
                item.Descripcion      = moleQule.Common.Structs.EnumText <ETipoAcreedor> .GetLabel(providerType);

                item.ETipoAcreedor = providerType;
                pList.Add(GastoPrint.New(item.GetInfo(false)));
            }
        }
Example #18
0
        public ExpenseMngForm(bool is_modal, Form parent, ECategoriaGasto categoria, ExpenseList list)
            : base(is_modal, parent, list)
        {
            InitializeComponent();

            SetView(molView.Normal);

            // Parche para poder abrir el formulario en modo diseƱo y no perder la configuracion de columnas
            DatosLocal_BS    = Datos;
            Tabla.DataSource = DatosLocal_BS;

            SetMainDataGridView(Tabla);
            Datos.DataSource = ExpenseList.NewList().GetSortedList();
            SortProperty     = Fecha.DataPropertyName;
            SortDirection    = ListSortDirection.Descending;

            _categoria = categoria;

            Text = String.Format(Resources.Labels.GASTOS_TITLE, moleQule.Store.Structs.EnumText <ECategoriaGasto> .GetLabel(_categoria));
        }
Example #19
0
        public static Expenses GetByPagoAndPendientesList(ECategoriaGasto categoria, Payment pago, bool childs)
        {
            Expenses byPago     = GetByPagoList(pago, childs);
            Expenses pendientes = GetPendientesList(categoria, childs);

            Expenses list = Expenses.NewList();

            foreach (Expense item in byPago)
            {
                list.AddItem(item);
            }

            foreach (Expense item in pendientes)
            {
                if (list.GetItem(item.Oid) == null)
                {
                    list.AddItem(item);
                }
            }

            return(list);
        }
Example #20
0
        public Expense GetItemByFactura(long oid_factura, ECategoriaGasto tipo)
        {
            foreach (Expense item in this)
            {
                if (tipo == ECategoriaGasto.NoStock)
                {
                    if ((item.OidFactura == oid_factura) && (item.ECategoriaGasto != ECategoriaGasto.Stock))
                    {
                        return(item);
                    }
                }
                else
                {
                    if ((item.OidFactura == oid_factura) && (item.ECategoriaGasto == tipo))
                    {
                        return(item);
                    }
                }
            }

            return(null);
        }
Example #21
0
 public static ExpenseList GetList(ECategoriaGasto categoria, bool childs)
 {
     return(GetList(categoria, DateTime.MinValue, DateTime.MaxValue, childs));
 }
Example #22
0
 public ExpenseUIForm(long oid, Form parent, ECategoriaGasto categoria)
     : this(oid, new object[2] {
     null, categoria
 }, true, parent)
 {
 }
Example #23
0
 public ExpenseMngForm(bool is_modal, Form parent, ECategoriaGasto categoria)
     : this(is_modal, parent, categoria, null)
 {
 }
Example #24
0
 public ExpenseMngForm(Form parent, ECategoriaGasto categoria)
     : this(false, parent, categoria)
 {
 }
Example #25
0
 public ExpenseMngForm(ECategoriaGasto categoria)
     : this(null, categoria)
 {
 }
Example #26
0
 public static ExpenseList GetList(ECategoriaGasto categoria, int year, bool childs)
 {
     return(GetList(categoria, DateAndTime.FirstDay(year), DateAndTime.LastDay(year), childs));
 }
Example #27
0
 public static ExpenseList GetPendientesList(ECategoriaGasto categoria, PaymentInfo payment, bool childs)
 {
     return(GetPendientesList(categoria, payment, DateTime.MinValue, DateTime.MaxValue, childs));
 }
Example #28
0
 public static Expenses GetPendientesList(ECategoriaGasto tipo, Payment pago, bool childs)
 {
     return(GetPendientesList(tipo, pago, DateTime.MinValue, DateTime.MaxValue, childs));
 }
Example #29
0
 public static ExpenseList GetPendientesList(ECategoriaGasto categoria, DateTime from, DateTime till, bool childs)
 {
     return(GetPendientesList(categoria, null, from, till, childs));
 }