From a329cc3179d3d5bb8eee9692b88bb508f976323a Mon Sep 17 00:00:00 2001 From: Deon George Date: Tue, 4 Mar 2014 16:17:01 +1100 Subject: [PATCH] Added Direct Debit Amount to easily identify excess charges --- modules/payment/classes/Payment/Bulk/Ezypay.php | 2 +- modules/service/classes/Controller/Reseller/Service.php | 1 + modules/service/classes/Model/Service/Billing.php | 6 ++++++ modules/service/views/service/user/view.php | 4 ++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/payment/classes/Payment/Bulk/Ezypay.php b/modules/payment/classes/Payment/Bulk/Ezypay.php index 01d80532..215bd9b3 100644 --- a/modules/payment/classes/Payment/Bulk/Ezypay.php +++ b/modules/payment/classes/Payment/Bulk/Ezypay.php @@ -61,7 +61,7 @@ class Payment_Bulk_Ezypay { $po->checkout_data = array('transid'=>$array[2].':'.$array[3]); $po->date_payment = strtotime(str_replace('/','-',$array[8])); - $sbo = $po->account->service_billing->where('plugin_data','=',$array[3])->find(); + $sbo = $po->account->service_billing->where('checkout_data','=',$array[3])->find(); if (! $sbo->loaded()) throw HTTP_Exception::factory(501,'No Service Billing Data for :aid (:pd)?',array(':aid'=>$aid,':pd'=>$array[3])); diff --git a/modules/service/classes/Controller/Reseller/Service.php b/modules/service/classes/Controller/Reseller/Service.php index bee13ef7..b4ede82b 100644 --- a/modules/service/classes/Controller/Reseller/Service.php +++ b/modules/service/classes/Controller/Reseller/Service.php @@ -102,6 +102,7 @@ class Controller_Reseller_Service extends Controller_Service { 'account->name()'=>'Customer', 'date_next_invoice'=>'Next Invoice', 'due(TRUE)'=>'Due Invoices', + 'service_billing->display("checkout_amount")'=>'Auto Pay', )) ->prepend(array( 'id'=>array('url'=>URL::link('user','service/view/')), diff --git a/modules/service/classes/Model/Service/Billing.php b/modules/service/classes/Model/Service/Billing.php index 6f0503ff..4376c19a 100644 --- a/modules/service/classes/Model/Service/Billing.php +++ b/modules/service/classes/Model/Service/Billing.php @@ -16,5 +16,11 @@ class Model_Service_Billing extends ORM_OSB { protected $_has_one = array( 'checkout'=>array('far_key'=>'checkout_id','foreign_key'=>'id'), ); + + protected $_display_filters = array( + 'checkout_amount'=>array( + array('Currency::display',array(':value')), + ), + ); } ?> diff --git a/modules/service/views/service/user/view.php b/modules/service/views/service/user/view.php index 3e33d91d..d2347752 100644 --- a/modules/service/views/service/user/view.php +++ b/modules/service/views/service/user/view.php @@ -56,6 +56,10 @@
Direct Payment
service_billing->checkout->display('name'); ?>
+ service_billing->checkout_amount)) : ?> +
Standard Amount
+
service_billing->display('checkout_amount'); ?>
+