[freeside-commits] branch master updated. baba7f31551483f9629e1afb42efd4d6b7f6e7a5

Mitch Jackson mitch at freeside.biz
Fri Jun 29 12:38:25 PDT 2018


The branch, master has been updated
       via  baba7f31551483f9629e1afb42efd4d6b7f6e7a5 (commit)
       via  7fd62888579944b840c5d7fc8ff980bb815512e1 (commit)
      from  e2ee874843b19f6c5221f5ce0af90979dba34e57 (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 baba7f31551483f9629e1afb42efd4d6b7f6e7a5
Author: Mitch Jackson <mitch at freeside.biz>
Date:   Fri Jun 29 14:36:45 2018 -0500

    RT# 31208,80543 Issue converting quotation

diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index 578e5a192..1b3df0066 100644
--- a/FS/FS/Template_Mixin.pm
+++ b/FS/FS/Template_Mixin.pm
@@ -3139,9 +3139,9 @@ sub _items_fee {
   my @cust_bill_pkg = grep { $_->feepart } $self->cust_bill_pkg;
   my $escape_function = $options{escape_function};
 
-  my $locale = $self->quotationnum
-             ? $self->prospect_main->locale
-             : $self->cust_main->locale;
+  my $locale = $self->cust_main
+             ? $self->cust_main->locale
+             : $self->prospect_main->locale;
 
   my @items;
   foreach my $cust_bill_pkg (@cust_bill_pkg) {

commit 7fd62888579944b840c5d7fc8ff980bb815512e1
Author: Mitch Jackson <mitch at freeside.biz>
Date:   Fri Jun 29 14:01:36 2018 -0500

    RT# 31208 Fix Browse Discounts sorting error

diff --git a/httemplate/browse/discount.html b/httemplate/browse/discount.html
index 9b2298ae4..deb98c3c7 100644
--- a/httemplate/browse/discount.html
+++ b/httemplate/browse/discount.html
@@ -1,22 +1,18 @@
 <% include( 'elements/browse.html',
                  'title'       => 'Discounts',
                  'name'        => 'discounts',
-                 'menubar'     => [ 'Add a new discount' =>
-                                      $p.'edit/discount.html',
-                                  ],
-                 'query'       => { 'table' => 'discount', },
+                 'menubar'     => \@menubar,
+                 'query'       => \%query,
+                 'order_by_sql' => { description => 'discountnum' },
                  'count_query' => 'SELECT COUNT(*) FROM discount',
                  'disableable' => 1,
                  'disabled_statuspos' => 1,
-                 'header'      => [ 'Name', 'Comment', 'Class', 'Discount', ],
+                 'header'      => [ 'Name', 'Class', 'Discount', ],
                  'fields'      => [ 'name',
-                                    'comment',
                                     'classname',
                                     'description',
                                   ],
-                 'links'       => [ $link,
-                                    $link,
-                                  ],
+                 'links'       => \@links
              )
 %>
 <%init>
@@ -24,6 +20,20 @@
 die "access denied"
   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
 
-my $link = [ "${p}edit/discount.html?", 'discountnum' ];
+my @links = (
+  [ "${p}edit/discount.html?", 'discountnum' ],
+  [ "${p}edit/discount_class.html?", 'classnum' ],
+);
+
+my %query = (
+  select => 'discount.*, discount_class.*',
+  table => 'discount',
+  addl_from => 'LEFT JOIN discount_class USING(classnum)',
+);
+
+my @menubar = (
+  'Add a new discount' => $p.'edit/discount.html',
+  'Discount classes' => $p.'browse/discount_class.html',
+);
 
 </%init>

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

Summary of changes:
 FS/FS/Template_Mixin.pm         |  6 +++---
 httemplate/browse/discount.html | 30 ++++++++++++++++++++----------
 2 files changed, 23 insertions(+), 13 deletions(-)




More information about the freeside-commits mailing list