public static InputDeliveryList GetList(bool childs,
                                                ETipoAcreedor providerType,
                                                long oidProvider,
                                                long oidSerie,
                                                ETipoAlbaranes deliveryType,
                                                ETipoFactura invoiceType,
                                                DateTime from,
                                                DateTime till)
        {
            QueryConditions conditions = new QueryConditions
            {
                Acreedor     = (oidProvider != 0) ? ProviderBaseInfo.New(oidProvider, providerType) : null,
                TipoAcreedor = new ETipoAcreedor[1] {
                    providerType
                },
                Serie         = (oidSerie != 0) ? Serie.SerieInfo.New(oidSerie) : null,
                TipoAlbaranes = deliveryType,
                TipoFactura   = invoiceType,
                FechaIni      = from,
                FechaFin      = till,
            };

            if (oidSerie != 0)
            {
                conditions.Serie.Oid = oidSerie;
            }

            return(GetList(childs, SELECT(conditions)));
        }
示例#2
0
        public static OutputDeliveryList GetList(bool childs,
                                                 long oidHolder,
                                                 ETipoEntidad holderType,
                                                 long oidSerie,
                                                 ETipoAlbaranes deliveryType,
                                                 ETipoFactura invoiceType,
                                                 DateTime from,
                                                 DateTime till)
        {
            QueryConditions conditions = new QueryConditions
            {
                Serie         = (oidSerie != 0) ? SerieInfo.New(oidSerie) : null,
                TipoEntidad   = holderType,
                TipoAlbaranes = deliveryType,
                TipoFactura   = invoiceType,
                FechaIni      = from,
                FechaFin      = till,
            };

            switch (holderType)
            {
            case ETipoEntidad.Cliente:
                conditions.Cliente = (oidHolder != 0) ? ClienteInfo.New(oidHolder) : null;
                break;

            case ETipoEntidad.WorkReport:
                conditions.WorkReport = (oidHolder != 0) ? WorkReportInfo.New(oidHolder) : null;
                break;
            }

            return(GetList(childs, SELECT(conditions)));
        }
示例#3
0
        public InputDeliverySelectForm(Form parent, ETipoAlbaranes tipo, ETipoAcreedor tipo_acreedor, long oid_serie, long oid_cliente)
            : base(true, parent, tipo, tipo_acreedor)
        {
            InitializeComponent();
            _view_mode = molView.Select;

            _oid_cliente = oid_cliente;
            _oid_serie   = oid_serie;

            _action_result = DialogResult.Cancel;
        }
示例#4
0
        public DeliverySelectForm(Form parent, ETipoEntidad holderType, ETipoAlbaranes deliveryType, long oidSerie, long oidHolder)
            : base(true, parent, holderType, deliveryType)
        {
            InitializeComponent();
            _view_mode = molView.Select;

            _oid_client = oidHolder;
            _oid_serie  = oidSerie;

            _action_result = DialogResult.Cancel;
        }
示例#5
0
        protected override void SubmitAction()
        {
            _tipo = (ETipoAlbaranes)Enum.Parse(typeof(ETipoAlbaranes), this.TipoAlbaran_CB.Text);
            long serie = TodosSerie_CkB.Checked ? 0 : _serie.Oid;
            OutputDeliveryList lista = null;

            switch (this._tipo)
            {
            case ETipoAlbaranes.Todos:
            case ETipoAlbaranes.Lista:
                lista = OutputDeliveryList.GetList(true, 0, ETipoEntidad.Cliente, serie, this.FInicial_DTP.Value, this.FFinal_DTP.Value);
                break;

            case ETipoAlbaranes.Facturados:
                lista = OutputDeliveryList.GetFacturados(true, 0, serie, this.FInicial_DTP.Value, this.FFinal_DTP.Value);
                break;

            case ETipoAlbaranes.NoFacturados:
                lista = OutputDeliveryList.GetNoFacturados(true, 0, serie, this.FInicial_DTP.Value, this.FFinal_DTP.Value);
                break;

            case ETipoAlbaranes.Agrupados:
                lista = OutputDeliveryList.GetNoFacturadosAgrupados(serie, this.FInicial_DTP.Value, this.FFinal_DTP.Value, true);
                break;
            }

            if (this.Listado_RB.Checked)
            {
                if (this.Detallado_RB.Checked)
                {
                    this.PrintDetail(this._lista);
                }
                else
                {
                    this.PrintList(this._lista);
                }
            }
            else if (this.Detallado_RB.Checked)
            {
                this.PrintDetail(lista);
            }
            else
            {
                this.PrintList(lista);
            }

            _action_result = DialogResult.OK;
        }
        public DeliveryMngForm(bool isModal, Form parent, ETipoEntidad holderType, ETipoAlbaranes tipo, OutputDeliveryList lista)
            : base(isModal, parent, lista)
        {
            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 = OutputDeliveryList.NewList().GetSortedList();
            SortProperty     = Fecha.DataPropertyName;
            SortDirection    = ListSortDirection.Descending;

            _holder_type   = holderType;
            _delivery_type = tipo;
        }
        public InputDeliveryMngForm(bool is_modal, Form parent, ETipoAlbaranes tipo, ETipoAcreedor tipo_acreedor, InputDeliveryList lista)
            : base(is_modal, parent, lista)
        {
            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 = InputDeliveryList.NewList().GetSortedList();
            SortProperty     = Fecha.DataPropertyName;
            SortDirection    = ListSortDirection.Descending;

            _tipo          = tipo;
            _tipo_acreedor = tipo_acreedor;

            this.Text = Resources.Labels.ALBARAN_TODOS;
        }
        public ReportClass GetDetailListReport(OutputDeliveryList list,
                                               ClienteList clientes,
                                               ETipoAlbaranes tipo,
                                               DateTime fini,
                                               DateTime ffin)
        {
            if (list.Count == 0)
            {
                return(null);
            }

            AlbaranDetailListRpt doc = new AlbaranDetailListRpt();

            List <OutputDeliveryPrint>     pList     = new List <OutputDeliveryPrint>();
            List <OutputDeliveryLinePrint> conceptos = new List <OutputDeliveryLinePrint>();

            foreach (OutputDeliveryInfo item in list)
            {
                pList.Add(OutputDeliveryPrint.New(item,
                                                  clientes.GetItem(item.OidHolder),
                                                  null));

                foreach (OutputDeliveryLineInfo cp in item.Conceptos)
                {
                    conceptos.Add(OutputDeliveryLinePrint.New(cp));
                }
            }

            doc.SetDataSource(pList);
            doc.Subreports["Conceptos"].SetDataSource(conceptos);
            doc.SetParameterValue("Empresa", Schema.Name);
            doc.SetParameterValue("Tipo", tipo.ToString());
            doc.SetParameterValue("FIni", fini);
            doc.SetParameterValue("FFin", ffin);

            return(doc);
        }
