From: Dave Greenberg Date: Thu, 13 Feb 2014 01:47:26 +0000 (-0800) Subject: CRM-13965 - label, status and display changes for AdditionalPayment form. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0f2c3c030446a5ba559ef8afc0bfaa6ffd7d88c2;p=civicrm-core.git CRM-13965 - label, status and display changes for AdditionalPayment form. ---------------------------------------- * CRM-13965: Record additional payments or refunds for pending-pay later OR partially paid event registrations http://issues.civicrm.org/jira/browse/CRM-13965 --- diff --git a/CRM/Contribute/Form/AdditionalPayment.php b/CRM/Contribute/Form/AdditionalPayment.php index 633434f744..6fb22dfee1 100644 --- a/CRM/Contribute/Form/AdditionalPayment.php +++ b/CRM/Contribute/Form/AdditionalPayment.php @@ -256,7 +256,8 @@ class CRM_Contribute_Form_AdditionalPayment extends CRM_Contribute_Form_Abstract $this->add('textarea', 'receipt_text', ts('Confirmation Message')); // add various dates - $this->addDateTime('trxn_date', ts('Received'), FALSE, array('formatType' => 'activityDateTime')); + $dateLabel = ($this->_refund) ? 'Refund Date' : 'Received Date'; + $this->addDateTime('trxn_date', ts('%1', array(1 => $dateLabel)), FALSE, array('formatType' => 'activityDateTime')); if ($this->_contactId && $this->_id) { if ($this->_component == 'event') { @@ -315,11 +316,11 @@ class CRM_Contribute_Form_AdditionalPayment extends CRM_Contribute_Form_Abstract $errors['total_amount'] = ts('Payment amount cannot be greater than owed amount'); } if ($self->_paymentType == 'refund' && $fields['total_amount'] != abs($self->_refund)) { - $errors['total_amount'] = ts('Refund amount should not differ'); + $errors['total_amount'] = ts('Refund amount must equal refund due amount.'); } $netAmt = $fields['total_amount'] - $fields['fee_amount']; if (!empty($fields['net_amount']) && $netAmt != $fields['net_amount']) { - $errors['net_amount'] = ts('Net amount should be difference of payment amount and fee amount'); + $errors['net_amount'] = ts('Net amount should be equal to the difference between payment amount and fee amount.'); } return $errors; } diff --git a/templates/CRM/Contribute/Form/AdditionalPayment.tpl b/templates/CRM/Contribute/Form/AdditionalPayment.tpl index 959a4fab31..d141b9512a 100644 --- a/templates/CRM/Contribute/Form/AdditionalPayment.tpl +++ b/templates/CRM/Contribute/Form/AdditionalPayment.tpl @@ -73,13 +73,13 @@ {$form.total_amount.label} - {$form.currency.html|crmAddClass:eight} {$form.total_amount.html|crmAddClass:eight} {$paymentAmt} + {$form.currency.html|crmAddClass:eight} {$form.total_amount.html|crmAddClass:eight}  {if $paymentType EQ 'refund'}{ts}Refund Due{/ts}{else}{ts}Balance Owed{/ts}{/if}: {$paymentAmt|crmMoney}
- {ts}Payment Details{/ts} + {if $paymentType EQ 'refund'}{ts}Refund Details{/ts}{else}{ts}Payment Details{/ts}{/if}
@@ -108,7 +108,7 @@ {/if} @@ -119,7 +119,7 @@
{$form.is_email_receipt.label}{$form.is_email_receipt.html}  - {ts 1=$email}Automatically email a receipt for this payment to %1?{/ts} + {ts 1=$email}Automatically email a receipt to %1?{/ts}
{$form.receipt_text.label} - {ts}Enter a message you want included at the beginning of the confirmation email. EXAMPLE: 'Thanks for registering for this event.'{/ts} + {ts}Enter a message you want included at the beginning of the confirmation email.{/ts}
{$form.receipt_text.html|crmAddClass:huge}