Jump to content

Add Transactions list into pdfinvoice


ickevin

Recommended Posts

Hi Experts,

 

I have problem adding invoice transaction list into pdfinvoice.tpl (which can be found in viewinvoice.tpl). Attached picture is the result that doesn't show any of the transactions done.

Following my coding :-

 

 

#################### Transaction Table ##########################

 

$pdf->SetDrawColor(200);

 

$pdf->SetFont('helvetica','B',10);

$pdf->SetFillColor(239);

$pdf->Cell(40,7,$_LANG["invoicestransdate"],1,0,'C','1');

$pdf->Cell(50,7,$_LANG["invoicestransgateway"],1,0,'C','1');

$pdf->Cell(50,7,$_LANG["invoicestransid"],1,0,'C','1');

$pdf->Cell(40,7,$_LANG["invoicestransamount"],1,0,'C','1');

$pdf->Ln();

 

$pdf->SetFont('helvetica','',10);

 

foreach ($transactions AS $transaction) {

 

$rowcount = $pdf->getNumLines($transaction['gateway'], 40);

 

$pdf->MultiCell(40,$rowcount * 5,$transaction['date'],1,'C',0,0);

$pdf->MultiCell(50,$rowcount * 5,$transaction['gateway'],1,'C',0,0);

$pdf->MultiCell(50,$rowcount * 5,$transaction['transid'],1,'C',0,0);

$pdf->MultiCell(40,$rowcount * 5,$transaction['amount'],1,'C',0,0);

 

$pdf->Ln();

}

#################### Transaction Table ##########################

 

Please assist. Thanks in advance!

untitled.JPG

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated