public function action_customerpayment() { $payment_id = $this->request->param('id'); $customer_payment_lookup = new Beans_Customer_Payment_Lookup($this->_beans_data_auth((object) array('id' => $payment_id))); $customer_payment_lookup_result = $customer_payment_lookup->execute(); if (!$customer_payment_lookup_result->success) { // V2Item - Clean up and output nicely. die("An error occurred: " . $customer_payment_lookup_result->error); } $customers_print_payment = new View_Customers_Print_Payment(); $customers_print_payment->payment = $customer_payment_lookup_result->data->payment; $customers_print_payment->setup_company_list_result = $this->_setup_company_list_result; die($customers_print_payment->render()); }
public function action_paymentload() { $payment_id = $this->request->post('payment_id'); $customer_payment_lookup = new Beans_Customer_Payment_Lookup($this->_beans_data_auth((object) array('id' => $payment_id))); $customer_payment_lookup_result = $customer_payment_lookup->execute(); if (!$customer_payment_lookup_result->success) { return $this->_return_error($this->_beans_result_get_error($customer_payment_lookup_result)); } $payment = $customer_payment_lookup_result->data->payment; foreach ($payment->sale_payments as $index => $sale_payment) { $html = new View_Partials_Customers_Payments_Batchpaymentline(); $html->sale_payment = $sale_payment; $payment->sale_payments[$index]->html = $html->render(); } $this->_return_object->data->payment = $payment; }