CRM-21357 Added default start date on membership batch entry form
authorEdsel <edsel.lopez@jmaconsulting.biz>
Thu, 26 Oct 2017 11:46:59 +0000 (17:16 +0530)
committerEdsel <edsel.lopez@jmaconsulting.biz>
Thu, 26 Oct 2017 11:46:59 +0000 (17:16 +0530)
----------------------------------------
* CRM-21357: Start date is NULL when membership batch entry is processed
  https://issues.civicrm.org/jira/browse/CRM-21357

templates/CRM/Batch/Form/Entry.tpl

index 5a954c6ef12d70ec60d9a576c72c18e5aca5154e..573db8755f5cccb0f27faebe1f013009ee25bf98 100644 (file)
@@ -372,6 +372,7 @@ function updateContactInfo(blockNo, prefix) {
             //get the information on membership type
             var membershipTypeId = data.values[0].membership_type_id;
             var membershipJoinDate = data.values[0].join_date;
+            var membershipStartDate = data.values[0].start_date;
             CRM.api('MembershipType', 'get', {
                 'sequential': '1',
                 'id': membershipTypeId
@@ -382,6 +383,7 @@ function updateContactInfo(blockNo, prefix) {
                 cj('select[id="field_' + blockNo + '_membership_type_0"]').val(memTypeContactId).change();
                 cj('select[id="field_' + blockNo + '_membership_type_1"]').val(membershipTypeId).change();
                 cj('#field_' + blockNo + '_' + 'join_date').val(membershipJoinDate).trigger('change');
+                cj('#field_' + blockNo + '_' + 'membership_start_date').val(membershipStartDate).trigger('change');
               }
               });
           }