示例#9
0
 public static OutputDeliveryList GetList(bool childs, long oidHolder, ETipoEntidad holderType, long oidSerie, ETipoAlbaranes deliveryType, ETipoFactura invoiceType, int year)
 {
     return(GetList(childs, oidHolder, holderType, oidSerie, deliveryType, invoiceType, DateAndTime.FirstDay(year), DateAndTime.LastDay(year)));
 }
 public InputDeliveryMngForm(bool is_modal, Form parent, ETipoAlbaranes tipo, ETipoAcreedor tipo_acreedor)
     : this(is_modal, parent, tipo, tipo_acreedor, null)
 {
 }
 public InputDeliveryMngForm(bool is_modal, ETipoAlbaranes tipo, ETipoAcreedor tipo_acreeedor)
     : this(is_modal, null, tipo, tipo_acreeedor)
 {
 }
 public InputDeliveryMngForm(ETipoAlbaranes tipo, ETipoAcreedor tipo_acreedor)
     : this(false, tipo, tipo_acreedor)
 {
 }
示例#13
0
        public static OutputDeliveryList GetListByCliente(bool childs, long oidClient, ETipoAlbaranes tipo, DateTime from, DateTime till)
        {
            QueryConditions conditions = new QueryConditions
            {
                TipoEntidad   = ETipoEntidad.Cliente,
                Cliente       = ClienteInfo.New(oidClient),
                TipoAlbaranes = tipo,
                FechaIni      = from,
                FechaFin      = till
            };

            return(GetList(false, SELECT(conditions)));
        }
示例#14
0
 public InputDeliveryAddForm(Form parent, ETipoAlbaranes tipo)
     : this(new object[2] {
     null, tipo
 }, parent)
 {
 }
示例#15
0
        public static OutputDeliveryList GetListBySerie(bool childs, long oidSerie, int year, ETipoAlbaranes tipo, ETipoFactura invoiceType)
        {
            QueryConditions conditions = new QueryConditions
            {
                Serie         = SerieInfo.New(oidSerie),
                TipoAlbaranes = tipo,
                TipoFactura   = invoiceType,
                FechaIni      = DateAndTime.FirstDay(year),
                FechaFin      = DateAndTime.LastDay(year)
            };

            return(GetList(childs, SELECT(conditions)));
        }
 public static InputDeliveryList GetList(bool childs, ETipoAcreedor tipo, long oid_acreedor, long oid_serie, ETipoAlbaranes tipo_albaranes, ETipoFactura tipo_albaran, int year)
 {
     return(GetList(childs, tipo, oid_acreedor, oid_serie, tipo_albaranes, tipo_albaran, DateAndTime.FirstDay(year), DateAndTime.LastDay(year)));
 }
 public static InputDeliveryList GetListByAcreedor(bool childs, ETipoAcreedor tipo, long oid_acreedor, ETipoAlbaranes tipo_albaranes, DateTime from, DateTime till)
 {
     return(GetList(childs, tipo, oid_acreedor, 0, tipo_albaranes, ETipoFactura.Todas, from, till));
 }
 public DeliveryMngForm(Form parent, ETipoEntidad holderType, ETipoAlbaranes deliveryType)
     : this(false, parent, holderType, deliveryType)
 {
 }
 public DeliveryMngForm(bool isModal, Form parent, ETipoEntidad holderType, ETipoAlbaranes deliveryType)
     : this(isModal, parent, holderType, deliveryType, null)
 {
 }