public function action_taxload() { $tax_lookup = new Beans_Tax_Lookup($this->_beans_data_auth((object) array('id' => $this->request->post('tax_id')))); $tax_lookup_result = $tax_lookup->execute(); if (!$tax_lookup_result->success) { return $this->_return_error($this->_beans_result_get_error($tax_lookup_result)); } $this->_return_object->data->tax = $tax_lookup_result->data->tax; }
public function action_taxpayments() { $payment_id = $this->request->param('id'); $tax_id = NULL; if ($payment_id == "new") { $payment_id = NULL; $tax_id = $this->request->param('code'); } $tax_payment_search = new Beans_Tax_Payment_Search($this->_beans_data_auth((object) array('page_size' => 5, 'sort_by' => 'newest'))); $tax_payment_search_result = $tax_payment_search->execute(); if ($this->_beans_result_check($tax_payment_search_result)) { $this->_view->tax_payment_search_result = $tax_payment_search_result; } if ($tax_id) { $tax_lookup = new Beans_Tax_Lookup($this->_beans_data_auth((object) array('id' => $tax_id))); $tax_lookup_result = $tax_lookup->execute(); if ($this->_beans_result_check($tax_lookup_result)) { $this->_view->requested_tax_id = $tax_lookup_result->data->tax->id; $this->_view->requested_tax_name = $tax_lookup_result->data->tax->name; } } $this->_view->requested_payment_id = $payment_id; }