ref client

This commit is contained in:
Nicolas Bally 2019-02-10 12:43:58 +01:00
parent 9493a30b57
commit d1e6b05003
5 changed files with 17 additions and 1 deletions

View File

@ -21,6 +21,7 @@ class PDocument < ActiveRecord::Base
if self.element and self.element_type == "PCustomerSheet" and !self.id
self.cust_ref = self.element.cust_ref
self.comptant = self.element.comptant

View File

@ -185,6 +185,8 @@
.clear
= form.input :cust_ref, :label => "Référence commande client :"
-if false
%h3 Dates de livraison
%table{:style => "width:100%;"}

View File

@ -84,6 +84,8 @@
%th N° Client
%th Type
%th Référence doc.
-if @p_document.cust_ref?
%th Réf. com. client
%tr
@ -100,6 +102,9 @@
%td{:style => "width:90px"}
=@p_document.d_number
-if @p_document.cust_ref?
%td{:style => "width:90px"}
=@p_document.cust_ref
%br

View File

@ -0,0 +1,6 @@
class AddCustRefToPCustomerSheets < ActiveRecord::Migration
def change
add_column :p_customer_sheets, :cust_ref, :string
add_column :p_documents, :cust_ref, :string
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20190203134413) do
ActiveRecord::Schema.define(version: 20190210113008) do
create_table "admin_admin_roles", force: :cascade do |t|
t.integer "admin_id", limit: 4
@ -799,6 +799,7 @@ ActiveRecord::Schema.define(version: 20190203134413) do
t.datetime "paid_at"
t.integer "p_price_cat_id", limit: 4
t.decimal "fdp_force_price", precision: 10, scale: 2
t.string "cust_ref", limit: 255
end
add_index "p_customer_sheets", ["p_payment_type_id"], name: "index_p_customer_sheets_on_p_payment_type_id", using: :btree
@ -924,6 +925,7 @@ ActiveRecord::Schema.define(version: 20190203134413) do
t.integer "payment_delais", limit: 4
t.boolean "payment_fin_de_mois", default: false
t.integer "p_payment_type_id", limit: 4
t.string "cust_ref", limit: 255
end
create_table "p_eps", force: :cascade do |t|