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

SF.net SVN: ledger-smb:[3645] trunk



Revision: 3645
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3645&view=rev
Author:   einhverfr
Date:     2011-08-09 21:01:41 +0000 (Tue, 09 Aug 2011)

Log Message:
-----------
Removing option to print checks on AR/AP transaction screen, closing bug 3380253
Now all checks will have to be printed through check printing interfaces
Also minor fixes to Reconciliation documentation and customization hooks

Modified Paths:
--------------
    trunk/bin/aa.pl
    trunk/bin/arapprn.pl
    trunk/scripts/recon.pl

Modified: trunk/bin/aa.pl
===================================================================
--- trunk/bin/aa.pl	2011-08-07 23:28:59 UTC (rev 3644)
+++ trunk/bin/aa.pl	2011-08-09 21:01:41 UTC (rev 3645)
@@ -192,17 +192,6 @@
     $form->{selectformname} =
       qq|<option value="transaction">| . $locale->text('Transaction');
 
-    if ( ${LedgerSMB::Sysconfig::latex} ) {
-        if ( $form->{ARAP} eq 'AR' ) {
-            $form->{selectformname} .= qq|
-  <option value="receipt">| . $locale->text('Receipt');
-        }
-        else {
-            $form->{selectformname} .= qq|
-  <option value="check">| . $locale->text('Check');
-        }
-    }
-
     # currencies
     @curr = split /:/, $form->{currencies};
     $form->{defaultcurrency} = $curr[0];

Modified: trunk/bin/arapprn.pl
===================================================================
--- trunk/bin/arapprn.pl	2011-08-07 23:28:59 UTC (rev 3644)
+++ trunk/bin/arapprn.pl	2011-08-09 21:01:41 UTC (rev 3645)
@@ -157,199 +157,7 @@
 
 }
 
