Comment fixes and function clean-up for CRM/Financial directory.
authorSaurabh Batra <saurabh.batra96@gmail.com>
Tue, 20 Oct 2015 17:58:07 +0000 (23:28 +0530)
committerSaurabh Batra <saurabh.batra96@gmail.com>
Tue, 20 Oct 2015 18:05:34 +0000 (23:35 +0530)
23 files changed:
CRM/Financial/BAO/ExportFormat.php
CRM/Financial/BAO/ExportFormat/CSV.php
CRM/Financial/BAO/ExportFormat/IIF.php
CRM/Financial/BAO/FinancialAccount.php
CRM/Financial/BAO/FinancialItem.php
CRM/Financial/BAO/FinancialType.php
CRM/Financial/BAO/FinancialTypeAccount.php
CRM/Financial/BAO/PaymentProcessor.php
CRM/Financial/BAO/PaymentProcessorType.php
CRM/Financial/Form/BatchTransaction.php
CRM/Financial/Form/Export.php
CRM/Financial/Form/FinancialAccount.php
CRM/Financial/Form/FinancialBatch.php
CRM/Financial/Form/FinancialType.php
CRM/Financial/Form/FinancialTypeAccount.php
CRM/Financial/Form/Search.php
CRM/Financial/Page/AJAX.php
CRM/Financial/Page/Batch.php
CRM/Financial/Page/BatchTransaction.php
CRM/Financial/Page/FinancialAccount.php
CRM/Financial/Page/FinancialBatch.php
CRM/Financial/Page/FinancialType.php
CRM/Financial/Page/FinancialTypeAccount.php

index f676f48e93934e6b8c42b9b09cd2fd08a2a099ca..5b89b275028efe490c7d16c4dc25af189f1b253b 100644 (file)
@@ -29,8 +29,6 @@
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 
 /**
@@ -104,14 +102,6 @@ class CRM_Financial_BAO_ExportFormat {
     return 'txt';
   }
 
-  /**
-   * Override this if appropriate.
-   * @return null
-   */
-  public function getTemplateFileName() {
-    return NULL;
-  }
-
   /**
    * @return object
    */
