Exemplo n.º 1
0
 /**
  * Returns all the column names of this table
  *
  * @return array
  */
 static function &fields()
 {
     if (!self::$_fields) {
         self::$_fields = array('id' => array('name' => 'id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Financial Transaction ID'), 'required' => true), 'from_financial_account_id' => array('name' => 'from_financial_account_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Financial Transaction From Account'), 'description' => 'FK to financial_account table.', 'FKClassName' => 'CRM_Financial_DAO_FinancialAccount', 'html' => array('type' => 'Select'), 'pseudoconstant' => array('table' => 'civicrm_financial_account', 'keyColumn' => 'id', 'labelColumn' => 'name')), 'to_financial_account_id' => array('name' => 'to_financial_account_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Financial Transaction To Account'), 'description' => 'FK to financial_financial_account table.', 'FKClassName' => 'CRM_Financial_DAO_FinancialAccount', 'html' => array('type' => 'Select'), 'pseudoconstant' => array('table' => 'civicrm_financial_account', 'keyColumn' => 'id', 'labelColumn' => 'name')), 'trxn_date' => array('name' => 'trxn_date', 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, 'title' => ts('Financial Transaction Date'), 'description' => 'date transaction occurred', 'default' => 'NULL'), 'total_amount' => array('name' => 'total_amount', 'type' => CRM_Utils_Type::T_MONEY, 'title' => ts('Financial Total Amount'), 'description' => 'amount of transaction', 'required' => true, 'precision' => array(20, 2)), 'fee_amount' => array('name' => 'fee_amount', 'type' => CRM_Utils_Type::T_MONEY, 'title' => ts('Financial Fee Amount'), 'description' => 'actual processor fee if known - may be 0.', 'precision' => array(20, 2)), 'net_amount' => array('name' => 'net_amount', 'type' => CRM_Utils_Type::T_MONEY, 'title' => ts('Financial Net Amount'), 'description' => 'actual funds transfer amount. total less fees. if processor does not report actual fee during transaction, this is set to total_amount.', 'precision' => array(20, 2)), 'currency' => array('name' => 'currency', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Financial Currency'), 'description' => '3 character string, value from config setting or input via user.', 'maxlength' => 3, 'size' => CRM_Utils_Type::FOUR, 'import' => true, 'where' => 'civicrm_financial_trxn.currency', 'headerPattern' => '/cur(rency)?/i', 'dataPattern' => '/^[A-Z]{3}$/', 'export' => true, 'default' => 'NULL', 'html' => array('type' => 'Select'), 'pseudoconstant' => array('table' => 'civicrm_currency', 'keyColumn' => 'name', 'labelColumn' => 'full_name', 'nameColumn' => 'numeric_code')), 'is_payment' => array('name' => 'is_payment', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Payment?'), 'description' => 'Is this entry either a payment or a reversal of a payment?', 'import' => true, 'where' => 'civicrm_financial_trxn.is_payment', 'headerPattern' => '', 'dataPattern' => '', 'export' => true), 'trxn_id' => array('name' => 'trxn_id', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Transaction ID'), 'description' => 'Transaction id supplied by external processor. This may not be unique.', 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE), 'trxn_result_code' => array('name' => 'trxn_result_code', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Transaction result Code'), 'description' => 'processor result code', 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE), 'status_id' => array('name' => 'status_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Financial Transaction Status Id'), 'description' => 'pseudo FK to civicrm_option_value of contribution_status_id option_group', 'import' => true, 'where' => 'civicrm_financial_trxn.status_id', 'headerPattern' => '/status/i', 'dataPattern' => '', 'export' => true, 'pseudoconstant' => array('optionGroupName' => 'contribution_status', 'optionEditPath' => 'civicrm/admin/options/contribution_status')), 'payment_processor_id' => array('name' => 'payment_processor_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Payment Processor'), 'description' => 'Payment Processor for this financial transaction', 'FKClassName' => 'CRM_Financial_DAO_PaymentProcessor'), 'financial_trxn_payment_instrument_id' => array('name' => 'payment_instrument_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Payment Method'), 'description' => 'FK to payment_instrument option group values', 'html' => array('type' => 'Select'), 'pseudoconstant' => array('optionGroupName' => 'payment_instrument', 'optionEditPath' => 'civicrm/admin/options/payment_instrument')), 'financial_trxn_check_number' => array('name' => 'check_number', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Check Number'), 'description' => 'Check number', 'maxlength' => 255, 'size' => 6, 'html' => array('type' => 'Text')));
     }
     return self::$_fields;
 }
Exemplo n.º 2
0
 /**
  * returns all the column names of this table
  *
  * @access public
  * @return array
  */
 static function &fields()
 {
     if (!self::$_fields) {
         self::$_fields = array('id' => array('name' => 'id', 'type' => CRM_Utils_Type::T_INT, 'required' => true), 'from_financial_account_id' => array('name' => 'from_financial_account_id', 'type' => CRM_Utils_Type::T_INT, 'FKClassName' => 'CRM_Financial_DAO_FinancialAccount', 'pseudoconstant' => array('table' => 'civicrm_financial_account', 'keyColumn' => 'id', 'labelColumn' => 'name')), 'to_financial_account_id' => array('name' => 'to_financial_account_id', 'type' => CRM_Utils_Type::T_INT, 'FKClassName' => 'CRM_Financial_DAO_FinancialAccount', 'pseudoconstant' => array('table' => 'civicrm_financial_account', 'keyColumn' => 'id', 'labelColumn' => 'name')), 'trxn_date' => array('name' => 'trxn_date', 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, 'title' => ts('Trxn Date'), 'default' => 'NULL'), 'total_amount' => array('name' => 'total_amount', 'type' => CRM_Utils_Type::T_MONEY, 'title' => ts('Total Amount'), 'required' => true), 'fee_amount' => array('name' => 'fee_amount', 'type' => CRM_Utils_Type::T_MONEY, 'title' => ts('Fee Amount')), 'net_amount' => array('name' => 'net_amount', 'type' => CRM_Utils_Type::T_MONEY, 'title' => ts('Net Amount')), 'currency' => array('name' => 'currency', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Currency'), 'maxlength' => 3, 'size' => CRM_Utils_Type::FOUR, 'import' => true, 'where' => 'civicrm_financial_trxn.currency', 'headerPattern' => '/cur(rency)?/i', 'dataPattern' => '/^[A-Z]{3}$/', 'export' => true, 'default' => 'NULL', 'pseudoconstant' => array('table' => 'civicrm_currency', 'keyColumn' => 'name', 'labelColumn' => 'full_name', 'nameColumn' => 'numeric_code')), 'trxn_id' => array('name' => 'trxn_id', 'type' => CRM_Utils_Type::T_STRING, 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE), 'trxn_result_code' => array('name' => 'trxn_result_code', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Trxn Result Code'), 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE), 'status_id' => array('name' => 'status_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Financial Transaction Status Id'), 'import' => true, 'where' => 'civicrm_financial_trxn.status_id', 'headerPattern' => '/status/i', 'dataPattern' => '', 'export' => true), 'payment_processor_id' => array('name' => 'payment_processor_id', 'type' => CRM_Utils_Type::T_INT, 'FKClassName' => 'CRM_Financial_DAO_PaymentProcessor'), 'financial_trxn_payment_instrument_id' => array('name' => 'payment_instrument_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Payment Instrument'), 'pseudoconstant' => array('optionGroupName' => 'payment_instrument')), 'financial_trxn_check_number' => array('name' => 'check_number', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Check Number'), 'maxlength' => 255, 'size' => CRM_Utils_Type::SIX));
     }
     return self::$_fields;
 }