[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[5301] addons/1.3/report_framework/trunk/patches/ reporting_unified.patch



Revision: 5301
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5301&view=rev
Author:   einhverfr
Date:     2012-12-03 10:35:03 +0000 (Mon, 03 Dec 2012)
Log Message:
-----------
Adding accidently omitted patch

Added Paths:
-----------
    addons/1.3/report_framework/trunk/patches/reporting_unified.patch

Added: addons/1.3/report_framework/trunk/patches/reporting_unified.patch
===================================================================
--- addons/1.3/report_framework/trunk/patches/reporting_unified.patch	                        (rev 0)
+++ addons/1.3/report_framework/trunk/patches/reporting_unified.patch	2012-12-03 10:35:03 UTC (rev 5301)
@@ -0,0 +1,96 @@
+Index: LedgerSMB/DBObject.pm
+===================================================================
+--- LedgerSMB/DBObject.pm	(revision 5294)
++++ LedgerSMB/DBObject.pm	(working copy)
+@@ -12,7 +12,7 @@
+ 
+ =over
+ 
+-=item new ($class, base => $LedgerSMB::hash)
++=item new ($class, base => $LedgerSMB::hash, [ignore_base_type => $bool])
+ 
+ This is the base constructor for all child classes.  It must be used with base
+ argument because this is necessary for database connectivity and the like.
+@@ -61,6 +61,7 @@
+     my %args  = (ref($_[0]) eq 'HASH')? %{$_[0]}: @_;
+     my $base  = $args{base};
+     my $mode  = $args{copy};
++    my $ignore_base_type = $args{ignore_base_type};
+     $mode = '' if (!defined $mode);
+     my $self  = bless {}, $class;
+     my @mergelist;
+@@ -72,7 +73,7 @@
+     else {
+         @mergelist = ();
+     }
+-    if ( !$base->isa('LedgerSMB') ) {
++    if ( !$base->isa('LedgerSMB') and !$ignore_base_type) {
+         $self->error("Constructor called without LedgerSMB object arg");
+     }
+ 
+@@ -89,6 +90,9 @@
+     else {
+         $self->merge($base);
+     }
++    if ($ignore_base_type){
++        $self->{dbh} = $LedgerSMB::App_State::DBH;
++    }
+     $self->__validate__();
+     $self->{_order_method} = {};
+     return $self;
+Index: LedgerSMB/Template/HTML.pm
+===================================================================
+--- LedgerSMB/Template/HTML.pm	(revision 5294)
++++ LedgerSMB/Template/HTML.pm	(working copy)
+@@ -63,10 +63,15 @@
+ sub preprocess {
+     my $rawvars = shift;
+     my $vars;
++    if (eval {$rawvars->can('to_output')}){
++        #$rawvars = $rawvars->to_output;
++        warn $rawvars->to_output;
++    }
+     my $type = ref $rawvars;
+ 
+     return $rawvars if $type =~ /^LedgerSMB::Locale/;
+     return unless defined $rawvars;
++    my $output;
+     if ( $type eq 'ARRAY' ) {
+         for (@{$rawvars}) {
+             push @{$vars}, preprocess( $_ );
+Index: bin/aa.pl
+===================================================================
+--- bin/aa.pl	(revision 5294)
++++ bin/aa.pl	(working copy)
+@@ -1050,6 +1050,7 @@
+     }
+     if ($form->{id}){
+         print qq|
++<a href="pnl.pl?action=generate_income_statement&pnl_type=invoice&id=$form->{id}">[| . $locale->text('Profit/Loss') . qq|]</a><br />
+ <table width="100%">
+ <tr class="listtop">
+ <th colspan="4">| . $locale->text('Attached and Linked Files') . qq|</th>
+Index: bin/ir.pl
+===================================================================
+--- bin/ir.pl	(revision 5294)
++++ bin/ir.pl	(working copy)
+@@ -903,6 +903,7 @@
+     if ($form->{id}){
+         IR->get_files($form, $locale);
+         print qq|
++<a href="pnl.pl?action=generate_income_statement&pnl_type=invoice&id=$form->{id}">[| . $locale->text('Profit/Loss') . qq|]</a><br />
+ <table width="100%">
+ <tr class="listtop">
+ <th colspan="4">| . $locale->text('Attached and Linked Files') . qq|</th>
+Index: bin/is.pl
+===================================================================
+--- bin/is.pl	(revision 5294)
++++ bin/is.pl	(working copy)
+@@ -1024,6 +1024,7 @@
+     if ($form->{id}){
+         IS->get_files($form, $locale);
+         print qq|
++<a href="pnl.pl?action=generate_income_statement&pnl_type=invoice&id=$form->{id}">[| . $locale->text('Profit/Loss') . qq|]</a><br />
+ <table width="100%">
+ <tr class="listtop">
+ <th colspan="4">| . $locale->text('Attached and Linked Files') . qq|</th>

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.