ref client
This commit is contained in:
parent
9493a30b57
commit
d1e6b05003
@ -21,6 +21,7 @@ class PDocument < ActiveRecord::Base
|
|||||||
|
|
||||||
if self.element and self.element_type == "PCustomerSheet" and !self.id
|
if self.element and self.element_type == "PCustomerSheet" and !self.id
|
||||||
|
|
||||||
|
self.cust_ref = self.element.cust_ref
|
||||||
|
|
||||||
self.comptant = self.element.comptant
|
self.comptant = self.element.comptant
|
||||||
|
|
||||||
|
@ -185,6 +185,8 @@
|
|||||||
|
|
||||||
.clear
|
.clear
|
||||||
|
|
||||||
|
= form.input :cust_ref, :label => "Référence commande client :"
|
||||||
|
|
||||||
-if false
|
-if false
|
||||||
%h3 Dates de livraison
|
%h3 Dates de livraison
|
||||||
%table{:style => "width:100%;"}
|
%table{:style => "width:100%;"}
|
||||||
|
@ -84,6 +84,8 @@
|
|||||||
%th N° Client
|
%th N° Client
|
||||||
%th Type
|
%th Type
|
||||||
%th Référence doc.
|
%th Référence doc.
|
||||||
|
-if @p_document.cust_ref?
|
||||||
|
%th Réf. com. client
|
||||||
|
|
||||||
%tr
|
%tr
|
||||||
|
|
||||||
@ -100,6 +102,9 @@
|
|||||||
|
|
||||||
%td{:style => "width:90px"}
|
%td{:style => "width:90px"}
|
||||||
=@p_document.d_number
|
=@p_document.d_number
|
||||||
|
-if @p_document.cust_ref?
|
||||||
|
%td{:style => "width:90px"}
|
||||||
|
=@p_document.cust_ref
|
||||||
%br
|
%br
|
||||||
|
|
||||||
|
|
||||||
|
@ -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
|
@ -11,7 +11,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# 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|
|
create_table "admin_admin_roles", force: :cascade do |t|
|
||||||
t.integer "admin_id", limit: 4
|
t.integer "admin_id", limit: 4
|
||||||
@ -799,6 +799,7 @@ ActiveRecord::Schema.define(version: 20190203134413) do
|
|||||||
t.datetime "paid_at"
|
t.datetime "paid_at"
|
||||||
t.integer "p_price_cat_id", limit: 4
|
t.integer "p_price_cat_id", limit: 4
|
||||||
t.decimal "fdp_force_price", precision: 10, scale: 2
|
t.decimal "fdp_force_price", precision: 10, scale: 2
|
||||||
|
t.string "cust_ref", limit: 255
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "p_customer_sheets", ["p_payment_type_id"], name: "index_p_customer_sheets_on_p_payment_type_id", using: :btree
|
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.integer "payment_delais", limit: 4
|
||||||
t.boolean "payment_fin_de_mois", default: false
|
t.boolean "payment_fin_de_mois", default: false
|
||||||
t.integer "p_payment_type_id", limit: 4
|
t.integer "p_payment_type_id", limit: 4
|
||||||
|
t.string "cust_ref", limit: 255
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "p_eps", force: :cascade do |t|
|
create_table "p_eps", force: :cascade do |t|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user