This topic is locked

multiple print options for same master detail

6/9/2016 1:55:55 PM
PHPRunner General questions
K
kirchaj author

I have been testing with PHPRunner 9 and it seems to be very robust and easy to work with. I have been able to create a small order tracking site works well but now I am stumped.
I have a master detail page and have setup the print option to print a customer invoice of that order. Here is my question. I need to have another print option for internal use that pulls data from the same table but uses different fields. For example, the invoice has customer address, line items, costs etc. I need to print a Shop order sheet that does not have any $$$$ on it but has the item description and the image of the item. These fields are not on the invoice.
So how do I setup another print page with different fields? How do I create a link to the new page?

K
kirchaj author 6/21/2016

Is it possible in Phprunner 9 to add a button in the visual editor next to the Add New-Delete buttons? such as Print Invoice and Print Shop Ticket? and then have custom views that display for each of those buttons? I am still struggling to learn Phprunner and I am not sure where to start.
Thanks.

Tony

K
kirchaj author 6/21/2016

Ok, this sort of works but there are still some problems. One is a bug I will submit in a separate post.
I added
<A class="rnr-button btn btn-primary" id="shop_invoice" href="orders_shop_detail_print.php" typeid="ib">Shop Invoice</A> which creates the button and links to the appropriate page but displays all data base records. Is there an easy way to keep the url parameters from the page? Or do they need to be added like in the example?

Sergey Kornilov admin 6/22/2016

You should not insert button as HTML code. You need to insert button via 'Insert button' command and write the code that will read current parameters from the URL and will pass it to printer-friendly page.

K
kirchaj author 6/23/2016



You should not insert button as HTML code. You need to insert button via 'Insert button' command and write the code that will read current parameters from the URL and will pass it to printer-friendly page.


Do you have an example that will work with v9? the documentation does not provide any guidance.

Sergey Kornilov admin 6/23/2016

We do not have such an example. You will have to write this code or you need to hire someone to do this for you.

K
kirchaj author 6/26/2016



We do not have such an example. You will have to write this code or you need to hire someone to do this for you.


I know this sounds like I want someone to do it for me, but I really just need some guidance on how to proceed.
I have added the button and it shows the link
http://localhost/texas2/orders_detail_list.php?masterkey1=15&mastertable=orders#
are there any methods that help modify this?

lefty 6/26/2016



I know this sounds like I want someone to do it for me, but I really just need some guidance on how to proceed.
I have added the button and it shows the link
http://localhost/texas2/orders_detail_list.php?masterkey1=15&mastertable=orders#
are there any methods that help modify this?



Just create a new view of the table with the fields you need. Print! With no button . Add the fields you need to print page . Now you have a new view an can print this new view without those fields showing on print page. Add a new menu item with the link to the new view right under your normal view . Make sure to connect the new view to same master. That's it.