Jump to content

juiced

Retired Forum Member
  • Posts

    147
  • Joined

  • Last visited

About juiced

juiced's Achievements

Senior Member

Senior Member (3/3)

0

Reputation

  1. Reason it stopped working is... the "total" value is no longer a numeric value it's a result of the prefix, value and suffix which is why it wouldnt calculate so we have to retrieve that value from the database. However it's not retrieving the suffix for the currency so maybe dont use it? for now anyway.
  2. But also in version 4 the template file has been changed to invoicepdf.tpl Simply "copy / paste" the content from pdfconfig in between the {php} {/php} tags + do the above change and it should be fine.
  3. the above is for html version For PDF version.... Look for $result = select_query("tblinvoices","SUM(total)","userid='".$clientsdetails["userid"]."' AND status='Unpaid' AND id<'".$invoiceid."'"); $data = mysql_fetch_array($result); $balancebroughtforward = format_as_currency($data[0]); $grandtotal = format_as_currency($data[0])+$total; Replace with $result = select_query("tblinvoices","SUM(total)","userid='".$clientsdetails["userid"]."' AND status='Unpaid' AND id<'".$invoiceid."'"); $result2 = select_query("tblinvoices","SUM(total)","userid='".$clientsdetails['userid']."' AND status='Unpaid' AND id='".$invoiceid."'"); $data = mysql_fetch_array($result); $data2 = mysql_fetch_array($result2); $balancebroughtforward = format_as_currency($data[0]); $grandtotal = format_as_currency($data[0]+$data2[0]);
  4. To fix the total issue in V4... in html look for {php} $invoiceid = $this->_tpl_vars['invoiceid']; $clientsdetails = $this->_tpl_vars['clientsdetails']; $total = $this->_tpl_vars['total']; /*echo '<pre>' . print_r($clientsdetails) . '</pre>'; echo 'userid=' . $clientsdetails["userid"] . ' AND status="Unpaid" AND id<' . $invoiceid;*/ $result = select_query("tblinvoices","SUM(total)","userid='".$clientsdetails['userid']."' AND status='Unpaid' AND id<'".$invoiceid."'"); $data = mysql_fetch_array($result); $balancebroughtforward = format_as_currency($data[0]); $grandtotal = format_as_currency($data[0])+$total; $this->assign('balancebroughtforward',$balancebroughtforward); $this->assign('grandtotal',$grandtotal); {/php} Replace with {php} $invoiceid = $this->_tpl_vars['invoiceid']; $clientsdetails = $this->_tpl_vars['clientsdetails']; $total = $this->_tpl_vars['total']; /*echo '<pre>' . print_r($clientsdetails) . '</pre>'; echo 'userid=' . $clientsdetails["userid"] . ' AND status="Unpaid" AND id<' . $invoiceid;*/ $result = select_query("tblinvoices","SUM(total)","userid='".$clientsdetails['userid']."' AND status='Unpaid' AND id<'".$invoiceid."'"); $result2 = select_query("tblinvoices","SUM(total)","userid='".$clientsdetails['userid']."' AND status='Unpaid' AND id='".$invoiceid."'"); $data = mysql_fetch_array($result); $data2 = mysql_fetch_array($result2); $balancebroughtforward = format_as_currency($data[0]); $grandtotal = format_as_currency($data[0]+$data2[0]); $this->assign('balancebroughtforward',$balancebroughtforward); $this->assign('grandtotal',$grandtotal); {/php}
  5. Hi Guys, Sorry i've not been recieving emails of these posts and hadnt check in a while hence the non reply. I noticed V4 is different and therefore our template needs ammendments, I'll get onto this shortly and will post updates here. Cheers
  6. Statement module being built now, probably 5 days away.
  7. Hi SoftDux Our invoice template doubles as a statement. It shows the "balance brought forward" of older unpaid invoices and will add to the total amount due in the invoice. So whenever a new invoice is created it also acts as a statement. I do plan on making a module to run statements shortly. I hope this was helpful.
  8. New Quote PDF Template for the new quote system in V3.8.1
  9. Hi AndrewMKP The description field now drops down line so doesnt run over anymore. And for an if statement for the discount you would do something like if ($item["discount"]>0) { $pdf->MultiCell(15,$cellheight,$item["discount"],1,'C','',0); } else { } Something like that, ive not tested it i've just written it. And you'd do something similair for the coloumn header as well Thanks
  10. Basically we've developed a custom set of templates and we're showcasing them here in the showcase section.
  11. New Quote template to match the invoice template we made. Same deal, fully customisable.
  12. Am looking at doing that now. Is there any more interest? the more the better that way it's cheaper!!
  13. New invoice / statement template for WHMCS It doubles as a statement and brings unpaid balances forward (makes life easier)
×
×
  • 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