Jump to content

Smarty-how do i display this properly?


tomdchi

Recommended Posts

I am having some smarty trouble with data display in a table.

I have two arrays values that are related and I am trying to display them in a certain order in a table.  The purpose is to reconcile payments to deposits.

The table would look like:

 

 

    
Date      Name         Funding ID              Status   Amount
06/22/09   Tom      6230860059999-13246785     Funded   428.00 
06/22/09   Mike     6230860059999-13246785     Funded   225.77 
06/22/09   Tom      6230860059999-13246785     Funded   107.00 
                                                Total:  760.77

Deposit Date          Trans ID             Amount Deposited
06/24/09        6230860059999-13246785          760.77

Date      Name         Funding ID          Status   Amount
06/25/09   Steve    770875636-13246785     Funded   375.00 
06/25/09   Sam      770875636-13246785     Funded    81.15 
                                            Total:  456.15

Deposit Date          Trans ID             Amount Deposited
06/26/09        770875636-13246785             456.15

 

So there could be multiple sections like above detailing the payments and deposits so they can be reconciled.  Each section can have multiple payments but only one deposit.

 

The first array contains data for the payments and the second array has the deposits.  I tried using two foreach's but that doesn't display as it is above.  I thought maybe I should use section but I am very confused on its syntax for these purposes.  I am assigning each array like

 

    

$query1= blah blah query here
$payment_list[] = $rs;
$smarty->assign('pmt', $payment_list);


$query2= blah blah query here
$deposit_list[] = $r2;
$smarty->assign('deposit', $deposit_list);


Payments and Deposits are tied together with fundingid/transid.

 

Can someone help me out on this?

 

 

Thanks!

 

Tom

Link to comment
https://forums.phpfreaks.com/topic/163864-smarty-how-do-i-display-this-properly/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.