From 0f2c3c030446a5ba559ef8afc0bfaa6ffd7d88c2 Mon Sep 17 00:00:00 2001 From: Dave Greenberg Date: Wed, 12 Feb 2014 17:47:26 -0800 Subject: [PATCH] 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 --- CRM/Contribute/Form/AdditionalPayment.php | 7 ++++--- templates/CRM/Contribute/Form/AdditionalPayment.tpl | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) 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 @@ -- 2.25.1
{$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}