-sub print_check {
-    my ( $old_form, $i ) = @_;
 
-    $display_form =
-      ( $form->{display_form} ) ? $form->{display_form} : "display_form";
-
-    if ( $form->{"paid_$i"} ) {
-        @a = ();
-
-        if ( exists $form->{longformat} ) {
-            $form->{"datepaid_$i"} =
-              $locale->date( \%myconfig, $form->{"datepaid_$i"},
-                $form->{longformat} );
-        }
-
-        push @a, "source_$i", "memo_$i";
-        $form->format_string(@a);
-    }
-
-    $form->{amount} = $form->{"paid_$i"};
-
-    if (   ( $form->{formname} eq 'check' && $form->{vc} eq 'customer' )
-        || ( $form->{formname} eq 'receipt' && $form->{vc} eq 'vendor' ) )
-    {
-        $form->{amount} =~ s/-//g;
-    }
-
-    for (qw(datepaid source memo)) { $form->{$_} = $form->{"${_}_$i"} }
-
-    &{"$form->{vc}_details"};
-    @a = qw(name address1 address2 city state zipcode country);
-
-    foreach $item (qw(invnumber ordnumber)) {
-        $temp{$item} = $form->{$item};
-        delete $form->{$item};
-        push( @{ $form->{$item} }, $temp{$item} );
-    }
-    push( @{ $form->{invdate} }, $form->{transdate} );
-    push(
-        @{ $form->{due} },
-        $form->format_amount( \%myconfig, $form->{oldinvtotal}, 2 )
-    );
-    push( @{ $form->{paid} }, $form->{"paid_$i"} );
-
-    use LedgerSMB::CP;
-    $c =
-      CP->new( ( $form->{language_code} )
-        ? $form->{language_code}
-        : $myconfig{countrycode} );
-    $c->init;
-    ( $whole, $form->{decimal} ) = split /\./,
-      $form->parse_amount( \%myconfig, $form->{amount} );
-
-    $form->{decimal} .= "00";
-    $form->{decimal}        = substr( $form->{decimal}, 0, 2 );
-    $form->{text_decimal}   = $c->num2text( $form->{decimal} * 1 );
-    $form->{text_amount}    = $c->num2text($whole);
-    $form->{integer_amount} = $form->format_amount( \%myconfig, $whole );
-
-    ( $form->{employee} ) = split /--/, $form->{employee};
-
-    $form->{notes} =~ s/^\s+//g;
-    push @a, "notes";
-
-    $form->{templates} = "$myconfig{templates}";
-    $form->{IN} =
-      ( $form->{formname} eq 'transaction' )
-      ? lc $form->{ARAP} . "_$form->{formname}.html"
-      : "$form->{formname}.html";
-
-    if ( $form->{format} =~ /(postscript|pdf)/ ) {
-        $form->{IN} =~ s/html$/tex/;
-    }
-    if ( $form->{media} eq 'queue' ) {
-
-        # save status
-        $form->update_status( \%myconfig );
-
-        $form->{queued} = $form->{queued};
-
-        %audittrail = (
-            tablename => ($order) ? 'oe' : lc $ARAP,
-            reference => $form->{"${inv}number"},
-            formname  => $form->{formname},
-            action    => 'queued',
-            id        => $form->{id}
-        );
-
-        $form->{audittrail} .=
-          $form->audittrail( "", \%myconfig, \%audittrail );
-        $form->{OUT}       = "${LedgerSMB::Sysconfig::spool}/$filename";
-        $form->{printmode} = '>';
-
-        $form->{queued} .= " $form->{formname} $filename";
-        $form->{queued} =~ s/^ //;
-    }
-
-    if ( $form->{media} !~ /(screen|queue)/ ) {
-
-        %queued = split / /, $form->{queued};
-
-        $form->{OUT}       = ${LedgerSMB::Sysconfig::printer}{ $form->{media} };
-        $form->{printmode} = '|-';
-        if ( $form->{printed} !~ /$form->{formname}/ ) {
-
-            $form->{printed} .= " $form->{formname}";
-            $form->{printed} =~ s/^ //;
-
-            $form->update_status( \%myconfig );
-        }
-
-        %audittrail = (
-            tablename => lc $form->{ARAP},
-            reference => $form->{invnumber},
-            formname  => $form->{formname},
-            action    => 'printed',
-            id        => $form->{id}
-        );
-
-        %status = ();
-        for (qw(printed audittrail)) { $status{$_} = $form->{$_} }
-
-        $status{audittrail} .=
-          $form->audittrail( "", \%myconfig, \%audittrail );
-
-    }
-
-    $form->{fileid} = $invnumber;
-    $form->{fileid} =~ s/(\s|\W)+//g;
-
-    my $template = LedgerSMB::Template->new( 
-        user => \%myconfig, template => $form->{'formname'}, 
-        locale => $locale,
-        format => uc $form->{'format'},
-	no_auto_output => 1,
-        output_args => $form,
-    );
-    try {
-        $template->render($form);
-        $template->output($form);
-    }
-    catch Error::Simple with {
-        my $E = shift;
-        $form->error( $E->stacktrace );
-    };
-
-    if ( $form->{previousform} ) {
-
-        $previousform = $form->unescape( $form->{previousform} );
-
-        for ( keys %$form ) { delete $form->{$_} }
-
-        foreach $item ( split /&/, $previousform ) {
-            ( $key, $value ) = split /=/, $item, 2;
-            $value =~ s/%26/&/g;
-            $form->{$key} = $value;
-        }
-
-        for (qw(exchangerate creditlimit creditremaining)) {
-            $form->{$_} = $form->parse_amount( \%myconfig, $form->{$_} );
-        }
-
-        for ( 1 .. $form->{rowcount} ) {
-            $form->{"amount_$_"} =
-              $form->parse_amount( \%myconfig, $form->{"amount_$_"} );
-        }
-        for ( split / /, $form->{taxaccounts} ) {
-            $form->{"tax_$_"} =
-              $form->parse_amount( \%myconfig, $form->{"tax_$_"} );
-        }
-
-        for $i ( 1 .. $form->{paidaccounts} ) {
-            for (qw(paid exchangerate)) {
-                $form->{"${_}_$i"} =
-                  $form->parse_amount( \%myconfig, $form->{"${_}_$i"} );
-            }
-        }
-
-        for (qw(printed audittrail)) { $form->{$_} = $status{$_} }
-
-        &{"$display_form"};
-
-    }
-
-}
-
-sub print_receipt {
-    my ( $old_form, $i ) = @_;
-
-    &print_check( $old_form, $i );
-
-}
-
 sub print_transaction {
     my ($old_form) = @_;
 

Modified: trunk/scripts/recon.pl
===================================================================
--- trunk/scripts/recon.pl	2011-08-07 23:28:59 UTC (rev 3644)
+++ trunk/scripts/recon.pl	2011-08-09 21:01:41 UTC (rev 3645)
@@ -3,8 +3,7 @@
 
 =head1 NAME
 
-LedgerSMB::Scripts::Reconciliation - LedgerSMB class defining the Controller
-functions, template instantiation and rendering.
+LedgerSMB::Scripts::recon
 
 =head1 SYOPSIS
 
@@ -620,7 +619,7 @@
     );
 }
 
-# eval { do "scripts/custom/Reconciliation.pl" };
+ eval { do "scripts/custom/recon.pl" };
 1;
 
 =pod


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