DoubleEntry v1.0.0 Release Notes

Release Date: 2015-08-04 // over 6 years ago
  • โž• Added

    • Record meta-data against transfers.

      DoubleEntry.transfer(
        Money.new(20_00),
        :from     => one_account,
        :to       => another_account,
        :code     => :a_business_code_for_this_type_of_transfer,
        :metadata => { :key1 => 'value 1', :key2 => 'value 2' },
      )
      

    This feature requires a new DB table. Please add a migration similar to:

    ```ruby
    class CreateDoubleEntryLineMetadata < ActiveRecord::Migration
      def self.up
        create_table "#{DoubleEntry.table_name_prefix}line_metadata", :force => true do |t|
          t.integer    "line_id",               :null => false
          t.string     "key",     :limit => 48, :null => false
          t.string     "value",   :limit => 64, :null => false
          t.timestamps                          :null => false
        end
    
        add_index "#{DoubleEntry.table_name_prefix}line_metadata",
                  ["line_id", "key", "value"],
                  :name => "lines_meta_line_id_key_value_idx"
      end
    
      def self.down
        drop_table "#{DoubleEntry.table_name_prefix}line_metadata"
      end
    end
    ```
    

    ๐Ÿ”„ Changed

    • ๐Ÿ”’ Raise DoubleEntry::Locking::LockWaitTimeout for lock wait timeouts.

    ๐Ÿ›  Fixed

    • Ensure that a range is specified when performing an aggregate function over lines.