class CreatePFournisseurOrders < ActiveRecord::Migration[6.0]
  def change
    create_table :p_fournisseur_orders do |t|
      t.string       :ref
      t.decimal      :amount,   :precision => 14,   :scale => 2
      t.datetime     :enter_date
      t.references   :p_fournisseur,   index: true
      t.decimal      :a_ok_total_ttc,   :precision => 14,   :scale => 2
      t.decimal      :a_ok_total_ht,   :precision => 14,   :scale => 2
      t.decimal      :a_ok_tva,   :precision => 14,   :scale => 2
      t.decimal      :a_total_ttc,   :precision => 14,   :scale => 2
      t.decimal      :a_total_ht,   :precision => 14,   :scale => 2
      t.decimal      :a_tva,   :precision => 14,   :scale => 2
      t.integer      :p_compta_export_id
      t.boolean      :compta_locked,   :default => false

      t.timestamps
    end
  end
end
