[freeside-commits] branch FREESIDE_3_BRANCH updated. 4ffd142dae5358de567d0d9cc07fd1be0b62f1be

Ivan ivan at 420.am
Tue Aug 20 16:56:48 PDT 2013


The branch, FREESIDE_3_BRANCH has been updated
       via  4ffd142dae5358de567d0d9cc07fd1be0b62f1be (commit)
      from  5a3704ecdaa3a5a78e8a46dffcbeb86a6f1148d4 (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 4ffd142dae5358de567d0d9cc07fd1be0b62f1be
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Aug 20 16:56:47 2013 -0700

    continue sales person work: customer and package selection, commissions, reporting.  RT#23402

diff --git a/httemplate/browse/sales.html b/httemplate/browse/sales.html
index d2b6cfe..d7375b9 100644
--- a/httemplate/browse/sales.html
+++ b/httemplate/browse/sales.html
@@ -65,13 +65,19 @@ push @fields, sub {
           #my $param = 'classnum'. $sales_pkg_class{classnum};
 
           [
+            { align => 'left',
+              data  => encode_entities(
+                         $_ ? $_->classname : mt('(no package class)')
+                       ). ': ',
+            },
             { align => 'right',
               data  => ($sales_pkg_class->commission_percent || 0). '%',
             },
             { align => 'left',
-              data  => ' '. encode_entities(
-                         $_ ? $_->classname : mt('(no package class)')
-                       ),
+              data  =>
+                $sales_pkg_class->commission_duration
+                  ? ' for '. $sales_pkg_class->commission_duration. ' months'
+                  : ''
             },
           ];
 
diff --git a/httemplate/edit/process/sales.html b/httemplate/edit/process/sales.html
index 1bb1797..4befc02 100644
--- a/httemplate/edit/process/sales.html
+++ b/httemplate/edit/process/sales.html
@@ -26,6 +26,7 @@ my $process_sales_pkg_class = sub {
     my $param = 'classnum'. $sales_pkg_class{classnum};
 
     $sales_pkg_class->commission_percent( $cgi->param($param) );
+    $sales_pkg_class->commission_duration( $cgi->param($param.'_duration') );
 
     my $method = $sales_pkg_class->salespkgclassnum ? 'replace' : 'insert';
 
diff --git a/httemplate/edit/sales.html b/httemplate/edit/sales.html
index 90f651d..5a7a49e 100755
--- a/httemplate/edit/sales.html
+++ b/httemplate/edit/sales.html
@@ -19,9 +19,10 @@
 
                               '<BR>'.
                               include('/elements/table-commissions.html',
-                                        'source_obj'   => $sales,
-                                        'link_table'   => 'sales_pkg_class',
+                                        'source_obj'    => $sales,
+                                        'link_table'    => 'sales_pkg_class',
                                         #'target_table' => 'pkg_class',
+                                        'show_duration' => 1,
                                      );
                             },
 &>
diff --git a/httemplate/elements/table-commissions.html b/httemplate/elements/table-commissions.html
index ce5808d..b972ed9 100644
--- a/httemplate/elements/table-commissions.html
+++ b/httemplate/elements/table-commissions.html
@@ -18,6 +18,8 @@
 %   my $param = 'classnum'. $thing_pkg_class{classnum};
 
     <TR>
+      <TD><% $pkg_class ? $pkg_class->classname : mt('(no package class)') |h %>: 
+      </TD>
       <TD><INPUT TYPE      = "text"
                  NAME      = "<% $param %>"
                  VALUE     = "<% $cgi->param($param) || $thing_pkg_class->commission_percent |h %>"
@@ -25,7 +27,28 @@
                  MAXLENGTH = 7
           >%
       </TD>
-      <TD><% $pkg_class ? $pkg_class->classname : mt('(no package class)') |h %>
+%     if ( $opt{'show_duration'} ) {
+        <TD>
+          for <INPUT TYPE = "text"
+                        NAME = "<% $param %>_duration"
+                        VALUE = "<% $cgi->param($param.'_duration') || $thing_pkg_class->commission_duration |h %>"
+                 SIZE      = 2
+                 MAXLENGTH = 3
+              >
+          months
+        </TD>
+%     }
+    </TR>
+
+% }
+
+% if ( $opt{'show_duration'} ) {
+
+    <TR>
+      <TD COLSPAN=2>
+      </TD>
+      <TD>
+        <FONT SIZE="-2"><I>blank for no time limit</I></FONT>
       </TD>
     </TR>
 

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

Summary of changes:
 httemplate/browse/sales.html               |   12 +++++++++---
 httemplate/edit/process/sales.html         |    1 +
 httemplate/edit/sales.html                 |    5 +++--
 httemplate/elements/table-commissions.html |   25 ++++++++++++++++++++++++-
 4 files changed, 37 insertions(+), 6 deletions(-)




More information about the freeside-commits mailing list