definitions/segments/qty.rb in eancom-1.6.3 vs definitions/segments/qty.rb in eancom-2.0.0

- old
+ new

@@ -6,11 +6,11 @@ # Tag # #============================================================================== tag = Eancom::Edifact::Composite.new data = Eancom::Edifact::Data.new( type: String, - length: 3, + length: 1..3, description: 'QUANTITY DETAILS', required: true ) tag.add(:tag, data) @@ -22,22 +22,34 @@ data = Eancom::Edifact::Data.new( type: String, length: 1..3, dictionary: { + '1' => { + description: 'Discrete quantity', + identifier: 'discrete_quantity' + }, '11' => { description: 'Split quantity', - identifier: 'split_quantity', + identifier: 'split_quantity' }, '12' => { description: 'Despatch quantity', identifier: 'despatch_quantity' }, '21' => { description: 'Ordered quantity', identifier: 'ordered_quantity' }, + '26' => { + description: 'Promotion Quantity', + identifier: 'promotion_quantity' + }, + '46' => { + description: 'Delivered quantity', + identifier: 'delivered_quantity' + }, '47' => { description: 'Invoiced quantity', identifier: 'invoiced_quantity' }, '52' => { @@ -46,25 +58,193 @@ }, '53' => { description: 'Minimum order quantity', identifier: 'minimum_order_quantity' }, + '54' => { + description: 'Maximum order quantity', + identifier: 'maximum_order_quantity' + }, '59' => { description: 'Numbers of consumer units in the traded unit', identifier: 'numbers_or_consumer_units_in_the_traded_unit' }, + '61' => { + description: 'Return quantity', + identifier: 'return_quantity' + }, + '66' => { + description: 'Committed quantity', + identifier: 'commited_quantity' + }, + '81' => { + description: 'Extra unplanned delivery', + identifier: 'extra_unplanned_delivery' + }, + '83' => { + description: 'Backorder quantity', + identifier: 'backorder_quantity' + }, + '89' => { + description: 'Quality control held', + identifier: 'quality_control_held' + }, + '96' => { + description: 'Quality control failed', + identifier: 'quality_control_failed' + }, + '97' => { + description: 'Minimum inventory', + identifier: 'minimum_inventory' + }, + '98' => { + description: 'Maximum inventory', + identifier: 'maximum_inventory' + }, + '124' => { + description: 'Damaged goods', + identifier: 'damaged_goods' + }, '129' => { description: 'Units per unit price', identifier: 'units_per_unit_price' }, + '145' => { + description: 'Actual stock', + identifier: 'actual_stock' + }, + '146' => { + description: 'Model or target stock', + identifier: 'model_or_target_stock' + }, + '157' => { + description: 'Opening stock balance quantity', + identifier: 'opening_stock_balance_quantity' + }, '153' => { description: 'Statistical sales quantity', identifier: 'statistical_sales_quantitiy' }, '160' => { description: 'Minimum production batch', identifier: 'minimum_production_batch' + }, + '164' => { + description: 'Delivery batch', + identifier: 'delivery_batch' + }, + '193' => { + description: 'Free quantity included', + identifier: 'free_quantity_included' + }, + '197' => { + description: 'Reordering level', + identifier: 'reordering_level' + }, + '198' => { + description: 'Quantity in transit', + identifier: 'quantity_in_transit' + }, + '199' => { + description: 'Inventory withdrawal quantity', + identifier: 'inventory_withdrawal_quantity' + }, + '200' => { + description: 'Free quantity not included', + identifier: 'free_quantity_not_included' + }, + '212' => { + description: 'Quantity sold, net', + identifier: 'quantity_sold_net' + }, + '17E' => { + description: 'Number of units in lower packaging or configuration level (GS1 Temporary Code)', + identifier: 'number_of_units_in_lower_packaging_or_configuration_level' + }, + '22E' => { + description: 'Free quantity basis (GS1 Temporary Code)', + identifier: 'free_quantity_basis' + }, + '32E' => { + description: 'Consolidated discount stock (GS1 Temporary Code)', + identifier: 'consolidated_discound_stock_gs1_temporary_code' + }, + '45E' => { + description: 'Number of units in higher packaging or configuration level', + identifier: 'number_of_units_in_higher_packaging_or_configuration_level' + }, + '249' => { + description: 'Quantity displayed not available for sale', + identifier: 'quantity_displayed_not_available_for_sale' + }, + '503' => { + description: 'Quantity to be checked', + identifier: 'quantity_to_be_checked' + }, + '504' => { + description: 'Number of wash loads', + identifier: 'number_of_wash_loads' + }, + '93E' => { + description: 'Extraordinary sale (GS1 Temporary Code)', + identifier: 'extraordinary_sale_gs1_temporary_code' + }, + '251' => { + description: 'Incremental order quantity', + identifier: 'incremental_order_quantity' + }, + '257' => { + description: 'Quantity in physical inventory', + identifier: 'quantity_in_physical_inventory' + }, + '399' => { + description: 'File size before compression', + identifier: 'file_size_before_compression' + }, + '400' => { + description: 'File size after compression', + identifier: 'file_size_after_compression' + }, + 'X20' => { + description: 'Reserved quantity, provisional (GS1 Temporary Code)', + identifier: 'reserved_quantity_provisional_gs1_temporary_code' + }, + 'X22' => { + description: 'Consignment stock, available on ordering (GS1 Temporary Code)', + identifier: 'consignment_stock_available_on_ordering_gs1_temporary_code' + }, + 'X23' => { + description: 'Consignment block, available at due date (GS1 Temporary Code)', + identifier: 'consignment_block_available_at_due_date_gs1_temporary_code' + }, + 'X24' => { + description: 'Consignment stock, available at due date (GS1 Temporary Code)', + identifier: 'consignment_stock_available_at_due_date_gs1_temporary_code' + }, + '447' => { + description: 'Quantity moved between outlets', + identifier: 'quantity_moved_between_outlets' + }, + '452' => { + description: 'En route to warehouse quantity', + identifier: 'en_route:_to_warehouse_quantity' + }, + '453' => { + description: 'En route from warehouse quantity', + identifier: 'en_route_from_warehouse_quantity' + }, + '454' => { + description: 'Quantity ordered but not yet allocated from stock', + identifier: 'quantity_ordered_but_not_yet_allocated_from_stock' + }, + '455' => { + description: 'Not yet ordered quantity', + identifier: 'not_yet_ordered_quantity' + }, + '457' => { + description: 'Maximum number of units per shelf', + identifier: 'maximum_number_of_units_per_shelf' } }, description: 'Quantity type code qualifier', required: true ) @@ -79,9 +259,31 @@ quantity_details.add(:quantity, data) data = Eancom::Edifact::Data.new( type: String, length: 0..3, + dictionary: { + 'EA' => { + description: 'Each', + identifier: 'each' + }, + 'PCE' => { + description: 'Piece', + identifier: 'piece' + }, + 'KGM' => { + description: 'kilogram', + identifier: 'kilogram' + }, + 'PND' => { + description: 'Pound (GS1 Temporary Code)', + identifier: 'pound' + }, + '59' => { + description: 'part per million', + identifier: 'part_per_million' + } + }, description: 'Measurement unit code', required: false ) quantity_details.add(:measurement_unit_code, data)