[freeside-commits] branch master updated. d263de52c7c09e940bbe9d794dded878b98e789b

Jonathan Prykop jonathan at 420.am
Fri Jul 24 19:09:16 PDT 2015


The branch, master has been updated
       via  d263de52c7c09e940bbe9d794dded878b98e789b (commit)
      from  7b2f4076e6e7b0331904699d9e3a53fc0194eec9 (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 d263de52c7c09e940bbe9d794dded878b98e789b
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Fri Jul 24 21:08:00 2015 -0500

    RT#34279: Sales and payment reporting

diff --git a/httemplate/search/cust_bill_pay_pkg.html b/httemplate/search/cust_bill_pay_pkg.html
index a6738f3..5a3be75 100644
--- a/httemplate/search/cust_bill_pay_pkg.html
+++ b/httemplate/search/cust_bill_pay_pkg.html
@@ -10,6 +10,7 @@
                    'Amount',
                    'By',
                    '#',
+                   'Card Type',
 
                    #payment
                    'Date',
@@ -20,6 +21,7 @@
 
                    # line item
                    'Description',
+                   'Package class',
                    'Location',
                    @post_desc_header,
 
@@ -36,7 +38,10 @@
                          $cust_pay->payby =~ /^(CARD|CHEK)$/
                            ? $cust_pay->paymask : $cust_pay->payinfo;
                        },
-
+                   sub { my $cust_pay = shift->cust_bill_pay->cust_pay;
+                         $cust_pay->payby =~ /^CARD$/
+                           ? cardtype($cust_pay->paymask) : '';
+                       },
                    sub { time2str('%b %d %Y', shift->get('cust_pay_date') ) },
                    sub { shift->cust_bill_pay->cust_pay->otaker },
 
@@ -46,6 +51,7 @@
                            ? $_[0]->get('pkg')      # possibly use override.pkg
                            : $_[0]->get('itemdesc') # but i think this correct
                        },
+                   'classname', #package class
                    $location_sub,
                    @post_desc,
                    'invnum',
@@ -55,10 +61,13 @@
                'sort_fields'  => [
                    'paid',
                    '', #payby
+                   '', #payinfo/paymask
+                   '', #cardtype
                    'cust_pay_date',
                    '', #'otaker',
                    '', #amount
                    '', #line item description
+                   '', #package class
                    '', #location
                    @post_desc_null,
                    'invnum',
@@ -74,6 +83,8 @@
                    '',
                    '',
                    '',
+                   '',
+                   '',
                    @post_desc_null,
                    $ilink,
                    $ilink,
@@ -81,7 +92,10 @@
                          FS::UI::Web::cust_header()
                    ),
                ],
-               'align' => 'rcrrlrlllrrcl'.
+               'align' => 'rcrlrlrlll',
+#original value before cardtype & package were added
+#why are there 13 cols?
+#'rcrrlrlllrrcl'.
                           $post_desc_align.
                           'rr'.
                           FS::UI::Web::cust_aligns(),
@@ -94,6 +108,8 @@
                               '',
                               '',
                               '',
+                              '',
+                              '',
                               @post_desc_null,
                               '',
                               '',
@@ -108,6 +124,8 @@
                               '',
                               '',
                               '',
+                              '',
+                              '',
                               @post_desc_null,
                               '',
                               '',
@@ -415,6 +433,7 @@ if ( $cgi->param('nottax') ) {
 
   $join_pkg =  ' LEFT JOIN cust_pkg USING ( pkgnum )
                  LEFT JOIN part_pkg USING ( pkgpart )
+                 LEFT JOIN pkg_class USING ( classnum )
                  LEFT JOIN part_pkg AS override
                    ON pkgpart_override = override.pkgpart ';
   $join_pkg .= ' LEFT JOIN cust_location USING ( locationnum ) '
@@ -454,7 +473,8 @@ if ( $cgi->param('nottax') ) {
   #warn "neither nottax nor istax parameters specified";
   #same as before?
   $join_pkg =  ' LEFT JOIN cust_pkg USING ( pkgnum )
-                 LEFT JOIN part_pkg USING ( pkgpart ) ';
+                 LEFT JOIN part_pkg USING ( pkgpart ) 
+                 LEFT JOIN pkg_class USING ( classnum )';
 
 }
 
@@ -477,7 +497,7 @@ my @select = ( 'cust_bill_pay_pkg.*',
                'cust_pay._date AS cust_pay_date',
                'cust_bill._date',
              );
-push @select, 'part_pkg.pkg' unless $cgi->param('istax');
+push @select, 'part_pkg.pkg, pkg_class.classname' unless $cgi->param('istax');
 push @select, 'cust_main.custnum',
               FS::UI::Web::cust_sql_fields();
 
@@ -493,10 +513,10 @@ if ( $conf->exists('enable_taxclasses') && ! $cgi->param('istax') ) {
   push @select, 'part_pkg.taxclass'; # or should this use override?
 }
 
-warn "$join_cust_bill_pkg
-                  $join_pkg
-                  $join_pay
-                  $join_cust";
+#warn "$join_cust_bill_pkg
+#                  $join_pkg
+#                  $join_pay
+#                  $join_cust";
 
 my $query = {
   'table'     => 'cust_bill_pay_pkg',

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

Summary of changes:
 httemplate/search/cust_bill_pay_pkg.html |   36 +++++++++++++++++++++++-------
 1 file changed, 28 insertions(+), 8 deletions(-)




More information about the freeside-commits mailing list