Guest User

Untitled

a guest
Mar 27th, 2014
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 1.1.6.0
  8. * @ Author : DeZender
  9. * @ Release on : 02.06.2013
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. /**
  15. * WHMCS Invoice Class
  16. *
  17. * @package WHMCS
  18. * @author WHMCS Limited <[email protected]>
  19. * @copyright Copyright (c) WHMCS Limited 2005-2013
  20. * @license http://www.whmcs.com/license/ WHMCS Eula
  21. * @version $Id$
  22. * @link http://www.whmcs.com/
  23. */
  24. class WHMCS_Invoice {
  25. public $pdf = '';
  26. private $invoiceid = '';
  27. private $data = array( );
  28. private $output = array( );
  29. private $totalbalance = 0;
  30. protected $gateway = null;
  31.  
  32. public function __construct($invoiceid = '') {
  33. if ($invoiceid) {
  34. $this->setID( $invoiceid );
  35. }
  36.  
  37. }
  38.  
  39. public function setID($invoiceid) {
  40. $this->invoiceid = $invoiceid;
  41. return true;
  42. }
  43.  
  44. public function getID() {
  45. return (int)$this->invoiceid;
  46. }
  47.  
  48. public function loadData($force = true) {
  49. if (( !$force && count( $this->data ) )) {
  50. return false;
  51. }
  52.  
  53. $result = select_query( 'tblinvoices', 'tblinvoices.*,(SELECT value FROM tblpaymentgateways WHERE gateway=tblinvoices.paymentmethod AND setting=\'name\' LIMIT 1) AS gateway,IFNULL((SELECT SUM(amountin-amountout) FROM tblaccounts WHERE invoiceid=tblinvoices.id),0) as amountpaid', array( 'id' => $this->invoiceid ) );
  54. $data = mysql_fetch_assoc( $result );
  55. ....................................................................
  56. ....................................
  57. ............
Advertisement
Add Comment
Please, Sign In to add comment