public function testExportImport() { $p = new ChartOfAccounts(); $p->addAccount(new Account('1920', 'T', 'Bank')); $p->addAccount(new Account('3000', 'I', 'Income')); $str = serialize($p); $p2 = unserialize($str); $this->assertTrue($p2->accountExists('1920')); $this->assertEquals(new Account('3000', 'I', 'Income'), $p2->getAccount('3000')); }
function addBestBooksTables() { global $wpdb; if (is_admin()) { ChartOfAccounts::createTable(); Journal::createTable(); Ledger::createTable(); } // endif of is_admin() }
function bestbooks_api_chartofaccounts() { $coa = new ChartOfAccounts(); return $coa->getList(); }