[freeside-commits] branch FREESIDE_3_BRANCH updated. 774e2090dfca61fd120c73c06bfd8e02e5e7f5e3

Ivan ivan at 420.am
Fri Mar 28 11:31:44 PDT 2014


The branch, FREESIDE_3_BRANCH has been updated
       via  774e2090dfca61fd120c73c06bfd8e02e5e7f5e3 (commit)
      from  b36a927104a04693ad41fa0ef4b999e212fb971b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 774e2090dfca61fd120c73c06bfd8e02e5e7f5e3
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Fri Mar 28 11:31:44 2014 -0700

    fix UI nit for late fee definitions, RT#25899

diff --git a/httemplate/edit/part_fee.html b/httemplate/edit/part_fee.html
index 080b9cd..20defe5 100644
--- a/httemplate/edit/part_fee.html
+++ b/httemplate/edit/part_fee.html
@@ -67,10 +67,10 @@ foreach (@locales) {
 $n = 0;
 my %layer_fields = (
   'charged' => [
-    'percent' => { label => 'Fraction of invoice total', type    => 'percentage', },
+    'charged_percent' => { label => 'Fraction of invoice total', type    => 'percentage', },
   ],
   'owed' => [
-    'percent' => { label => 'Fraction of balance', type    => 'percentage', },
+    'owed_percent' => { label => 'Fraction of balance', type    => 'percentage', },
   ],
   'usage' => [
     'usage'   => { type => 'part_fee_usage' }
@@ -106,7 +106,7 @@ my @fields = (
                  'recur'  => 'a recurring charge' },
   },
 
-  { type => 'justtitle', value => 'Fee calculation' },
+  { type => 'tablebreak-tr-title', value => 'Fee calculation' },
   { field   => 'amount',  type    => 'money', },
 
   { field   => 'basis',
@@ -119,8 +119,8 @@ my @fields = (
     layer_values_callback => sub {
       my ($cgi, $obj) = @_;
       {
-        'charged' => { percent => $obj->percent },
-        'owed'    => { percent => $obj->percent },
+        'charged' => { charged_percent => $obj->percent },
+        'owed'    => { owed_percent => $obj->percent },
         'usage'   => { usage => [ $obj->part_fee_usage ] },
       }
     },
@@ -131,7 +131,7 @@ my @fields = (
     type    => 'checkbox',
     value   => 'Y' },
 
-  { type => 'justtitle', value => 'Taxation' },
+  { type => 'tablebreak-tr-title', value => 'Taxation' },
 
   @tax_fields,
 );
diff --git a/httemplate/edit/process/part_fee.html b/httemplate/edit/process/part_fee.html
old mode 100644
new mode 100755
index 1fca231..075cdee
--- a/httemplate/edit/process/part_fee.html
+++ b/httemplate/edit/process/part_fee.html
@@ -17,6 +17,7 @@
                                            ],
                            },
                          ],
+  'precheck_callback'=> \&precheck,
 &>
 <%init>
 
@@ -26,4 +27,13 @@ my $acl_edit_global = $curuser->access_right('Edit global fee definitions');
 die "access denied"
   unless $acl_edit or $acl_edit_global;
 
+sub precheck {
+  my $cgi = shift;
+  if ( $cgi->param('basis') =~ /^(\w+)$/ ) {
+    my $basis = $1;
+    $cgi->param('percent', $cgi->param($basis.'_percent') );
+  }
+  ''; #no error
+}
+
 </%init>

-----------------------------------------------------------------------

Summary of changes:
 httemplate/edit/part_fee.html         |   12 ++++++------
 httemplate/edit/process/part_fee.html |   10 ++++++++++
 2 files changed, 16 insertions(+), 6 deletions(-)
 mode change 100644 => 100755 httemplate/edit/process/part_fee.html




More information about the freeside-commits mailing list