Beispiel #1
0
        protected override void SelectPartidaAction()
        {
            BatchList lista;

            lista = BatchList.GetListBySerieAndStock(_serie.Oid, true, false, true);

            BatchSelectForm form = new BatchSelectForm(this, _serie, lista);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                _partida  = form.Selected as BatchInfo;
                _producto = ProductInfo.Get(_partida.OidProducto, false, true);

                _entity.CopyFrom(_partida, _producto);

                AsignaPrecio();

                Datos_Partida.DataSource = _partida;

                EnableKilos();

                if (_entity.FacturacionBulto)
                {
                    Pieces_NTB.Focus();
                }
                else
                {
                    Kilos_NTB.Focus();
                }
            }
        }
        protected override void SelectPartidaAction()
        {
            BatchList lista;

            if (_delivery.Rectificativo)
            {
                lista = BatchList.GetListBySerie(_serie.Oid, false, true);
            }
            else
            {
                lista = BatchList.GetListBySerieAndStock(_serie.Oid, true, false, true);
            }

            BatchSelectForm form = new BatchSelectForm(this, _serie, lista);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                _batch   = form.Selected as BatchInfo;
                _product = ProductInfo.Get(_batch.OidProducto, false, true);

                _entity.CopyFrom(_delivery, _batch, _product);
                _entity.SetTaxes(_client, _product, _serie);

                AsignaPrecio();

                Batch_BS.DataSource = _batch;

                EnableKilos();

                if (_entity.FacturacionBulto)
                {
                    Pieces_NTB.Focus();
                }
                else
                {
                    Kilos_NTB.Focus();
                }
            }

            ShowLineGrid(ETipoProducto.Almacen);
        }