mmsc_app/db/migrate/00640_create_p_customer_sheets.rb
Nicolas Bally a6aa1f6074 Initial
2020-05-25 11:40:11 +02:00

71 lines
1.8 KiB
Ruby

class CreatePCustomerSheets < ActiveRecord::Migration[6.0]
def change
create_table :p_customer_sheets do |t|
t.string :state
t.string :comments
t.references :p_customer
t.integer :p_commercial_id
t.integer :particular_bill_id
t.integer :particular_send_id
t.integer :ref_particular_bill_id
t.integer :ref_particular_send_id
t.integer :ac_accounting_zone_id
t.integer :cc_accounting_zone_id
t.string :ac_accounting_zone_name
t.string :cc_accounting_zone_name
t.decimal :ac_tot_amount_ht, :precision => 14, :scale => 2
t.decimal :cc_tot_amount_ht, :precision => 14, :scale => 2
t.decimal :ac_tot_amount_ttc, :precision => 14, :scale => 2
t.decimal :cc_tot_amount_ttc, :precision => 14, :scale => 2
t.decimal :ac_tot_amount_tva, :precision => 14, :scale => 2
t.decimal :cc_tot_amount_tva, :precision => 14, :scale => 2
t.string :token
t.integer :p_payment_type_id
t.boolean :ac_payment_comptant
t.boolean :cc_payment_comptant
t.integer :ac_payment_delais
t.integer :cc_payment_delais
t.boolean :ac_payment_month_end
t.boolean :cc_payment_month_end
t.date :ac_payment_end_at
t.date :cc_payment_end_at
t.integer :ac_payment_days
t.integer :cc_payment_days
#t.integer :particular_bill_id
#t.integer :particular_send_id
#t.integer :ac_particular_bill_id
#t.integer :ac_particular_send_id
#t.integer :cc_particular_bill_id
#t.integer :cc_particular_send_id
t.timestamps
end
end
end