Skip to content

Commit

Permalink
Merge pull request #38 from compucorp/update-report-hmrc
Browse files Browse the repository at this point in the history
remove required criteria for non-mandatory fields in report
  • Loading branch information
guanhuan authored Oct 18, 2016
2 parents c9d5aef + 43759e1 commit a76891c
Showing 1 changed file with 45 additions and 36 deletions.
81 changes: 45 additions & 36 deletions CRM/Civigiftaid/Report/Form/Contribute/GiftAid.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,17 @@ public function __construct() {
'filters' =>
array(
'batch_id' => array(
'title' => 'Batch',
'title' => ts('Batch'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Civigiftaid_Utils_Contribution::getBatchIdTitle('id desc'),
),
),
'fields' => array(
'batch_id' => array(
'name' => 'batch_id',
'title' => 'Batch ID',
'title' => ts('Batch ID'),
'no_display' => TRUE,
'required' => TRUE
'required' => TRUE,
)
)
),
Expand All @@ -75,19 +75,19 @@ public function __construct() {
'fields' => array(
'prefix_id' => array(
'name' => 'prefix_id',
'title' => 'Title',
'title' => ts('Title'),
'no_display' => FALSE,
'required' => TRUE,
),
'first_name' => array(
'name' => 'first_name',
'title' => 'First Name',
'title' => ts('First Name'),
'no_display' => FALSE,
'required' => TRUE,
),
'last_name' => array(
'name' => 'last_name',
'title' => 'Last Name',
'title' => ts('Last Name'),
'no_display' => FALSE,
'required' => TRUE,
),
Expand All @@ -99,19 +99,17 @@ public function __construct() {
'fields' => array(
'contribution_id' => array(
'name' => 'id',
'title' => 'Payment No',
'no_display' => FALSE,
'required' => TRUE,
'title' => ts('Payment No'),
),
'contact_id' => array(
'name' => 'contact_id',
'title' => 'Donor Name',
'title' => ts('Donor Name'),
'no_display' => FALSE,
'required' => FALSE,
'required' => TRUE,
),
'receive_date' => array(
'name' => 'receive_date',
'title' => 'Contribution Date',
'title' => ts('Donation Date'),
'no_display' => FALSE,
'required' => TRUE,
),
Expand All @@ -123,9 +121,9 @@ public function __construct() {
'fields' => array(
'financial_type_id' => array(
'name' => 'id',
'title' => 'Financial Type No',
'title' => ts('Financial Type No'),
'no_display' => TRUE,
'required' => TRUE,
'required' => FALSE,
),
),
),
Expand All @@ -135,11 +133,30 @@ public function __construct() {
'grouping' => 'contact-fields',
'fields' =>
array(
'street_address' => NULL,
'city' => NULL,
'state_province_id' => array('title' => ts('State/Province'),),
'country_id' => array('title' => ts('Country'),),
'postal_code' => NULL,
'street_address' => array(
'name' => 'street_address',
'title' => ts('Street Address'),
'no_display' => FALSE,
'required' => TRUE,
),
'city' => array(
'name' => 'city',
'title' => ts('City'),
),
'state_province_id' => array(
'name' => 'state_province_id',
'title' => ts('State/Province'),
),
'country_id' => array(
'name' => 'country_id',
'title' => ts('Country'),
),
'postal_code' => array(
'name' => 'postal_code',
'title' => ts('Postcode'),
'no_display' => FALSE,
'required' => TRUE,
),
),
),
'civicrm_line_item' =>
Expand All @@ -148,35 +165,27 @@ public function __construct() {
'fields' => array(
'id' => array(
'name' => 'id',
'title' => 'Line Item No',
'no_display' => FALSE,
'required' => TRUE,
'title' => ts('Line Item No'),
),
'amount' => array(
'name' => 'line_total',
'title' => 'Line Total',
'title' => ts('Amount'),
'no_display' => FALSE,
'required' => TRUE,
'type' => CRM_Utils_Type::T_MONEY
),
'quantity' => array(
'name' => 'qty',
'title' => 'Qty',
'no_display' => FALSE,
'required' => TRUE,
'title' => ts('Quantity'),
'type' => CRM_Utils_Type::T_INT
),
'entity_table' => array(
'name' => 'entity_table',
'title' => 'Item',
'no_display' => FALSE,
'required' => TRUE,
'title' => ts('Item'),
),
'label' => array(
'name' => 'label',
'title' => 'Description',
'no_display' => FALSE,
'required' => TRUE,
'title' => ts('Description'),
),
),
)
Expand Down Expand Up @@ -471,15 +480,15 @@ private function reorderColumns() {
'donor name',
'item',
'description',
'contribution date',
'donation date',
'street address',
'city',
'county',
'country',
'postal code',
'postcode',
'eligible for gift aid?',
'qty',
'line total',
'quantity',
'amount',
'gift aid amount',
'batch name'
);
Expand Down

0 comments on commit a76891c

Please sign in to comment.