suite
This commit is contained in:
parent
6919355548
commit
5e9a5673ec
@ -92,6 +92,16 @@ class Societe < ApplicationRecord
|
||||
|
||||
end
|
||||
|
||||
def self.update_card_names
|
||||
Societe.all.each do |s|
|
||||
|
||||
|
||||
VContact.where(:codeproprietaire => s.socmanaginn).update_all(:cc_centre => s.nom)
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
5
db/migrate/20201030113001_add_cc_centre_to_v_contacts.rb
Normal file
5
db/migrate/20201030113001_add_cc_centre_to_v_contacts.rb
Normal file
@ -0,0 +1,5 @@
|
||||
class AddCcCentreToVContacts < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_column :v_contacts, :cc_centre, :string
|
||||
end
|
||||
end
|
@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2019_11_03_133826) do
|
||||
ActiveRecord::Schema.define(version: 2020_10_30_113001) do
|
||||
|
||||
create_table "accounting_zones", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t|
|
||||
t.string "name"
|
||||
@ -2133,6 +2133,7 @@ ActiveRecord::Schema.define(version: 2019_11_03_133826) do
|
||||
t.decimal "ac_rate", precision: 14, scale: 2
|
||||
t.boolean "enabled", default: false
|
||||
t.integer "nbr_mvt"
|
||||
t.string "cc_centre"
|
||||
end
|
||||
|
||||
create_table "video_contents", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t|
|
||||
|
Loading…
x
Reference in New Issue
Block a user