diff --git a/app/views/admin/product_orders/bl.html.haml b/app/views/admin/product_orders/bl.html.haml index 354943a..fe990ca 100644 --- a/app/views/admin/product_orders/bl.html.haml +++ b/app/views/admin/product_orders/bl.html.haml @@ -4,7 +4,7 @@ %meta{:"http-equiv" => "Content-Type", :content=>"text/html; charset=UTF-8"} %meta{:name=>"viewport", :content=>"width=device-width,initial-scale=1"} - :css + :scss body{ font-size:11pt; padding :0px; @@ -29,6 +29,15 @@ border-bottom:1px solid gray; text-align:left; } + + td{ + border-bottom:1px solid rgba(0,0,0,0.1); + + p{ + margin:5px 0; + } + + } table{ border-collapse:collapse; @@ -87,20 +96,20 @@ %body #main - %div{:style => "position:absolute;top:1cm;right:1cm;text-align:right;"} + %div{:style => "position:absolute;top:4.8cm;right:1cm;text-align:right;"} Bon de commande n° =@product_order.bl_number %br =l @product_order.created_at, :format => :date - %div{:style => "height:300px;"} + %div{:style => "height:350px;"} - %table.table{:style => "position:absolute;right:1cm;top:220px"} + %table.table{:style => "position:absolute;right:1cm;top:240px"} %tr - %td{:style => "min-width:6cm;"} + %td{:style => "min-width:6cm;border:0"} %h3 Adresse de facturation %strong=@product_order.particular_bill.organisation @@ -122,7 +131,7 @@ =@product_order.particular_bill.country - %td + %td{:style => "border:0"} %h3 Adresse de livraison %strong=@product_order.particular_bill.organisation @@ -145,35 +154,34 @@ %table.table{:style => "width:100%;margin:1cm 0;"} %tr + %th %th Description - %th - Taille - %th - Option - %th + %th{:style => "text-align:right;width:100px"} + Prix U. HT + %th{:style => "text-align:right;width:80px"} Qté - %th - Unitaire - %th - Montant + %th{:style => "text-align:right;width:100px"} + Prix HT -@product_order.product_order_products.order(:product_id).each do |product_order_product| %tr + %td{:style => "width:135px;padding:0;vertical-align:middle"} + =image_tag "http://negos.pro"+product_order_product.product.default_image.image_file.file.large.medium.small.thumb.url, :style => "width:130px;" if product_order_product.product.default_image + %td + =simple_format product_order_product.archived_product.lang(:fr).bl_title + + + =# product_order_product.archived_product_size.name if product_order_product.archived_product_size - %td - = product_order_product.archived_product.lang(:fr).title + + =# product_order_product.archived_product_option.lang(I18n.locale).name if product_order_product.archived_product_option - %td - = product_order_product.archived_product_size.name if product_order_product.archived_product_size - %td - = product_order_product.archived_product_option.lang(I18n.locale).name if product_order_product.archived_product_option - - %td + %td{:style => "text-align:right;"} = number_to_currency(product_order_product.archived_product.final_price_ttc.to_f, locale: :fr) if product_order_product.archived_product - %td + %td{:style => "text-align:right;"} =product_order_product.qty - %td + %td{:style => "text-align:right;"} = number_to_currency(product_order_product.archived_final_price_ttc_with_qty, locale: :fr) if product_order_product.archived_product @@ -182,19 +190,19 @@ %tr - %td{:colspan => 4, :style => "border:0;"} + %td{:colspan => 3, :style => "border:0;text-align:right;"} %td Total HT : - %td= number_to_currency(@product_order.archived_total_ht, locale: :fr) + %td{:style => "text-align:right;"}= number_to_currency(@product_order.archived_total_ht, locale: :fr) %tr - %td{:colspan => 4, :style => "border:0;"} + %td{:colspan => 3, :style => "border:0;text-align:right;"} %td TVA : - %td= number_to_currency(@product_order.archived_total_tva, locale: :fr) + %td{:style => "text-align:right;"}= number_to_currency(@product_order.archived_total_tva, locale: :fr) %tr - %td{:colspan => 4, :style => "border:0;"} + %td{:colspan => 3, :style => "border:0;text-align:right;"} %td Total TTC : - %td= number_to_currency(@product_order.archived_total_ttc, locale: :fr) + %td{:style => "text-align:right;"}= number_to_currency(@product_order.archived_total_ttc, locale: :fr) diff --git a/app/views/admin/products/_form.html.haml b/app/views/admin/products/_form.html.haml index 67e2f17..84b7b01 100755 --- a/app/views/admin/products/_form.html.haml +++ b/app/views/admin/products/_form.html.haml @@ -16,7 +16,8 @@ = product_lang.hidden_field :id = product_lang.hidden_field :lang = product_lang.input :title, :as => :string, :label => "Nom (#{product_lang.object.lang}) :" - = product_lang.input :description, :label => "Descirption (#{product_lang.object.lang}) :" + = product_lang.input :description, :label => "Description (#{product_lang.object.lang}) :" + = product_lang.input :bl_title, :label => "Description BL (#{product_lang.object.lang}) :" =form.input :price_ht, :label => "Prix (HT) :" =form.input :price_reduced_ht, :label => "Prix (HT) avec réduction :" diff --git a/db/migrate/20171015210925_add_bl_title_to_product_lang.rb b/db/migrate/20171015210925_add_bl_title_to_product_lang.rb new file mode 100644 index 0000000..b4012b4 --- /dev/null +++ b/db/migrate/20171015210925_add_bl_title_to_product_lang.rb @@ -0,0 +1,5 @@ +class AddBlTitleToProductLang < ActiveRecord::Migration + def change + add_column :product_langs, :bl_title, :text + end +end diff --git a/db/schema.rb b/db/schema.rb index db2e000..e95c090 100755 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20170927093622) do +ActiveRecord::Schema.define(version: 20171015210925) do create_table "accepted_offers", force: :cascade do |t| t.datetime "created_at", null: false @@ -741,6 +741,7 @@ ActiveRecord::Schema.define(version: 20170927093622) do t.datetime "created_at", null: false t.datetime "updated_at", null: false t.boolean "archived", limit: 1 + t.text "bl_title", limit: 65535 end add_index "product_langs", ["product_category_id"], name: "index_product_langs_on_product_category_id", using: :btree @@ -826,7 +827,7 @@ ActiveRecord::Schema.define(version: 20170927093622) do t.string "particular_send_id", limit: 255 t.string "token", limit: 255 t.boolean "completed_finish", limit: 1, default: false - t.integer "product_order_payment_ok", limit: 4 + t.integer "product_order_payment_ok_id", limit: 4 t.integer "product_order_payment_type_ok_id", limit: 4 t.integer "bill_index", limit: 4 t.string "bill_number", limit: 255 diff --git a/pdf_stamp/Vouise entière triangles.png b/pdf_stamp/Vouise entière triangles.png new file mode 100644 index 0000000..bfa0e57 Binary files /dev/null and b/pdf_stamp/Vouise entière triangles.png differ diff --git a/pdf_stamp/Vouise entière triangles.psd b/pdf_stamp/Vouise entière triangles.psd new file mode 100644 index 0000000..8f29be5 Binary files /dev/null and b/pdf_stamp/Vouise entière triangles.psd differ diff --git a/pdf_stamp/bl.pdf b/pdf_stamp/bl.pdf index 377d54f..09ead83 100644 Binary files a/pdf_stamp/bl.pdf and b/pdf_stamp/bl.pdf differ diff --git a/pdf_stamp/blold.pdf b/pdf_stamp/blold.pdf new file mode 100644 index 0000000..377d54f Binary files /dev/null and b/pdf_stamp/blold.pdf differ