@@ -150,7 +140,7 @@ class CRM_Financial_BAO_ExportFormat {
 
   public function initiateDownload() {
     $config = CRM_Core_Config::singleton();
-    //zip files if more than one.
+    // zip files if more than one.
     if (count($this->_downloadFile) > 1) {
       $zip = $config->customFileUploadDir . 'Financial_Transactions_' . date('YmdHis') . '.zip';
       $result = $this->createZip($this->_downloadFile, $zip, TRUE);
@@ -204,7 +194,7 @@ class CRM_Financial_BAO_ExportFormat {
       $subject .= ' ' . ts('Count') . '[' . $values['item_count'] . '],';
     }
 
-    //create activity.
+    // create activity.
     $subject .= ' ' . ts('Batch') . '[' . $values['title'] . ']';
     $activityTypes = CRM_Core_PseudoConstant::activityType(TRUE, FALSE, FALSE, 'name');
     $activityParams = array(
@@ -235,14 +225,14 @@ class CRM_Financial_BAO_ExportFormat {
    * @return bool
    */
   public function createZip($files = array(), $destination = NULL, $overwrite = FALSE) {
-    //if the zip file already exists and overwrite is false, return false
+    // if the zip file already exists and overwrite is false, return false
     if (file_exists($destination) && !$overwrite) {
       return FALSE;
     }
     $valid_files = array();
     if (is_array($files)) {
       foreach ($files as $file) {
-        //make sure the file exists
+        // make sure the file exists
         if (file_exists($file)) {
           $validFiles[] = $file;
         }
index 565b9c13f1e9c75cc94f619ba1dd3c45c9f5f2df..841e4530188b4720142e3deb9766e99735f747fb 100644 (file)
@@ -29,8 +29,6 @@
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 
 /**
  */
 class CRM_Financial_BAO_ExportFormat_CSV extends CRM_Financial_BAO_ExportFormat {
 
-  // For this phase, we always output these records too so that there isn't data referenced in the journal entries that isn't defined anywhere.
-  // Possibly in the future this could be selected by the user.
+  /**
+   * For this phase, we always output these records too so that there isn't data
+   * referenced in the journal entries that isn't defined anywhere.
+   *
+   * Possibly in the future this could be selected by the user.
+   */
   public static $complementaryTables = array(
     'ACCNT',
     'CUST',
@@ -58,7 +60,7 @@ class CRM_Financial_BAO_ExportFormat_CSV extends CRM_Financial_BAO_ExportFormat
   public function export($exportParams) {
     $export = parent::export($exportParams);
 
-    // Save the file in the public directory
+    // Save the file in the public directory.
     $fileName = self::putFile($export);
 
     foreach (self::$complementaryTables as $rct) {
@@ -66,9 +68,6 @@ class CRM_Financial_BAO_ExportFormat_CSV extends CRM_Financial_BAO_ExportFormat
       $this->$func();
     }
 
-    // now do general journal entries
-    $this->exportTRANS();
-
     $this->output($fileName);
   }
 
@@ -243,13 +242,4 @@ class CRM_Financial_BAO_ExportFormat_CSV extends CRM_Financial_BAO_ExportFormat
     return 'csv';
   }
 
-  public function exportACCNT() {
-  }
-
-  public function exportCUST() {
-  }
-
-  public function exportTRANS() {
-  }
-
 }
index 4f7c37d4ba69e6116664c89cd4d967fc5c1717df..46b6c9b9803d744f1d6f578fcbd22c306a8a9f59 100644 (file)
@@ -29,8 +29,6 @@
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 
 /**
  */
 class CRM_Financial_BAO_ExportFormat_IIF extends CRM_Financial_BAO_ExportFormat {
 
-  // Tab character. Some people's editors replace tabs with spaces so I'm scared to use actual tabs.
-  // Can't set it here using chr() because static. Same thing if a const. So it's set in constructor.
+  /**
+   * Tab character. Some people's editors replace tabs with spaces so I'm scared to use actual tabs.
+   * Can't set it here using chr() because static. Same thing if a const. So it's set in constructor.
+   */
   static $SEPARATOR;
 
-  // For this phase, we always output these records too so that there isn't data referenced in the journal entries that isn't defined anywhere.
-  // Possibly in the future this could be selected by the user.
+  /**
+   * For this phase, we always output these records too so that there isn't data
+   * referenced in the journal entries that isn't defined anywhere.
+   *
+   * Possibly in the future this could be selected by the user.
+   */
   public static $complementaryTables = array(
     'ACCNT',
     'CUST',
index 60c82b68a066fda84524fe4efa1da4fea0c8e69d..9d866799ca58a84eaf4e93420efd1805eb2a2824 100644 (file)
@@ -29,8 +29,6 @@
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 class CRM_Financial_BAO_FinancialAccount extends CRM_Financial_DAO_FinancialAccount {
 
@@ -121,7 +119,7 @@ class CRM_Financial_BAO_FinancialAccount extends CRM_Financial_DAO_FinancialAcco
    * @param int $financialAccountId
    */
   public static function del($financialAccountId) {
-    //checking if financial type is present
+    // checking if financial type is present
     $check = FALSE;
 
     //check dependencies
@@ -144,7 +142,7 @@ class CRM_Financial_BAO_FinancialAccount extends CRM_Financial_DAO_FinancialAcco
       return CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/admin/financial/financialAccount', "reset=1&action=browse"));
     }
 
-    //delete from financial Type table
+    // delete from financial Type table
     $financialAccount = new CRM_Financial_DAO_FinancialAccount();
     $financialAccount->id = $financialAccountId;
     $financialAccount->delete();
index 059533dfc8d25cc4eebc44c471f1371368118273..daed65932948086ef8622015d4625f35b62054f8 100644 (file)
@@ -29,8 +29,6 @@
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 class CRM_Financial_BAO_FinancialItem extends CRM_Financial_DAO_FinancialItem {
 
@@ -209,7 +207,7 @@ class CRM_Financial_BAO_FinancialItem extends CRM_Financial_DAO_FinancialItem {
   public static function retrieveEntityFinancialTrxn($params, $maxId = FALSE) {
     $financialItem = new CRM_Financial_DAO_EntityFinancialTrxn();
     $financialItem->copyValues($params);
-    //retrieve last entry from civicrm_entity_financial_trxn
+    // retrieve last entry from civicrm_entity_financial_trxn
     if ($maxId) {
       $financialItem->orderBy('id DESC');
       $financialItem->limit(1);
index 9cd40e947ee64a5c79ea0ddc8525f13e02d269bc..47492863dd0ca2683ddb529638321f1938814895 100644 (file)
@@ -29,8 +29,6 @@
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 class CRM_Financial_BAO_FinancialType extends CRM_Financial_DAO_FinancialType {
 
@@ -144,7 +142,7 @@ class CRM_Financial_BAO_FinancialType extends CRM_Financial_DAO_FinancialType {
     // tables to ingore checks for financial_type_id
     $ignoreTables = array('CRM_Financial_DAO_EntityFinancialAccount');
 
-    //TODO: if (!$financialType->find(true)) {
+    // TODO: if (!$financialType->find(true)) {
 
     // ensure that we have no objects that have an FK to this financial type id TODO: that cannot be null
     $occurrences = $financialType->findReferences();
@@ -166,7 +164,7 @@ class CRM_Financial_BAO_FinancialType extends CRM_Financial_DAO_FinancialType {
       }
     }
 
-    //delete from financial Type table
+    // delete from financial Type table
     $financialType->delete();
 
     $entityFinancialType = new CRM_Financial_DAO_EntityFinancialAccount();
index 5b2a1826769ff3551a8f3c8f4ff3583123201a64..3775d16d80fe35a1fa26ace30de10ba41581fb54 100644 (file)
@@ -29,8 +29,6 @@
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 class CRM_Financial_BAO_FinancialTypeAccount extends CRM_Financial_DAO_EntityFinancialAccount {
 
@@ -107,12 +105,12 @@ class CRM_Financial_BAO_FinancialTypeAccount extends CRM_Financial_DAO_EntityFin
    *
    */
   public static function del($financialTypeAccountId, $accountId = NULL) {
-    //checking if financial type is present
+    // check if financial type is present
     $check = FALSE;
     $relationValues = CRM_Core_PseudoConstant::get('CRM_Financial_DAO_EntityFinancialAccount', 'account_relationship');
 
     $financialTypeId = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_EntityFinancialAccount', $financialTypeAccountId, 'entity_id');
-    //check dependencies
+    // check dependencies
     // FIXME more table containing financial_type_id to come
     $dependency = array(
       array('Contribute', 'Contribution'),
@@ -146,7 +144,7 @@ class CRM_Financial_BAO_FinancialTypeAccount extends CRM_Financial_DAO_EntityFin
       return CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/admin/financial/financialType/accounts', "reset=1&action=browse&aid={$accountId}"));
     }
 
-    //delete from financial Type table
+    // delete from financial Type table
     $financialType = new CRM_Financial_DAO_EntityFinancialAccount();
     $financialType->id = $financialTypeAccountId;
     $financialType->find(TRUE);
index 382bf8a0962e35afd11782d0a9fd925e892fd5b3..1231434a4bbdb3e08b3f80d9eaa56cf1b200710b 100644 (file)
@@ -433,7 +433,7 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces
     ) {
       return $result;
     }
-    //FIXME:
+
     if ($component == 'membership') {
       $sql = "
     SELECT cr.payment_processor_id as ppID1, cp.payment_processor as ppID2, con.is_test
@@ -459,7 +459,7 @@ INNER JOIN civicrm_contribution       con ON ( mp.contribution_id = con.id )
      WHERE cr.id = %1";
     }
 
-    //we are interesting in single record.
+    // We are interested in a single record.
     $sql .= ' LIMIT 1';
 
     $params = array(1 => array($entityID, 'Integer'));
index 941b646c51dedafb3de36c980d9dd1a1f0e2cf42..b6f548f5f8ff1d280cd67fbe98339d2d611548b2 100644 (file)
@@ -29,8 +29,6 @@
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 class CRM_Financial_BAO_PaymentProcessorType extends CRM_Financial_DAO_PaymentProcessorType {
 
@@ -54,7 +52,7 @@ class CRM_Financial_BAO_PaymentProcessorType extends CRM_Financial_DAO_PaymentPr
    * @param array $defaults
    *   (reference ) an assoc array to hold the flattened values.
    *
-   * @return CRM_Core_BAO_LocaationType|null
+   * @return CRM_Core_BAO_LocationType|null
    *   object on success, null otherwise
    */
   public static function retrieve(&$params, &$defaults) {
index 8c11d16fdb490199619da86cc725bd282e6ef5dd..5c6da49a601e042d832437f8e95cc76457082f34 100644 (file)
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 
 /**
  * This class generates form components for Financial Type
- *
  */
 class CRM_Financial_Form_BatchTransaction extends CRM_Contribute_Form {
   static $_links = NULL;
@@ -77,8 +74,6 @@ class CRM_Financial_Form_BatchTransaction extends CRM_Contribute_Form {
 
   /**
    * Build the form object.
-   *
-   * @return void
    */
   public function buildQuickForm() {
     if ($this->_batchStatusId == 2) {
index 89c916eda2bdf81a4b848095e859005d564b7e9e..507eb7af03235f98d823ea1adabd8d0427132fe2 100644 (file)
@@ -29,8 +29,6 @@
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 
 /**
@@ -64,8 +62,6 @@ class CRM_Financial_Form_Export extends CRM_Core_Form {
 
   /**
    * Build all the data structures needed to build the form.
-   *
-   * @return void
    */
   public function preProcess() {
     $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
@@ -73,7 +69,7 @@ class CRM_Financial_Form_Export extends CRM_Core_Form {
     // this mean it's a batch action
     if (!$this->_id) {
       if (!empty($_GET['batch_id'])) {
-        //validate batch ids
+        // validate batch ids
         $batchIds = explode(',', $_GET['batch_id']);
         foreach ($batchIds as $batchId) {
           CRM_Utils_Type::validate($batchId, 'Positive');
@@ -96,7 +92,7 @@ class CRM_Financial_Form_Export extends CRM_Core_Form {
     $allBatchStatus = CRM_Core_PseudoConstant::get('CRM_Batch_DAO_Batch', 'status_id');
     $this->_exportStatusId = CRM_Utils_Array::key('Exported', $allBatchStatus);
 
-    //check if batch status is valid, do not allow exported batches to export again
+    // check if batch status is valid, do not allow exported batches to export again
     $batchStatus = CRM_Batch_BAO_Batch::getBatchStatuses($this->_batchIds);
 
     foreach ($batchStatus as $batchStatusId) {
@@ -112,8 +108,6 @@ class CRM_Financial_Form_Export extends CRM_Core_Form {
 
   /**
    * Build the form object.
-   *
-   * @return void
    */
   public function buildQuickForm() {
     // this mean it's a batch action
@@ -151,8 +145,6 @@ class CRM_Financial_Form_Export extends CRM_Core_Form {
 
   /**
    * Process the form after the input has been submitted and validated.
-   *
-   * @return void
    */
   public function postProcess() {
     if (!$this->_exportFormat) {
index 73efb5e386a355a30785e8f3f582cde2d4569183..4fa43aa970605dae33650a989f1e14d44dba2899 100644 (file)
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 
 /**
  * This class generates form components for Financial Account
- *
  */
 class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form {
 
@@ -49,8 +46,6 @@ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form {
 
   /**
    * Set variables up before form is built.
-   *
-   * @return void
    */
   public function preProcess() {
     parent::preProcess();
@@ -76,8 +71,6 @@ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form {
 
   /**
    * Build the form object.
-   *
-   * @return void
    */
   public function buildQuickForm() {
     parent::buildQuickForm();
@@ -175,10 +168,7 @@ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form {
 
   /**
    * Set default values for the form.
-   * the default values are retrieved from the database
-   *
-   *
-   * @return void
+   * the default values are retrieved from the database.
    */
   public function setDefaultValues() {
     $defaults = parent::setDefaultValues();
@@ -190,8 +180,6 @@ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form {
 
   /**
    * Process the form submission.
-   *
-   * @return void
    */
   public function postProcess() {
     if ($this->_action & CRM_Core_Action::DELETE) {
index 1045266c7fe8fa611a0c5aab6de1e5875ac6b387..cadef1f9c378b544a314eb13e4bf9672a2361a98 100644 (file)
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 
 /**
  * This class generates form components for Accounting Batch
- *
  */
 class CRM_Financial_Form_FinancialBatch extends CRM_Contribute_Form {
 
@@ -48,8 +45,6 @@ class CRM_Financial_Form_FinancialBatch extends CRM_Contribute_Form {
 
   /**
    * Set variables up before form is built.
-   *
-   * @return void
    */
   public function preProcess() {
     $context = CRM_Utils_Request::retrieve('context', 'String', $this);
@@ -84,8 +79,6 @@ class CRM_Financial_Form_FinancialBatch extends CRM_Contribute_Form {
 
   /**
    * Build the form object.
-   *
-   * @return void
    */
   public function buildQuickForm() {
     parent::buildQuickForm();
@@ -124,7 +117,7 @@ class CRM_Financial_Form_FinancialBatch extends CRM_Contribute_Form {
     if ($this->_action & CRM_Core_Action::UPDATE && $this->_id) {
       $batchStatus = CRM_Core_PseudoConstant::get('CRM_Batch_DAO_Batch', 'status_id');
 
-      //unset exported status
+      // unset exported status
       $exportedStatusId = CRM_Utils_Array::key('Exported', $batchStatus);
       unset($batchStatus[$exportedStatusId]);
       $this->add('select', 'status_id', ts('Batch Status'), array('' => ts('- select -')) + $batchStatus, TRUE);
@@ -150,10 +143,7 @@ class CRM_Financial_Form_FinancialBatch extends CRM_Contribute_Form {
 
   /**
    * Set default values for the form. Note that in edit/view mode
-   * the default values are retrieved from the database
-   *
-   *
-   * @return void
+   * the default values are retrieved from the database.
    */
   public function setDefaultValues() {
     $defaults = parent::setDefaultValues();
@@ -203,8 +193,6 @@ class CRM_Financial_Form_FinancialBatch extends CRM_Contribute_Form {
 
   /**
    * Process the form submission.
-   *
-   * @return void
    */
   public function postProcess() {
     $session = CRM_Core_Session::singleton();
@@ -244,7 +232,7 @@ class CRM_Financial_Form_FinancialBatch extends CRM_Contribute_Form {
 
     $activityTypes = CRM_Core_PseudoConstant::activityType(TRUE, FALSE, FALSE, 'name');
 
-    //create activity.
+    // create activity.
     $activityParams = array(
       'activity_type_id' => array_search($activityTypeName, $activityTypes),
       'subject' => $batch->title . "- Batch",
index a746a5debd7c77685a1be82b3f642508ade3bd4b..424e7ff19aa52a3c1874691e0672936424934a9d 100644 (file)
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 
 /**
  * This class generates form components for Financial Type
- *
  */
 class CRM_Financial_Form_FinancialType extends CRM_Contribute_Form {
 
   /**
    * Build the form object.
-   *
-   * @return void
    */
   public function buildQuickForm() {
     parent::buildQuickForm();
@@ -77,8 +72,6 @@ class CRM_Financial_Form_FinancialType extends CRM_Contribute_Form {
 
   /**
    * Process the form submission.
-   *
-   * @return void
    */
   public function postProcess() {
     if ($this->_action & CRM_Core_Action::DELETE) {
index 68b787a0a7ee80680633cf7b83cde9a681c39034..c9c9a2a0d9b7afdb27c9e71b16ce0a581d8f501c 100644 (file)
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 
 /**
  * This class generates form components for Financial Type Account
- *
  */
 class CRM_Financial_Form_FinancialTypeAccount extends CRM_Contribute_Form {
 
@@ -69,8 +66,6 @@ class CRM_Financial_Form_FinancialTypeAccount extends CRM_Contribute_Form {
 
   /**
    * Set variables up before form is built.
-   *
-   * @return void
    */
   public function preProcess() {
     $this->_aid = CRM_Utils_Request::retrieve('aid', 'Positive', $this);
@@ -120,8 +115,6 @@ class CRM_Financial_Form_FinancialTypeAccount extends CRM_Contribute_Form {
 
   /**
    * Build the form object.
-   *
-   * @return void
    */
   public function buildQuickForm() {
     parent::buildQuickForm();
@@ -142,10 +135,10 @@ class CRM_Financial_Form_FinancialTypeAccount extends CRM_Contribute_Form {
 
     if ($this->_action == CRM_Core_Action::UPDATE) {
       $this->assign('aid', $this->_id);
-      //hidden field to catch the group id in profile
+      // hidden field to catch the group id in profile
       $this->add('hidden', 'financial_type_id', $this->_aid);
 
-      //hidden field to catch the field id in profile
+      // hidden field to catch the field id in profile
       $this->add('hidden', 'account_type_id', $this->_id);
     }
     $AccountTypeRelationship = CRM_Core_PseudoConstant::get('CRM_Financial_DAO_EntityFinancialAccount', 'account_relationship');
@@ -302,8 +295,6 @@ class CRM_Financial_Form_FinancialTypeAccount extends CRM_Contribute_Form {
 
   /**
    * Process the form submission.
-   *
-   * @return void
    */
   public function postProcess() {
     if ($this->_action & CRM_Core_Action::DELETE) {
index 8a62d0d78721f3f7696e0ee21fe28dfbbdd4e335..58951b3f4ad394e050e1b98dc0f838ea8c0c66b8 100644 (file)
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
+ */
+
+/**
+ * @todo Add comments if possible.
  */
 class CRM_Financial_Form_Search extends CRM_Core_Form {
 
index c03fd36a99baff4cb23205b9b11bdc21b36d16ea..b2a632164bb996186e6a71676153194c19fbeee0 100644 (file)
@@ -29,8 +29,6 @@
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 
 /**
@@ -56,14 +54,14 @@ class CRM_Financial_Page_AJAX {
     }
     else {
       $financialAccountType = array(
-        '5' => 5, //expense
-        '3' => 1, //AR relation
-        '1' => 3, //revenue
+        '5' => 5, // expense
+        '3' => 1, // AR relation
+        '1' => 3, // revenue
         '6' => 1, // asset
-        '7' => 4, //cost of sales
-        '8' => 1, //premium inventory
-        '9' => 3, //discount account is
-        '10' => 2, //sales tax liability
+        '7' => 4, // cost of sales
+        '8' => 1, // premium inventory
+        '9' => 3, // discount account is
+        '10' => 2, // sales tax liability
       );
       $financialAccountType = CRM_Utils_Array::value($_GET['_value'], $financialAccountType);
       $result = CRM_Contribute_PseudoConstant::financialAccount(NULL, $financialAccountType);
index 4763e1dbcbddd85a5e8884941a4410c713c82142..9e8d8eeaf85a185e8c9830451d9a5314835626d6 100644 (file)
@@ -29,8 +29,6 @@
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 
 /**
@@ -55,13 +53,6 @@ class CRM_Financial_Page_Batch extends CRM_Core_Page_Basic {
     return 'CRM_Batch_BAO_Batch';
   }
 
-  /**
-   * Get action Links.
-   *
-   */
-  public function &links() {
-  }
-
   /**
    * Get name of edit form.
    *
@@ -96,8 +87,6 @@ class CRM_Financial_Page_Batch extends CRM_Core_Page_Basic {
 
   /**
    * Browse all entities.
-   *
-   * @return void
    */
   public function browse() {
     $status = CRM_Utils_Request::retrieve('status', 'Positive', CRM_Core_DAO::$_nullObject, FALSE, 1);
index b7a6500af1b52ee4ee827dfc46e2db5ec890467b..1ede605618e8863846720b9e7d88d2cee0fdda46 100644 (file)
@@ -29,8 +29,6 @@
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 
 
@@ -90,8 +88,6 @@ class CRM_Financial_Page_BatchTransaction extends CRM_Core_Page_Basic {
    * This method is called after the page is created. It checks for the
    * type of action and executes that action.
    * Finally it calls the parent's run method.
-   *
-   * @return void
    */
   public function run() {
     // get the requested action
@@ -118,15 +114,6 @@ class CRM_Financial_Page_BatchTransaction extends CRM_Core_Page_Basic {
     return parent::run();
   }
 
-  /**
-   * Browse all financial batch transactions.
-   *
-   *
-   * @return void
-   */
-  public function browse() {
-  }
-
   /**
    * Get name of edit form.
    *
index 3998c306045b707368f3b4b9f1f79d4c1e5ec40b..af18959995ea7d3f5fc10a38dfe7d44c10d5c9f3 100644 (file)
@@ -29,8 +29,6 @@
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 
 /**
@@ -98,8 +96,6 @@ class CRM_Financial_Page_FinancialAccount extends CRM_Core_Page_Basic {
    * This method is called after the page is created. It checks for the
    * type of action and executes that action.
    * Finally it calls the parent's run method.
-   *
-   * @return void
    */
   public function run() {
     // get the requested action
@@ -120,9 +116,6 @@ class CRM_Financial_Page_FinancialAccount extends CRM_Core_Page_Basic {
 
   /**
    * Browse all custom data groups.
-   *
-   *
-   * @return void
    */
   public function browse() {
     // get all custom groups sorted by weight
index c17d467553dd1a02abf29682c12548e41febb431..bbe47be138f0a08b5898c76150955e4af2918ee1 100644 (file)
@@ -29,8 +29,6 @@
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 
 /**
@@ -74,8 +72,6 @@ class CRM_Financial_Page_FinancialBatch extends CRM_Core_Page_Basic {
    * This method is called after the page is created. It checks for the
    * type of action and executes that action.
    * Finally it calls the parent's run method.
-   *
-   * @return void
    */
   public function run() {
     $context = CRM_Utils_Request::retrieve('context', 'String', $this);
index d4352885db1e3911b2bbc1c3d35aaf5598d72340..de0804506b3b4882e099e3a31678ffc4985d24ad 100644 (file)
@@ -29,8 +29,6 @@
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 
 /**
@@ -104,8 +102,6 @@ class CRM_Financial_Page_FinancialType extends CRM_Core_Page_Basic {
    * This method is called after the page is created. It checks for the
    * type of action and executes that action.
    * Finally it calls the parent's run method.
-   *
-   * @return void
    */
   public function run() {
     // get the requested action
@@ -126,9 +122,6 @@ class CRM_Financial_Page_FinancialType extends CRM_Core_Page_Basic {
 
   /**
    * Browse all financial types.
-   *
-   *
-   * @return void
    */
   public function browse() {
     // get all financial types sorted by weight
@@ -167,7 +160,6 @@ class CRM_Financial_Page_FinancialType extends CRM_Core_Page_Basic {
         $action -= CRM_Core_Action::ENABLE;
         $action -= CRM_Core_Action::DISABLE;
         $action -= CRM_Core_Action::DELETE;
-        //continue;
       }
       else {
         if ($dao->is_active) {
index caebcf5760c87e83fe15c0dbe9e2fd1bd659dc91..debb367b59cc540568a512220834e0cc2048e3e5 100644 (file)
@@ -29,8 +29,6 @@
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 
 /**
@@ -93,8 +91,6 @@ class CRM_Financial_Page_FinancialTypeAccount extends CRM_Core_Page {
    * This method is called after the page is created. It checks for the
    * type of action and executes that action.
    * Finally it calls the parent's run method.
-   *
-   * @return void
    */
   public function run() {
     // get the requested action
@@ -119,8 +115,6 @@ class CRM_Financial_Page_FinancialTypeAccount extends CRM_Core_Page {
 
   /**
    * Browse all Financial Type Account data.
-   *
-   * @return void
    */
   public function browse() {
     // get all Financial Type Account data sorted by weight
@@ -166,7 +160,7 @@ class CRM_Financial_Page_FinancialTypeAccount extends CRM_Core_Page {
         $action = array_sum(array_keys($this->links()));
         $links = self::links();
 
-        //CRM-12492
+        // CRM-12492
         if ($dao->account_relationship == $relationTypeId) {
           unset($links[CRM_Core_Action::DELETE]);
         }
@@ -200,8 +194,6 @@ class CRM_Financial_Page_FinancialTypeAccount extends CRM_Core_Page {
    *
    * @param string $action
    *   The action to be invoked.
-   *
-   * @return void
    */
   public function edit($action) {
     // create a simple controller for editing CiviCRM Profile data