__('Accounting & ERP', 'ai-eshop-optimizer'), 'description' => __('Send the supplier invoices you have scanned and applied straight into your accounting system as purchase documents, instead of typing them in a second time.', 'ai-eshop-optimizer'), 'bullets' => array( __('Choose your accounting system and fill in only what it needs.', 'ai-eshop-optimizer'), __('Your own document types, series and VAT codes — nothing is invented, and an unmapped VAT rate stops the document rather than being guessed.', 'ai-eshop-optimizer'), __('Catch up on everything applied before you connected it, in one operation or on a schedule.', 'ai-eshop-optimizer'), __('The same invoice is never posted twice, even if the same paper was scanned twice.', 'ai-eshop-optimizer'), ), ); } private function engine_present() { return class_exists(self::ENGINE_MARKER) && method_exists(self::ENGINE_MARKER, 'render_erp_setup'); } public function register_hooks() { } public function enqueue_admin_assets() { if ($this->engine_present() && method_exists(self::ENGINE_MARKER, 'enqueue_admin_assets')) { call_user_func(array(self::ENGINE_MARKER, 'enqueue_admin_assets')); } } public function render_subtab() { if (!$this->engine_present()) { $aieo_ec_notice = \Rooster\Admin\States::state( 'not-set-up', array( 'title' => __('Rooster One Pro is not installed.', 'ai-eshop-optimizer'), 'text' => __('The accounting connectors ship with the Rooster One Pro plugin. Install and activate it and this screen comes alive without further setup.', 'ai-eshop-optimizer'), ) ); echo $aieo_ec_notice; if (class_exists('AIEO_One_Installer')) { AIEO_One_Installer::render('erp_connectors'); } return; } call_user_func(array(self::ENGINE_MARKER, 'render_erp_setup'), array( 'module' => $this, 'nonce' => wp_create_nonce(AIEO_DMM::NONCE_ACTION), 'ajax' => admin_url('admin-ajax.php'), 'return_url' => $this->get_url(), )); } public static function setup_url() { if (!class_exists('AIEO_DMM')) { return ''; } return admin_url('admin.php?page=' . AIEO_DMM::MENU_SLUG . '&dmm_tab=erp_connectors'); } }