Esempio n. 1
0
        protected override void GetFormSourceData(long oid, object[] parameters)
        {
            ETipoAcreedor tipo = (ETipoAcreedor)parameters[0];

            _entity       = InputDeliveryInfo.Get(oid, tipo, true);
            _deliveryType = _entity.Contado ? ETipoAlbaranes.Agrupados : ETipoAlbaranes.Todos;
        }
Esempio n. 2
0
 public InputInvoiceAddForm(InputDeliveryInfo albaran, IAcreedorInfo emisor, Form parent)
     : base(new object[2] {
     albaran, emisor
 }, parent)
 {
     InitializeComponent();
     SetFormData();
     _mf_type = ManagerFormType.MFAdd;
     SetEmisor(emisor);
     SetSerie(SerieInfo.Get(albaran.OidSerie, false), true);
     _albaran = albaran;
 }
        protected override void SetRowFormat(DataGridViewRow row)
        {
            if (row.IsNewRow)
            {
                return;
            }
            if (!row.Displayed)
            {
                return;
            }

            InputDeliveryInfo item = row.DataBoundItem as InputDeliveryInfo;

            //Face.Common.ControlTools.Instance.SetRowColor(row, item.EEstado);
        }
Esempio n. 4
0
        private bool AddAlbaran(InputDeliveryInfo albaran)
        {
            List <InputDeliveryInfo> list = new List <InputDeliveryInfo>();

            list.Add(albaran);

            _results = list;

            DoAddAlbaran(null);

            if (Result == BGResult.OK)
            {
                Serie_BT.Enabled = false;
                Datos.ResetBindings(false);
            }

            return(false);
        }
Esempio n. 5
0
        protected override void SaveAction()
        {
            Library.Store.QueryConditions conditions = new Library.Store.QueryConditions
            {
                InputDelivery = _entity.GetInfo(false),
                TipoAcreedor  = new ETipoAcreedor[1] {
                    _entity.ETipoAcreedor
                },
                Estado = moleQule.Base.EEstado.NoAnulado
            };

            conditions.InputDelivery.Oid = 0;

            if (InputDeliveryInfo.Exists(conditions, false).Oid != 0 &&
                InputDeliveryInfo.Exists(conditions, false).Oid != _entity.Oid)
            {
                if (DialogResult.No == ProgressInfoMng.ShowQuestion("Existe un albarán de este proveedor con la misma fecha e importe. ¿Desea continuar?"))
                {
                    _action_result = DialogResult.Cancel;
                    return;
                }
            }

            if (_entity.Rectificativo)
            {
                foreach (InputDeliveryLine item in _entity.Conceptos)
                {
                    if (item.FacturacionBulto && item.CantidadBultos > 0)
                    {
                        item.CantidadBultos = -item.CantidadBultos;
                    }
                    if (item.FacturacionPeso && item.CantidadKilos > 0)
                    {
                        item.CantidadKilos = -item.CantidadKilos;
                    }
                }

                _entity.CalculateTotal();
            }

            _action_result = SaveObject() ? DialogResult.OK : DialogResult.Ignore;
        }