5 * @copyright CiviCRM LLC https://civicrm.org/licensing
7 * Generated from xml/schema/CRM/Contribute/Contribution.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:66fa0e83ae7eb57a3c2e515c8fdc371c)
13 * Database access object for the Contribution entity.
15 class CRM_Contribute_DAO_Contribution
extends CRM_Core_DAO
{
16 const EXT
= 'civicrm';
17 const TABLE_ADDED
= '1.3';
18 const COMPONENT
= 'CiviContribute';
21 * Static instance to hold the table name.
25 public static $_tableName = 'civicrm_contribution';
28 * Icon associated with this entity.
32 public static $_icon = 'fa-credit-card';
35 * Should CiviCRM log any modifications to this table in the civicrm_log table.
39 public static $_log = TRUE;
42 * Paths for accessing this entity in the UI.
46 protected static $_paths = [
47 'add' => 'civicrm/contribute/add?reset=1&action=add&context=standalone',
48 'view' => 'civicrm/contact/view/contribution?reset=1&action=view&id=[id]',
49 'update' => 'civicrm/contact/view/contribution?reset=1&action=update&id=[id]',
50 'delete' => 'civicrm/contact/view/contribution?reset=1&action=delete&id=[id]',
68 * FK to Financial Type for (total_amount - non_deductible_amount).
72 public $financial_type_id;
75 * The Contribution Page which triggered this contribution
79 public $contribution_page_id;
82 * FK to Payment Instrument
86 public $payment_instrument_id;
89 * Date contribution was received - not necessarily the creation date of the record
96 * Portion of total amount which is NOT tax deductible. Equal to total_amount for non-deductible financial types.
100 public $non_deductible_amount;
103 * Total amount of this contribution. Use market value for non-monetary gifts.
107 public $total_amount;
110 * actual processor fee if known - may be 0.
117 * actual funds transfer amount. total less fees. if processor does not report actual fee during transaction, this is set to total_amount.
124 * unique transaction id. may be processor id, bank id + trans id, or account number + check number... depending on payment_method
131 * unique invoice id, system generated or passed in
138 * Human readable invoice number
142 public $invoice_number;
145 * 3 character string, value from config setting or input via user.
152 * when was gift cancelled
161 public $cancel_reason;
164 * when (if) receipt was sent. populated automatically for online donations w/ automatic receipting
168 public $receipt_date;
171 * when (if) was donor thanked
175 public $thankyou_date;
178 * Origin of this Contribution.
187 public $amount_level;
190 * Conditional foreign key to civicrm_contribution_recur id. Each contribution made in connection with a recurring contribution carries a foreign key to the recurring contribution record. This assumes we can track these processor initiated events.
194 public $contribution_recur_id;
204 public $is_pay_later;
209 public $contribution_status_id;
212 * Conditional foreign key to civicrm_address.id. We insert an address record for each contribution when we have associated billing name and address data.
221 public $check_number;
224 * The campaign for which this contribution has been triggered.
231 * unique credit note id, system generated or passed in
235 public $creditnote_id;
238 * Total tax amount of this contribution.
245 * Stores the date when revenue should be recognized.
249 public $revenue_recognition_date;
252 * Shows this is a template for recurring contributions.
261 public function __construct() {
262 $this->__table
= 'civicrm_contribution';
263 parent
::__construct();
267 * Returns localized title of this entity.
269 * @param bool $plural
270 * Whether to return the plural version of the title.
272 public static function getEntityTitle($plural = FALSE) {
273 return $plural ?
ts('Contributions') : ts('Contribution');
277 * Returns foreign keys and entity references.
280 * [CRM_Core_Reference_Interface]
282 public static function getReferenceColumns() {
283 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
284 Civi
::$statics[__CLASS__
]['links'] = static::createReferenceColumns(__CLASS__
);
285 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'contact_id', 'civicrm_contact', 'id');
286 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'financial_type_id', 'civicrm_financial_type', 'id');
287 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'contribution_page_id', 'civicrm_contribution_page', 'id');
288 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'contribution_recur_id', 'civicrm_contribution_recur', 'id');
289 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'address_id', 'civicrm_address', 'id');
290 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'campaign_id', 'civicrm_campaign', 'id');
291 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
293 return Civi
::$statics[__CLASS__
]['links'];
297 * Returns all the column names of this table
301 public static function &fields() {
302 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
303 Civi
::$statics[__CLASS__
]['fields'] = [
304 'contribution_id' => [
306 'type' => CRM_Utils_Type
::T_INT
,
307 'title' => ts('Contribution ID'),
308 'description' => ts('Contribution ID'),
311 'where' => 'civicrm_contribution.id',
313 'table_name' => 'civicrm_contribution',
314 'entity' => 'Contribution',
315 'bao' => 'CRM_Contribute_BAO_Contribution',
322 'contribution_contact_id' => [
323 'name' => 'contact_id',
324 'type' => CRM_Utils_Type
::T_INT
,
325 'title' => ts('Contact ID'),
326 'description' => ts('FK to Contact ID'),
329 'where' => 'civicrm_contribution.contact_id',
330 'headerPattern' => '/contact(.?id)?/i',
331 'dataPattern' => '/^\d+$/',
333 'table_name' => 'civicrm_contribution',
334 'entity' => 'Contribution',
335 'bao' => 'CRM_Contribute_BAO_Contribution',
337 'FKClassName' => 'CRM_Contact_DAO_Contact',
339 'type' => 'EntityRef',
343 'financial_type_id' => [
344 'name' => 'financial_type_id',
345 'type' => CRM_Utils_Type
::T_INT
,
346 'title' => ts('Financial Type ID'),
347 'description' => ts('FK to Financial Type for (total_amount - non_deductible_amount).'),
348 'where' => 'civicrm_contribution.financial_type_id',
350 'table_name' => 'civicrm_contribution',
351 'entity' => 'Contribution',
352 'bao' => 'CRM_Contribute_BAO_Contribution',
354 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
357 'label' => ts("Financial Type"),
359 'pseudoconstant' => [
360 'table' => 'civicrm_financial_type',
362 'labelColumn' => 'name',
366 'contribution_page_id' => [
367 'name' => 'contribution_page_id',
368 'type' => CRM_Utils_Type
::T_INT
,
369 'title' => ts('Contribution Page ID'),
370 'description' => ts('The Contribution Page which triggered this contribution'),
372 'where' => 'civicrm_contribution.contribution_page_id',
374 'table_name' => 'civicrm_contribution',
375 'entity' => 'Contribution',
376 'bao' => 'CRM_Contribute_BAO_Contribution',
378 'FKClassName' => 'CRM_Contribute_DAO_ContributionPage',
381 'label' => ts("Contribution Page"),
383 'pseudoconstant' => [
384 'table' => 'civicrm_contribution_page',
386 'labelColumn' => 'title',
390 'payment_instrument_id' => [
391 'name' => 'payment_instrument_id',
392 'type' => CRM_Utils_Type
::T_INT
,
393 'title' => ts('Payment Method ID'),
394 'description' => ts('FK to Payment Instrument'),
395 'where' => 'civicrm_contribution.payment_instrument_id',
396 'headerPattern' => '/^payment|(p(ayment\s)?instrument)$/i',
398 'table_name' => 'civicrm_contribution',
399 'entity' => 'Contribution',
400 'bao' => 'CRM_Contribute_BAO_Contribution',
405 'pseudoconstant' => [
406 'optionGroupName' => 'payment_instrument',
407 'optionEditPath' => 'civicrm/admin/options/payment_instrument',
412 'name' => 'receive_date',
413 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
414 'title' => ts('Date Received'),
415 'description' => ts('Date contribution was received - not necessarily the creation date of the record'),
417 'where' => 'civicrm_contribution.receive_date',
418 'headerPattern' => '/receive(.?date)?/i',
419 'dataPattern' => '/^\d{4}-?\d{2}-?\d{2} ?(\d{2}:?\d{2}:?(\d{2})?)?$/',
421 'table_name' => 'civicrm_contribution',
422 'entity' => 'Contribution',
423 'bao' => 'CRM_Contribute_BAO_Contribution',
426 'type' => 'Select Date',
427 'formatType' => 'activityDateTime',
431 'non_deductible_amount' => [
432 'name' => 'non_deductible_amount',
433 'type' => CRM_Utils_Type
::T_MONEY
,
434 'title' => ts('Non-deductible Amount'),
435 'description' => ts('Portion of total amount which is NOT tax deductible. Equal to total_amount for non-deductible financial types.'),
441 'where' => 'civicrm_contribution.non_deductible_amount',
442 'headerPattern' => '/non?.?deduct/i',
443 'dataPattern' => '/^\d+(\.\d{2})?$/',
446 'table_name' => 'civicrm_contribution',
447 'entity' => 'Contribution',
448 'bao' => 'CRM_Contribute_BAO_Contribution',
456 'name' => 'total_amount',
457 'type' => CRM_Utils_Type
::T_MONEY
,
458 'title' => ts('Total Amount'),
459 'description' => ts('Total amount of this contribution. Use market value for non-monetary gifts.'),
466 'where' => 'civicrm_contribution.total_amount',
467 'headerPattern' => '/^total|(.?^am(ou)?nt)/i',
468 'dataPattern' => '/^\d+(\.\d{2})?$/',
470 'table_name' => 'civicrm_contribution',
471 'entity' => 'Contribution',
472 'bao' => 'CRM_Contribute_BAO_Contribution',
480 'name' => 'fee_amount',
481 'type' => CRM_Utils_Type
::T_MONEY
,
482 'title' => ts('Fee Amount'),
483 'description' => ts('actual processor fee if known - may be 0.'),
489 'where' => 'civicrm_contribution.fee_amount',
490 'headerPattern' => '/fee(.?am(ou)?nt)?/i',
491 'dataPattern' => '/^\d+(\.\d{2})?$/',
493 'table_name' => 'civicrm_contribution',
494 'entity' => 'Contribution',
495 'bao' => 'CRM_Contribute_BAO_Contribution',
503 'name' => 'net_amount',
504 'type' => CRM_Utils_Type
::T_MONEY
,
505 'title' => ts('Net Amount'),
506 'description' => ts('actual funds transfer amount. total less fees. if processor does not report actual fee during transaction, this is set to total_amount.'),
512 'where' => 'civicrm_contribution.net_amount',
513 'headerPattern' => '/net(.?am(ou)?nt)?/i',
514 'dataPattern' => '/^\d+(\.\d{2})?$/',
516 'table_name' => 'civicrm_contribution',
517 'entity' => 'Contribution',
518 'bao' => 'CRM_Contribute_BAO_Contribution',
527 'type' => CRM_Utils_Type
::T_STRING
,
528 'title' => ts('Transaction ID'),
529 'description' => ts('unique transaction id. may be processor id, bank id + trans id, or account number + check number... depending on payment_method'),
531 'size' => CRM_Utils_Type
::HUGE
,
533 'where' => 'civicrm_contribution.trxn_id',
534 'headerPattern' => '/tr(ansactio|x)n(.?id)?/i',
536 'table_name' => 'civicrm_contribution',
537 'entity' => 'Contribution',
538 'bao' => 'CRM_Contribute_BAO_Contribution',
546 'name' => 'invoice_id',
547 'type' => CRM_Utils_Type
::T_STRING
,
548 'title' => ts('Invoice Reference'),
549 'description' => ts('unique invoice id, system generated or passed in'),
551 'size' => CRM_Utils_Type
::HUGE
,
553 'where' => 'civicrm_contribution.invoice_id',
554 'headerPattern' => '/invoice(.?id)?/i',
556 'table_name' => 'civicrm_contribution',
557 'entity' => 'Contribution',
558 'bao' => 'CRM_Contribute_BAO_Contribution',
565 'invoice_number' => [
566 'name' => 'invoice_number',
567 'type' => CRM_Utils_Type
::T_STRING
,
568 'title' => ts('Invoice Number'),
569 'description' => ts('Human readable invoice number'),
571 'size' => CRM_Utils_Type
::HUGE
,
573 'where' => 'civicrm_contribution.invoice_number',
574 'headerPattern' => '/invoice(.?number)?/i',
576 'table_name' => 'civicrm_contribution',
577 'entity' => 'Contribution',
578 'bao' => 'CRM_Contribute_BAO_Contribution',
586 'name' => 'currency',
587 'type' => CRM_Utils_Type
::T_STRING
,
588 'title' => ts('Currency'),
589 'description' => ts('3 character string, value from config setting or input via user.'),
591 'size' => CRM_Utils_Type
::FOUR
,
593 'where' => 'civicrm_contribution.currency',
594 'headerPattern' => '/cur(rency)?/i',
595 'dataPattern' => '/^[A-Z]{3}$/i',
598 'table_name' => 'civicrm_contribution',
599 'entity' => 'Contribution',
600 'bao' => 'CRM_Contribute_BAO_Contribution',
605 'pseudoconstant' => [
606 'table' => 'civicrm_currency',
607 'keyColumn' => 'name',
608 'labelColumn' => 'full_name',
609 'nameColumn' => 'name',
610 'abbrColumn' => 'symbol',
614 'contribution_cancel_date' => [
615 'name' => 'cancel_date',
616 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
617 'title' => ts('Cancelled / Refunded Date'),
618 'description' => ts('when was gift cancelled'),
620 'where' => 'civicrm_contribution.cancel_date',
621 'headerPattern' => '/cancel(.?date)?/i',
622 'dataPattern' => '/^\d{4}-?\d{2}-?\d{2} ?(\d{2}:?\d{2}:?(\d{2})?)?$/',
624 'table_name' => 'civicrm_contribution',
625 'entity' => 'Contribution',
626 'bao' => 'CRM_Contribute_BAO_Contribution',
629 'type' => 'Select Date',
630 'formatType' => 'activityDateTime',
635 'name' => 'cancel_reason',
636 'type' => CRM_Utils_Type
::T_TEXT
,
637 'title' => ts('Cancellation / Refund Reason'),
639 'where' => 'civicrm_contribution.cancel_reason',
640 'headerPattern' => '/(cancel.?)?reason/i',
642 'table_name' => 'civicrm_contribution',
643 'entity' => 'Contribution',
644 'bao' => 'CRM_Contribute_BAO_Contribution',
652 'name' => 'receipt_date',
653 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
654 'title' => ts('Receipt Date'),
655 'description' => ts('when (if) receipt was sent. populated automatically for online donations w/ automatic receipting'),
657 'where' => 'civicrm_contribution.receipt_date',
658 'headerPattern' => '/receipt(.?date)?/i',
659 'dataPattern' => '/^\d{4}-?\d{2}-?\d{2} ?(\d{2}:?\d{2}:?(\d{2})?)?$/',
661 'table_name' => 'civicrm_contribution',
662 'entity' => 'Contribution',
663 'bao' => 'CRM_Contribute_BAO_Contribution',
666 'type' => 'Select Date',
667 'formatType' => 'activityDateTime',
672 'name' => 'thankyou_date',
673 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
674 'title' => ts('Thank-you Date'),
675 'description' => ts('when (if) was donor thanked'),
677 'where' => 'civicrm_contribution.thankyou_date',
678 'headerPattern' => '/thank(s|(.?you))?(.?date)?/i',
679 'dataPattern' => '/^\d{4}-?\d{2}-?\d{2} ?(\d{2}:?\d{2}:?(\d{2})?)?$/',
681 'table_name' => 'civicrm_contribution',
682 'entity' => 'Contribution',
683 'bao' => 'CRM_Contribute_BAO_Contribution',
686 'type' => 'Select Date',
687 'formatType' => 'activityDateTime',
691 'contribution_source' => [
693 'type' => CRM_Utils_Type
::T_STRING
,
694 'title' => ts('Contribution Source'),
695 'description' => ts('Origin of this Contribution.'),
697 'size' => CRM_Utils_Type
::HUGE
,
699 'where' => 'civicrm_contribution.source',
700 'headerPattern' => '/source/i',
702 'table_name' => 'civicrm_contribution',
703 'entity' => 'Contribution',
704 'bao' => 'CRM_Contribute_BAO_Contribution',
712 'name' => 'amount_level',
713 'type' => CRM_Utils_Type
::T_TEXT
,
714 'title' => ts('Amount Label'),
716 'where' => 'civicrm_contribution.amount_level',
718 'table_name' => 'civicrm_contribution',
719 'entity' => 'Contribution',
720 'bao' => 'CRM_Contribute_BAO_Contribution',
727 'contribution_recur_id' => [
728 'name' => 'contribution_recur_id',
729 'type' => CRM_Utils_Type
::T_INT
,
730 'title' => ts('Recurring Contribution ID'),
731 'description' => ts('Conditional foreign key to civicrm_contribution_recur id. Each contribution made in connection with a recurring contribution carries a foreign key to the recurring contribution record. This assumes we can track these processor initiated events.'),
732 'where' => 'civicrm_contribution.contribution_recur_id',
734 'table_name' => 'civicrm_contribution',
735 'entity' => 'Contribution',
736 'bao' => 'CRM_Contribute_BAO_Contribution',
738 'FKClassName' => 'CRM_Contribute_DAO_ContributionRecur',
743 'type' => CRM_Utils_Type
::T_BOOLEAN
,
744 'title' => ts('Test'),
746 'where' => 'civicrm_contribution.is_test',
749 'table_name' => 'civicrm_contribution',
750 'entity' => 'Contribution',
751 'bao' => 'CRM_Contribute_BAO_Contribution',
754 'type' => 'CheckBox',
759 'name' => 'is_pay_later',
760 'type' => CRM_Utils_Type
::T_BOOLEAN
,
761 'title' => ts('Is Pay Later'),
763 'where' => 'civicrm_contribution.is_pay_later',
766 'table_name' => 'civicrm_contribution',
767 'entity' => 'Contribution',
768 'bao' => 'CRM_Contribute_BAO_Contribution',
771 'type' => 'CheckBox',
775 'contribution_status_id' => [
776 'name' => 'contribution_status_id',
777 'type' => CRM_Utils_Type
::T_INT
,
778 'title' => ts('Contribution Status ID'),
780 'where' => 'civicrm_contribution.contribution_status_id',
781 'headerPattern' => '/status/i',
784 'table_name' => 'civicrm_contribution',
785 'entity' => 'Contribution',
786 'bao' => 'CRM_Contribute_BAO_Contribution',
791 'pseudoconstant' => [
792 'optionGroupName' => 'contribution_status',
793 'optionEditPath' => 'civicrm/admin/options/contribution_status',
797 'contribution_address_id' => [
798 'name' => 'address_id',
799 'type' => CRM_Utils_Type
::T_INT
,
800 'title' => ts('Contribution Address'),
801 'description' => ts('Conditional foreign key to civicrm_address.id. We insert an address record for each contribution when we have associated billing name and address data.'),
802 'where' => 'civicrm_contribution.address_id',
804 'table_name' => 'civicrm_contribution',
805 'entity' => 'Contribution',
806 'bao' => 'CRM_Contribute_BAO_Contribution',
808 'FKClassName' => 'CRM_Core_DAO_Address',
811 'contribution_check_number' => [
812 'name' => 'check_number',
813 'type' => CRM_Utils_Type
::T_STRING
,
814 'title' => ts('Check Number'),
818 'where' => 'civicrm_contribution.check_number',
819 'headerPattern' => '/check(.?number)?/i',
821 'table_name' => 'civicrm_contribution',
822 'entity' => 'Contribution',
823 'bao' => 'CRM_Contribute_BAO_Contribution',
830 'contribution_campaign_id' => [
831 'name' => 'campaign_id',
832 'type' => CRM_Utils_Type
::T_INT
,
833 'title' => ts('Campaign'),
834 'description' => ts('The campaign for which this contribution has been triggered.'),
836 'where' => 'civicrm_contribution.campaign_id',
838 'table_name' => 'civicrm_contribution',
839 'entity' => 'Contribution',
840 'bao' => 'CRM_Contribute_BAO_Contribution',
842 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
849 'name' => 'creditnote_id',
850 'type' => CRM_Utils_Type
::T_STRING
,
851 'title' => ts('Credit Note ID'),
852 'description' => ts('unique credit note id, system generated or passed in'),
854 'size' => CRM_Utils_Type
::HUGE
,
856 'where' => 'civicrm_contribution.creditnote_id',
857 'headerPattern' => '/creditnote(.?id)?/i',
859 'table_name' => 'civicrm_contribution',
860 'entity' => 'Contribution',
861 'bao' => 'CRM_Contribute_BAO_Contribution',
869 'name' => 'tax_amount',
870 'type' => CRM_Utils_Type
::T_MONEY
,
871 'title' => ts('Tax Amount'),
872 'description' => ts('Total tax amount of this contribution.'),
878 'where' => 'civicrm_contribution.tax_amount',
879 'headerPattern' => '/tax(.?am(ou)?nt)?/i',
880 'dataPattern' => '/^\d+(\.\d{2})?$/',
882 'table_name' => 'civicrm_contribution',
883 'entity' => 'Contribution',
884 'bao' => 'CRM_Contribute_BAO_Contribution',
891 'revenue_recognition_date' => [
892 'name' => 'revenue_recognition_date',
893 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
894 'title' => ts('Revenue Recognition Date'),
895 'description' => ts('Stores the date when revenue should be recognized.'),
897 'where' => 'civicrm_contribution.revenue_recognition_date',
898 'headerPattern' => '/revenue(.?date)?/i',
899 'dataPattern' => '/^\d{4}-?\d{2}-?\d{2} ?(\d{2}:?\d{2}:?(\d{2})?)?$/',
901 'table_name' => 'civicrm_contribution',
902 'entity' => 'Contribution',
903 'bao' => 'CRM_Contribute_BAO_Contribution',
906 'type' => 'Select Date',
907 'formatType' => 'activityDateTime',
912 'name' => 'is_template',
913 'type' => CRM_Utils_Type
::T_BOOLEAN
,
914 'title' => ts('Is a Template Contribution'),
915 'description' => ts('Shows this is a template for recurring contributions.'),
917 'where' => 'civicrm_contribution.is_template',
920 'table_name' => 'civicrm_contribution',
921 'entity' => 'Contribution',
922 'bao' => 'CRM_Contribute_BAO_Contribution',
925 'type' => 'CheckBox',
930 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
932 return Civi
::$statics[__CLASS__
]['fields'];
936 * Return a mapping from field-name to the corresponding key (as used in fields()).
939 * Array(string $name => string $uniqueName).
941 public static function &fieldKeys() {
942 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
943 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
945 return Civi
::$statics[__CLASS__
]['fieldKeys'];
949 * Returns the names of this table
953 public static function getTableName() {
954 return self
::$_tableName;
958 * Returns if this table needs to be logged
962 public function getLog() {
967 * Returns the list of fields that can be imported
969 * @param bool $prefix
973 public static function &import($prefix = FALSE) {
974 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'contribution', $prefix, []);
979 * Returns the list of fields that can be exported
981 * @param bool $prefix
985 public static function &export($prefix = FALSE) {
986 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'contribution', $prefix, []);
991 * Returns the list of indices
993 * @param bool $localize
997 public static function indices($localize = TRUE) {
999 'UI_contrib_payment_instrument_id' => [
1000 'name' => 'UI_contrib_payment_instrument_id',
1002 0 => 'payment_instrument_id',
1004 'localizable' => FALSE,
1005 'sig' => 'civicrm_contribution::0::payment_instrument_id',
1007 'index_total_amount_receive_date' => [
1008 'name' => 'index_total_amount_receive_date',
1010 0 => 'total_amount',
1011 1 => 'receive_date',
1013 'localizable' => FALSE,
1014 'sig' => 'civicrm_contribution::0::total_amount::receive_date',
1017 'name' => 'index_source',
1021 'localizable' => FALSE,
1022 'sig' => 'civicrm_contribution::0::source',
1024 'UI_contrib_trxn_id' => [
1025 'name' => 'UI_contrib_trxn_id',
1029 'localizable' => FALSE,
1031 'sig' => 'civicrm_contribution::1::trxn_id',
1033 'UI_contrib_invoice_id' => [
1034 'name' => 'UI_contrib_invoice_id',
1038 'localizable' => FALSE,
1040 'sig' => 'civicrm_contribution::1::invoice_id',
1042 'index_contribution_status' => [
1043 'name' => 'index_contribution_status',
1045 0 => 'contribution_status_id',
1047 'localizable' => FALSE,
1048 'sig' => 'civicrm_contribution::0::contribution_status_id',
1050 'received_date' => [
1051 'name' => 'received_date',
1053 0 => 'receive_date',
1055 'localizable' => FALSE,
1056 'sig' => 'civicrm_contribution::0::receive_date',
1059 'name' => 'check_number',
1061 0 => 'check_number',
1063 'localizable' => FALSE,
1064 'sig' => 'civicrm_contribution::0::check_number',
1066 'index_creditnote_id' => [
1067 'name' => 'index_creditnote_id',
1069 0 => 'creditnote_id',
1071 'localizable' => FALSE,
1072 'sig' => 'civicrm_contribution::0::creditnote_id',
1075 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;