This commit is contained in:
Nicolas Bally 2018-03-26 00:34:10 +02:00
parent d9a8bbefed
commit f2496c36a8
3 changed files with 7 additions and 5 deletions

View File

@ -370,7 +370,7 @@ class Admin::ProductOrdersController < ApplicationController
require 'posix/spawn'
::POSIX::Spawn::Child.new 'pdftk', @temp_file, 'background', Rails.root.join('pdf_stamp', 'bl.pdf').to_s, 'output', @final_file
::POSIX::Spawn::Child.new 'pdftk', @temp_file, 'background', Rails.root.join('pdf_stamp', "bl#{(@product_order.reseaux_id if @product_order.reseaux_id == 19)}.pdf").to_s, 'output', @final_file
#pdftk /Users/nico/Desktop/Sanstitre4.pdf background /Users/nico/Dev/negos_app/pdf_stamp/bl.pdf output sortie.pdf

View File

@ -167,7 +167,8 @@
%table.table{:style => "width:100%;margin:1cm 0;"}
%tr
%th
-if @product_order.reseaux_id != 19
%th
%th
Description
%th{:style => "text-align:right;width:100px"}
@ -179,8 +180,9 @@
-@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
-if @product_order.reseaux_id != 19
%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
@ -228,7 +230,7 @@
%tr
%td{:colspan => 3, :rowspan => 3, :style => "border:0;text-align:left;"}
%td{:colspan => (if @product_order.reseaux_id != 19 ? 3 : 2), :rowspan => 3, :style => "border:0;text-align:left;"}
-if @product_order.reseaux_id != 19
%p
%br

BIN
pdf_stamp/bl19.pdf Normal file

Binary file not shown.