public function action_vendorpurchase() { $purchase_id = $this->request->param('id'); $vendor_purchase_lookup = new Beans_Vendor_Purchase_Lookup($this->_beans_data_auth((object) array('id' => $purchase_id))); $vendor_purchase_lookup_result = $vendor_purchase_lookup->execute(); if (!$vendor_purchase_lookup_result->success) { // V2Item - Clean up and output nicely. die("An error occurred: " . $vendor_purchase_lookup_result->error); } $vendors_print_purchase = new View_Vendors_Print_Purchase(); $vendors_print_purchase->purchase = $vendor_purchase_lookup_result->data->purchase; $vendors_print_purchase->setup_company_list_result = $this->_setup_company_list_result; die($vendors_print_purchase->render()); }
public function action_purchaseload() { $purchase_id = $this->request->post('purchase_id'); $vendor_purchase_lookup = new Beans_Vendor_Purchase_Lookup($this->_beans_data_auth((object) array('id' => $purchase_id, 'page_size' => 10000))); $vendor_purchase_lookup_result = $vendor_purchase_lookup->execute(); if (!$vendor_purchase_lookup_result->success) { return $this->_return_error("An error occurred when looking up that purchase purchase:<br>" . $this->_beans_result_get_error($vendor_purchase_lookup_result)); } $this->_return_object->data->purchase = $vendor_purchase_lookup_result->data->purchase; }