Active
Project:
Commerce PDF Invoice
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Sep 2011 at 12:43 UTC
Updated:
11 Apr 2014 at 14:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
itamair commentedsubscribe! I have got the exact same problem ... tried everything.
Any help would really be appreciated.
I attach a screenshot ...
Comment #2
loparr commentedSame here. Anybody found solution?
Comment #3
danharper commentedSubscribe
Comment #4
silkogelman commentedI don't even get that far:
#1511592: PDF doesn't contain the invoice information
How did you?
Comment #5
maico de jongI think the problem is views_pdf can't calculate the height of an embedded view so positioning an included view is not possible at this moment.
Instead of using an included view we could use the commerce 'commerce_line_items' field where you can specify a view(or just the default line item view) that renders the line items. This way, we don't even need to use the views_field module and the extra Commerce Pdf Invoice Line Items view generated by this module.
This method also solves the positioning problem.
Comment #6
lsolesen commentedHow did all you guys get the line items to show at all? Are you still able to get those to display?
@MDJ Webdiensten Could you show how that would look, and maybe create a patch for the module for others to review?
Comment #7
maico de jongI won't create a patch beceause i've build my own views commerce invoice view without using this module. I created an export of my view(it's only one view) that only needs commerce module + views_pdf module. So i think it will work once you've import the view.
Please take a look at the view and maybe create a patch for this module to accomplish something that works too.
A view like this combined with rules&mimemail(Save pdf with rules, send mimemail with saved pdf as attachment) seems to me like a very nice way to send a pdf invoice by mail.
Comment #8
lsolesen commentedThis issue will probably be solved, when #1423440: Include View doesn't seem to be taking up space is solved in views pdf.
Comment #9
vladsh commentedI'm trying to implement scenario mentioned in #7, i.e. "Save pdf with rules, send mimemail with saved pdf as attachment" with the provided custom view. But saved PDF have no line items. When I view invoice in the browser via [sitename]/user/[userID]/orders/[orderID]/invoice URL - all OK.
Comment #10
vladsh commentedAnswering my own question.
Saved PDF has no line items due to the access restrictions.
Further discussion about line items is here:
http://drupal.org/node/1673252#comment-6542450
Comment #11
bendev commentedThanks MDJ Webdiensten I have reused your view and it is working well.
I only have a small issue: I have added the shipping and billing adress into the fields and they are displayed with too much inter line space. (E.g there is one empty line between the street and the zip code and another between the zip code and the country)
How can you control the style of the billing and shipping adresses ? thanks
Comment #12
vladsh commentedYou may Edit your's address field like this:
1. Select "Customer profile" in the "Relationship" dropdown.
2. In the "Format handlers" section check "Address form (country-specific)" checkbox.
3. In the "REWRITE RESULTS" section check "Rewrite the output of this field" checkbox.
4. Fill in the "Text" textarea with the desired tokens. In my case it looks like this:
[commerce_customer_address-first_name] [commerce_customer_address-last_name]
[commerce_customer_address-premise]
[commerce_customer_address-thoroughfare]
[commerce_customer_address-postal_code] [commerce_customer_address-locality]
5. Check "Convert newlines to HTML
tags" checkbox.
Comment #13
bendev commentedthanks for your answer.
it works as you explained by creating two relationships (billing and shipping adress)
Comment #14
bendev commentedI still have a small issue linked with permissions ...
With the admin role I can see the pdf generated correctly.
If I use a different role, I see a blank pdf.
This role can view the following page without issue
admin/commerce/orders/X/view
on the pdf view, the same fields are used:
commerce order created date
commerce order order number
order line item
order total
shipping address
billing address
is there any additional permission required ? I didn't see any specific to PDF's...
thanks
Comment #15
bendev commentedfurther testing shows that superadmin can see pdf of any order
user with administrator role (all permissions set) can only view pdf of its own orders.
Does this help to narrow down the issue ?
Comment #16
maico de jongIn the export i attached at #7 there was some custom php validation in the contextual filter ' Commerce Order: Uid '. There i checked if the current user is one of a given role and returnd true if so.
There should be a better way(checking for permissions) but that worked for me. So you could just change the role or maybe work with permissions.
Comment #17
bendev commentedthanks I didn't see that one....
you can just use the view access parameter to limit to some roles...(in PDF settings=> access)
as a validation, checking that the arg is a numerical value or a username is enough in my opinion.
Comment #18
theorichel commented@MDJ Webdiensten
I have installed your exported View and it works allright, except for the fact that each PDF has a line 'Edit View' in the middle of the page which is supposed to link to 'resource://pdf.js/web' .
When I search the web how to get rid of this is get suggestions that it has to do with Firefox, but I see the line in Chrome and IE as well.
Any idea how I can get rid of this?
Thanks