Пример #1
0
        private bool getBoxes(long nomenclatureId, int units, out NomenclatureData tare)
        {
            var nomenclature = new Nomenclature() { ReadingId = nomenclatureId };

            if (nomenclature.IsKeg() || nomenclature.BoxType.Empty)
                {
                tare = null;
                return false;
                }

            tare = new NomenclatureData();
            tare.Description = new ObjectValue(nomenclature.BoxType.Description, nomenclature.BoxType.Id);
            tare.Quantity = units / nomenclature.UnitsQuantityPerPack;

            return true;
        }