[freeside-commits] freeside/httemplate/edit part_bill_event.cgi, 1.36, 1.37 part_pkg.cgi, 1.63, 1.64

Ivan,,, ivan at wavetail.420.am
Sun Jan 21 13:45:31 PST 2007


Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail:/tmp/cvs-serv32190/httemplate/edit

Modified Files:
	part_bill_event.cgi part_pkg.cgi 
Log Message:
Have lineitem-specific applications happen in all cases; add weightsto control

Index: part_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/part_pkg.cgi,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- part_pkg.cgi	18 Dec 2006 11:01:14 -0000	1.63
+++ part_pkg.cgi	21 Jan 2007 21:45:29 -0000	1.64
@@ -117,23 +117,40 @@
       <INPUT TYPE="checkbox" NAME="recurtax" VALUE="Y" <% $hashref->{recurtax} eq 'Y' ? ' CHECKED' : '' %>>
     </TD>
   </TR>
+
 % my $conf = new FS::Conf; 
 % if ( $conf->exists('enable_taxclasses') ) { 
 
-
   <TR>
     <TD align="right">Tax class</TD>
     <TD>
       <% include('/elements/select-taxclass.html', $hashref->{taxclass} ) %>
     </TD>
   </TR>
-% } else { 
 
+% } else { 
 
   <% include('/elements/select-taxclass.html', $hashref->{taxclass} ) %>
+
 % } 
 
+</TABLE>
+<BR>
 
+Line-item revenue recognition
+<% ntable("#cccccc", 2) %>
+% tie my %weight, 'Tie::IxHash',
+%   'pay_weight'    => 'Payment',
+%   'credit_weight' => 'Credit'
+% ;
+% foreach my $weight (keys %weight) {
+    <TR>
+      <TD ALIGN="right"><% $weight{$weight} %> weight</TD>
+      <TD>
+        <INPUT TYPE="text" NAME="<% $weight %>" SIZE=6 VALUE=<% $hashref->{$weight} || 0 %>>
+      </TD>
+    </TR>
+% }
 </TABLE>
 
 </TD></TR></TABLE>
@@ -250,7 +267,8 @@
 %  'form_action'    => 'process/part_pkg.cgi',
 %  'form_elements'  => \@form_elements,
 %  'form_text'      => [ qw(pkg comment promo_code clone pkgnum pkgpart),
-%                        @fixups
+%                        qw(pay_weight credit_weight), #keys(%weight),
+%                        @fixups,
 %                      ],
 %  'form_checkbox'  => [ qw(setuptax recurtax disabled) ],
 %  'form_radio'     => \@form_radio,

Index: part_bill_event.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/part_bill_event.cgi,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- part_bill_event.cgi	4 Jan 2007 05:49:41 -0000	1.36
+++ part_bill_event.cgi	21 Jan 2007 21:45:29 -0000	1.37
@@ -402,7 +402,7 @@
 %
 %  'apply' => {
 %    'name' => 'Apply unapplied payments and credits',
-%    'code' => '$cust_main->apply_payments; $cust_main->apply_credits; "";',
+%    'code' => '$cust_main->apply_payments_and_credits; "";',
 %    'weight'  => 70,
 %  },
 %



More information about the freeside-commits mailing list