Welcome Guest, Not a member yet? Register   Sign In
load new page after fpdf generation
#1

[eluser]Unknown[/eluser]
Hello all,

I am making a few changes to a project that uses CodeIgniter(phppos).

so I have made it so the invoices generated are generated as a pdf. I have no problems generating them. My problem comes in what happens after I generate the pdf. I am left at the same page that generated the pdf. It will still display old session information and I am unable to figure out how to load a different page.


I might have went about it wrong, I made a view called receiptPDF.php and just pass my data that way to generate the pdf. PhpPos has a function in one of it's controllers entitled cancel_sale().

this function will clear customer related session data, it leaves the logged in employee data intact, then it reloads the main sales page. but once I load the pdf I am unable to do anything else.


Here is how the pdf is loaded.

$this->load->view("sales/receiptPdf", $superData);

The very next step:
$this->sale_lib->cancel_sale();

I have tried clearing the session data that needs cleared in the receiptPdf.php file as well, and also reloading a different page. But it seems this code never gets run.

I am using the fpdf Output function to initialize saving the pdf and that seems to be the end of the road.

Anyone have any idea what I am doing wrong here?




Theme © iAndrew 2016 - Forum software by © MyBB