Example #1
0
 function __construct($ledgerId, $supplierId)
 {
     parent::__construct("Purchases Payment");
     $this->drAccounts[] = Account::GetAccountByNo($supplierId, 'suppliers', 'Creditors');
     $this->drRatios[] = 1;
     $this->crAccounts[] = Account::GetLedger($ledgerId);
     $this->crRatios[] = 1;
     //this info should originate from the database, insert ignore protocol included
     //$this->code = self::GetCode('PayPal');
     //parent::__construct();
 }
Example #2
0
 function __construct()
 {
     parent::__construct();
 }
Example #3
0
 function __construct($name)
 {
     parent::__construct($name);
 }
 function __construct($entries, $amount, $classifier)
 {
     parent::__construct("Direct Posting - " . $classifier);
     foreach ($entries as $entry) {
         if ($entry['effect'] == "dr") {
             $this->drAccounts[] = Account::GetLedger($entry['lid']);
             $this->drRatios[] = floatval(floatval($entry['amount']) / floatval($amount));
         } elseif ($entry['effect'] == "cr") {
             $this->crAccounts[] = Account::GetLedger($entry['lid']);
             $this->crRatios[] = floatval(floatval($entry['amount']) / floatval($amount));
         }
     }
 }
Example #5
0
 function __construct($ledgerId, $clientId)
 {
     parent::__construct("Sales Receipt");
     $this->drAccounts[] = Account::GetLedger($ledgerId);
     $this->drRatios[] = 1;
     $this->crAccounts[] = Account::GetAccountByNo($clientId, 'clients', 'Debtors');
     $this->crRatios[] = 1;
     //this info should originate from the database, insert ignore protocol included
     //$this->code = self::GetCode('PayPal');
     //parent::__construct();
 }
Example #6
0
 function __construct($ledgerId, $employeeId, $type)
 {
     parent::__construct("Employee Benefit - " . $type);
     $this->drAccounts[] = Account::GetAccountByNo($employeeId, 'employees', 'PAYROLL');
     $this->drRatios[] = 1;
     $this->crAccounts[] = Account::GetLedger($ledgerId);
     $this->crRatios[] = 1;
 }