Jump to content

Group Pay Update.


Recommended Posts

The Code that i got to work with Sparky's Help to display clan payments on there clan page and or clientarea home page is as follows

<b>Your Clan Payments are:<br /><br /><table border="1" align="center"><tr><th><b>Date</b></th><th><b>Description</b></th><th><b>Amount</b></th></tr>
		{php}
		$currentpayments = mysql_query("SELECT * from tblcredit where clientid = ".$_SESSION['uid']." ORDER BY date DESC LIMIT 20");
		while($r = mysql_fetch_array($currentpayments)){
		echo "<tr><td>". $r['date'] ."</td><td>". $r['description'] ."</td><td>". $r['amount'] ."</td></tr>";
		}
		{/php}
		</table>

Link to comment
Share on other sites

^ Isn't that the same code I gave you?

 

Anyways... The new update has some more of this in it already... I haven't figured out the payments table yet using the smarty values, but the PDF files says its coded.

 

Both of these I put in the clan member view, not the client.

 

You can now put in the current payment due also in the tpl file. The smarty code is:

{if $invAmountDue}{$currencysymbol}{$invAmountDue} {$currency}{else}No Invoice Due!{/if}

 

And if you want your clan members to see what the current credit balance is also you add:

{$currencysymbol} {$clientInfo.credit} {$currency}

 

and for anyone that wants, I had a lot of clans the didn't want their name displayed, so I modified the name to show:

{if $clientInfo.companyname}{$clientInfo.companyname}{else}{$clientInfo.firstname} {$clientInfo.lastname}{/if}

That way if they enter a Clan Name in the company field, it will show that instead of their name. If they refuse to put their clan name in, then thats on them, and it will show their name.

Edited by VicToMeyeZR
update.
Link to comment
Share on other sites

I also have this... to replace the php code for the past payments table...

 

{foreach item=pastPayments from=$pastPayments}<tr><td>{$pastPayments.date}</td><td>{$pastPayments.description}</td><td>{$pastPayments.amount}</td></tr></table>{foreachelse}<tr><td>None</td><td>None</td><td>0.00</td></tr></table>{/foreach}

 

I have only got this to display one line so far.... Hopefully Shaun can elaborate a litte as to what I have wrong.

Link to comment
Share on other sites

  • 3 weeks later...

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