3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
20 * Page for displaying list of financial batches
22 class CRM_Financial_Page_BatchTransaction
extends CRM_Core_Page_Basic
{
24 * The action links that we need to display for the browse screen.
28 public static $_links = NULL;
29 public static $_entityID;
31 public static $_columnHeader = NULL;
32 public static $_returnvalues = NULL;
40 public function getBAOName() {
41 return 'CRM_Batch_BAO_Batch';
48 * (reference) of action links
50 public function &links() {
51 if (!(self
::$_links)) {
55 'url' => 'civicrm/contact/view/contribution',
56 'qs' => 'reset=1&id=%%contid%%&cid=%%cid%%&action=view&context=contribution&selectedChild=contribute',
57 'title' => ts('View Contribution'),
60 'name' => ts('Remove'),
61 'title' => ts('Remove Transaction'),
62 'extra' => 'onclick = "assignRemove( %%id%%,\'' . 'remove' . '\' );"',
72 * This method is called after the page is created. It checks for the
73 * type of action and executes that action.
74 * Finally it calls the parent's run method.
76 public function run() {
77 // get the requested action
78 // default to 'browse'
79 $action = CRM_Utils_Request
::retrieve('action', 'String', $this, FALSE, 'browse');
81 // assign vars to templates
82 $this->assign('action', $action);
84 self
::$_entityID = CRM_Utils_Request
::retrieve('bid', 'Positive');
86 if (isset(self
::$_entityID)) {
87 $statusID = CRM_Core_DAO
::getFieldValue('CRM_Batch_BAO_Batch', self
::$_entityID, 'status_id');
92 'title' => ts('Accounting Batches'),
93 'url' => CRM_Utils_System
::url('civicrm/financial/financialbatches',
94 "reset=1&batchStatus=$statusID"),
98 CRM_Utils_System
::appendBreadCrumb($breadCrumb);
99 $this->edit($action, self
::$_entityID);
100 return parent
::run();
104 * Get name of edit form.
107 * Classname of edit form.
109 public function editForm() {
110 return 'CRM_Financial_Form_BatchTransaction';
114 * Get edit form name.
119 public function editName() {
131 public function userContext($mode = NULL) {
132 return 'civicrm/batchtransaction';