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

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



Revision: 4876
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4876&view=rev
Author:   einhverfr
Date:     2012-06-09 10:23:02 +0000 (Sat, 09 Jun 2012)
Log Message:
-----------
Batch search to new framework

Modified Paths:
--------------
    trunk/Changelog
    trunk/LedgerSMB/AM.pm
    trunk/LedgerSMB/DBObject/Report.pm
    trunk/LedgerSMB/Scripts/vouchers.pm
    trunk/LedgerSMB/Sysconfig.pm
    trunk/UI/Reports/filters/contact_search.html
    trunk/bin/aa.pl
    trunk/bin/am.pl
    trunk/ledgersmb.conf.default
    trunk/sql/modules/Voucher.sql

Added Paths:
-----------
    trunk/LedgerSMB/DBObject/Report/Unapproved/Batch_Overview.pm

Property Changed:
----------------
    trunk/
    trunk/LedgerSMB/Scripts/account.pm
    trunk/LedgerSMB/Scripts/admin.pm
    trunk/LedgerSMB/Scripts/contact.pm
    trunk/LedgerSMB/Scripts/employee.pm
    trunk/LedgerSMB/Scripts/file.pm
    trunk/LedgerSMB/Scripts/journal.pm
    trunk/LedgerSMB/Scripts/login.pm
    trunk/LedgerSMB/Scripts/menu.pm
    trunk/LedgerSMB/Scripts/payment.pm
    trunk/LedgerSMB/Scripts/recon.pm
    trunk/LedgerSMB/Scripts/setup.pm
    trunk/LedgerSMB/Scripts/taxform.pm
    trunk/sql/upgrade/1.2-1.3-manual.sql


Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3:3711-4870
   + /branches/1.3:3711-4874

Modified: trunk/Changelog
===================================================================
--- trunk/Changelog	2012-06-09 10:06:25 UTC (rev 4875)
+++ trunk/Changelog	2012-06-09 10:23:02 UTC (rev 4876)
@@ -62,6 +62,8 @@
 * Clarified recon approval workflow (Chris T)
 * Fixed error editing non-existent localized template (Chris T, 3531738)
 * Fixed show/hide logic on nav bar on Contacts screen (Chris T)
+* Fixed "Post as Shown" button not showing properly on AR/AP drafts (Chris T)
+* Added fs_cssdir config option for easier packaging (Chris T, h/t Robert C)
 
 Changelog for 1.3.18
 * Fixed missing template for CSV pricelists (Chris T)

Modified: trunk/LedgerSMB/AM.pm
===================================================================
--- trunk/LedgerSMB/AM.pm	2012-06-09 10:06:25 UTC (rev 4875)
+++ trunk/LedgerSMB/AM.pm	2012-06-09 10:23:02 UTC (rev 4876)
@@ -1223,7 +1223,7 @@
 
     if ( $form->{file} !~ /^$myconfig->{templates}\// ) {
         $form->error("Not in a whitelisted directory: $form->{file}")
-          unless $form->{file} =~ /^css\//;
+          unless $form->{file} =~ /^$LedgerSMB::Sysconfig::fs_cssdir\//;
     }
 }
 
@@ -1243,7 +1243,7 @@
     open( TEMPLATE, '<', "$form->{file}" ) || ($testval = 1);
     if ($testval == 1 && ($! eq 'No such file or directory')){
       my $file = $form->{file};
-      $file =~ s|$form->{code}/||;
+      $file =~ s|$form->{code}/|| if $form->{code};
       open( TEMPLATE, '<', "$file" ) ||  $form->error(
                     "Template not found: $file"
       );

Added: trunk/LedgerSMB/DBObject/Report/Unapproved/Batch_Overview.pm
===================================================================
--- trunk/LedgerSMB/DBObject/Report/Unapproved/Batch_Overview.pm	                        (rev 0)
+++ trunk/LedgerSMB/DBObject/Report/Unapproved/Batch_Overview.pm	2012-06-09 10:23:02 UTC (rev 4876)
@@ -0,0 +1,254 @@
+=head1 NAME
+
+LedgerSMB::DBObject::Report::Unapproved::Batch_Overview - Search Batches in 
+LedgerSMB
+
+=head1 SYNPOSIS
+
+  my $report = LedgerSMB::DBObject::Report::Unapproved::Batch_Overview->new(%$request);
+  $report->run;
+  $report->render($request, $format);
+
+=head1 DESCRIPTION
+
+This provides an ability to search for (and approve or delete) pending
+transactions grouped in batches.  This report only handles the batches 
+themselves.  You cannot delete individual vouchers in this report.  For that,
+use LedgerSMB::DBObject::Report::Unapproved::Batch_Detail instead.
+
+=head1 INHERITS
+
+=over
+
+=item LedgerSMB::DBObject::Report;
+
+=back
+
+=cut
+
+package LedgerSMB::DBObject::Report::Unapproved::Batch_Overview;
+use Moose;
+extends 'LedgerSMB::DBObject::Report';
+
+use LedgerSMB::DBObject::Business_Unit_Class;
+use LedgerSMB::DBObject::Business_Unit;
+use LedgerSMB::App_State;
+
+my $locale = $LedgerSMB::App_State::Locale;
+
+=head1 PROPERTIES
+
+=over
+
+=item columns
+
+Read-only accessor, returns a list of columns.
+
+=over
+
+=item select
+
+Select boxes for selecting the returned items.
+
+=item id
+
+ID of transaction
+
+=item post_date
+
+Post date of transaction
+
+=item reference text
+
+Invoice number or GL reference
+
+=item description
+
+Description of transaction
+
+=item transaction_total
+
+Total of AR/AP/GL vouchers (GL vouchers credit side only is counted)
+
+=item payment_total
+
+Total of payment lines (credit side)
+
+Amount
+
+=back
+
+=cut
+
+our @COLUMNS = (
+    {col_id => 'select',
+       name => '',
+       type => 'checkbox' },
+
+    {col_id => 'id',
+       name => $locale->text('ID'),
+       type => 'text',
+     pwidth => 1, },
+
+    {col_id => 'default_date',
+       name => $locale->text('Date'),
+       type => 'text',
+     pwidth => '4', },
+
+    {col_id => 'control_code',
+       name => $locale->text('Control Code'),
+       type => 'href',
+  href_base => 'vouchers.pl?action=get_batch&id=',
+     pwidth => '3', },
+
+    {col_id => 'description',
+       name => $locale->text('Description'),
+       type => 'text',
+     pwidth => '6', },
+
+    {col_id => 'transaction_total',
+       name => $locale->text('AR/AP/GL Amount'),
+       type => 'text',
+     pwidth => '2', },
+
+    {col_id => 'payment_total',
+       name => $locale->text('Payment Amount'),
+       type => 'text',
+     pwidth => '2', },
+
+);
+
+sub columns {
+    return ..hidden..;
+}
+
+    # TODO:  business_units int[]
+
+=item name
+
+Returns the localized template name
+
+=cut
+
+sub name {
+    return $locale->text('Batch Search');
+}
+
+=item header_lines
+
+Returns the inputs to display on header.
+
+=cut
+
+sub header_lines {
+    return [{name => 'type',
+             text => $locale->text('Batch Type')},
+            {name => 'reference',
+             text => $locale->text('Reference')},
+            {name => 'amount_gt',
+             text => $locale->text('Amount Greater Than')},
+            {name => 'amount_lt',
+             text => $locale->text('Amount Less Than')}, ]
+}
+
+=item subtotal_cols
+
+Returns list of columns for subtotals
+
+=cut
+
+sub subtotal_cols {
+    return [];
+}
+
+=head2 Criteria Properties
+
+Note that in all cases, undef matches everything.
+
+=item reference (text)
+
+Exact match on reference or invoice number.
+
+=cut
+
+has 'reference' => (is => 'rw', isa => 'Maybe[Str]');
+
+=item type
+
+ar for AR drafts, ap for AP drafts, gl for GL ones.
+
+=cut
+
+has 'type' => (is => 'rw', isa => 'Maybe[Str]');
+
+=item amount_gt
+
+The amount of the draft must be greater than this for it to show up.
+
+=cut
+
+has 'amount_gt' => (is => 'rw', isa => 'Maybe[Str]');
+
+=item amount_lt
+
+The amount of the draft must be less than this for it to show up.
+
+=cut
+
+has 'amount_lt' => (is => 'rw', isa => 'Maybe[Str]');
+
+=back
+
+=head1 METHODS
+
+=over
+
+=item prepare_criteria($request)
+
+Instantiates the PGDate and PGNumber inputs.
+
+=cut
+
+sub prepare_criteria{
+    my ($self, $request) = @_;
+}
+
+=item run_report()
+
+Runs the report, and assigns rows to $self->rows.
+
+=cut
+
+sub run_report{
+    my ($self) = @_;
+    $self->buttons([{
+                    name  => 'action',
+                    type  => 'submit',
+                    text  => $locale->text('Post'),
+                    value => 'batch_approve',
+                    class => 'submit',
+                 },{
+                    name  => 'action',
+                    type  => 'submit',
+                    text  => $locale->text('Delete'),
+                    value => 'batch_delete',
+                    class => 'submit',
+                }]);
+    my @rows = $self->exec_method({funcname => 'batch__search'});
+    for my $r (@rows){
+       $r->{row_id} = $r->{id};
+    }
+    $self->rows(..hidden..);
+}
+
+
+=head1 COPYRIGHT
+
+COPYRIGHT (C) 2012 The LedgerSMB Core Team.  This file may be re-used following
+the terms of the GNU General Public License version 2 or at your option any
+later version.  Please see included LICENSE.TXT for details.
+
+=cut
+
+__PACKAGE__->meta->make_immutable;
+return 1;

Modified: trunk/LedgerSMB/DBObject/Report.pm
===================================================================
--- trunk/LedgerSMB/DBObject/Report.pm	2012-06-09 10:06:25 UTC (rev 4875)
+++ trunk/LedgerSMB/DBObject/Report.pm	2012-06-09 10:23:02 UTC (rev 4876)
@@ -148,6 +148,14 @@
 
 has show_subtotals => (is => 'rw', isa => 'Bool');
 
+=item buttons 
+
+Buttons to show at the bottom of the screen
+
+=cut
+
+has buttons => (is => 'rw', isa => 'ArrayRef[Any]');
+
 =back
 
 =head1 METHODS


Property changes on: trunk/LedgerSMB/Scripts/account.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/account.pm:3712-4870
/branches/1.3/scripts/account.pl:3711-4368
   + /branches/1.3/LedgerSMB/Scripts/account.pm:3712-4874
/branches/1.3/scripts/account.pl:3711-4368


Property changes on: trunk/LedgerSMB/Scripts/admin.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/admin.pm:3712-4870
/branches/1.3/scripts/admin.pl:3711-4678
   + /branches/1.3/LedgerSMB/Scripts/admin.pm:3712-4874
/branches/1.3/scripts/admin.pl:3711-4678


Property changes on: trunk/LedgerSMB/Scripts/contact.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/contact.pm:4783-4870
/branches/1.3/LedgerSMB/Scripts/customer.pm:3712-4782
/branches/1.3/scripts/customer.pl:4273-4287
   + /branches/1.3/LedgerSMB/Scripts/contact.pm:4783-4874
/branches/1.3/LedgerSMB/Scripts/customer.pm:3712-4782
/branches/1.3/scripts/customer.pl:4273-4287


Property changes on: trunk/LedgerSMB/Scripts/employee.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-4870
/branches/1.3/scripts/employee.pl:3842-3843,4273-4287,4289-4310
   + /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-4874
/branches/1.3/scripts/employee.pl:3842-3843,4273-4287,4289-4310


Property changes on: trunk/LedgerSMB/Scripts/file.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/file.pm:3711-4870
/branches/1.3/scripts/file.pl:3711-4859
   + /branches/1.3/LedgerSMB/Scripts/file.pm:3711-4874
/branches/1.3/scripts/file.pl:3711-4859


Property changes on: trunk/LedgerSMB/Scripts/journal.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/journal.pm:3712-4870
/branches/1.3/scripts/journal.pl:3711-4328
   + /branches/1.3/LedgerSMB/Scripts/journal.pm:3712-4874
/branches/1.3/scripts/journal.pl:3711-4328


Property changes on: trunk/LedgerSMB/Scripts/login.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/login.pm:3712-4870
/branches/1.3/scripts/login.pl:3711-4192
   + /branches/1.3/LedgerSMB/Scripts/login.pm:3712-4874
/branches/1.3/scripts/login.pl:3711-4192


Property changes on: trunk/LedgerSMB/Scripts/menu.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/menu.pm:3712-4870
/branches/1.3/scripts/menu.pl:3711-4192,4273-4287
   + /branches/1.3/LedgerSMB/Scripts/menu.pm:3712-4874
/branches/1.3/scripts/menu.pl:3711-4192,4273-4287


Property changes on: trunk/LedgerSMB/Scripts/payment.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/payment.pm:3712-4870
/branches/1.3/scripts/payment.pl:3711-4680
   + /branches/1.3/LedgerSMB/Scripts/payment.pm:3712-4874
/branches/1.3/scripts/payment.pl:3711-4680


Property changes on: trunk/LedgerSMB/Scripts/recon.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/recon.pm:3711-4870
/branches/1.3/scripts/recon.pl:4194-4271,4273-4287,4393-4438
   + /branches/1.3/LedgerSMB/Scripts/recon.pm:3711-4874
/branches/1.3/scripts/recon.pl:4194-4271,4273-4287,4393-4438


Property changes on: trunk/LedgerSMB/Scripts/setup.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/setup.pm:3712-4870
/branches/1.3/scripts/setup.pl:3711-4550
   + /branches/1.3/LedgerSMB/Scripts/setup.pm:3712-4874
/branches/1.3/scripts/setup.pl:3711-4550


Property changes on: trunk/LedgerSMB/Scripts/taxform.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/taxform.pm:3712-4870
/branches/1.3/scripts/taxform.pl:3711-4192,4273-4287
   + /branches/1.3/LedgerSMB/Scripts/taxform.pm:3712-4874
/branches/1.3/scripts/taxform.pl:3711-4192,4273-4287

Modified: trunk/LedgerSMB/Scripts/vouchers.pm
===================================================================
--- trunk/LedgerSMB/Scripts/vouchers.pm	2012-06-09 10:06:25 UTC (rev 4875)
+++ trunk/LedgerSMB/Scripts/vouchers.pm	2012-06-09 10:23:02 UTC (rev 4876)
@@ -19,6 +19,7 @@
 
 use LedgerSMB::Batch;
 use LedgerSMB::Template;
+use LedgerSMB::DBObject::Report::Unapproved::Batch_Overview;
 use strict;
 
 
@@ -115,7 +116,7 @@
         ar         => {script => 'bin/ar.pl', function => sub {add()}},
         gl         => {script => 'bin/gl.pl', function => sub {add()}},
      sales_invoice => {script => 'bin/is.pl', function => sub {add()}},
-    vendor_invoice => {script => 'bin/ir.pl', function => sub {add()}}
+    vendor_invoice => {script => 'bin/ir.pl', function => sub {add()}},
         receipt    => {script => 'scripts/payment.pl', 
 	             function => sub {
 				my ($request) = @_;
@@ -223,129 +224,10 @@
 
 sub list_batches {
     my ($request) = @_;
-    $request->{action} = 'list_batches';
-    my $batch = LedgerSMB::Batch->new(base => $request);
-    $batch->close_form;
-    $batch->open_form;
-    $batch->{dbh}->commit;
-    if ($batch->{order_by}){
-        $batch->set_ordering(
-		{method => $batch->get_search_method({custom_types => $custom_batch_types}), 
-		 column => $batch->{order_by}
-		});
-    }
-    my @search_results = $batch->get_search_results({custom_types => $custom_batch_types});
-    $batch->{script} = "vouchers.pl";
-
-    my @columns = 
-        qw(select id control_code description transaction_total payment_total default_date);
-
-    my $base_href = "vouchers.pl";
-    my $search_href = "$base_href?action=list_batches";
-    my $batch_href = "$base_href?action=get_batch";
-
-    for my $key (
-       qw(class_id approved created_by description empty amount_gt amount_lt)
-    ){
-       $search_href .= "&$key=$batch->{$key}";
-    }
-
-	my $sort_href = "$search_href&order_by";
-	
-    my $column_names = {
-        'select'          => 'Select',
-        transaction_total => 'AR/AP/GL Total',
-        payment_total => 'Paid/Received Total',
-        description => 'Description',
-        control_code => 'Batch Number',
-        id => 'ID',
-        default_date => 'Post Date'
-    };
-    my @sort_columns = qw(id control_code description transaction_total payment_total default_date);
-	
-    my $count = 0;
-    my @rows;
-    for my $result (@search_results){
-        ++$count;
-        $batch->{"row_$count"} = $result->{id};
-        push @rows, {
-            'select'          => {
-                                 input => {
-                                           type  => 'checkbox',
-                                           value => 1,
-                                           name  => "batch_$result->{id}"
-                                 }
-            },
-            transaction_total => $batch->format_amount(
-                                     amount => $result->{transaction_total}
-				),
-            payment_total     => $batch->format_amount (
-                                     amount => $result->{payment_total}
-                                ),
-            description => $result->{description},
-            control_code => {
-                             text  => $result->{control_code},
-                             href  => "$batch_href&batch_id=$result->{id}",
-
-            },
-            id => $result->{id},
-			default_date => $result->{default_date}
-        };
-    }
-    $batch->{rowcount} = $count;
-    my $template = LedgerSMB::Template->new(
-        user     => $request->{_user},
-        locale   => $request->{_locale},
-        path     => 'UI',
-        template => 'form-dynatable',
-        format   => ($batch->{format}) ? $batch->{format} : 'HTML', 
-    );
-
-	my $column_heading = $template->column_heading($column_names, 
-		{href => $sort_href, columns => ..hidden..
-	);
-
-    my $hiddens = $batch->take_top_level();
-    $batch->{rowcount} = "$count";
-    delete $batch->{search_results};
-    
-    my @buttons;
-    if ($batch->{empty})
-    {
-      @buttons = [{
-                    name  => 'action',
-                    type  => 'submit',
-                    text  => $request->{_locale}->text('Delete'),
-                    value => 'batch_delete',
-                    class => 'submit',
-               }];
-    } else {
-      @buttons = [{
-                    name  => 'action',
-                    type  => 'submit',
-                    text  => $request->{_locale}->text('Post'),
-                    value => 'batch_approve',
-                    class => 'submit',
-                 },{
-                    name  => 'action',
-                    type  => 'submit',
-                    text  => $request->{_locale}->text('Delete'),
-                    value => 'batch_delete',
-                    class => 'submit',
-                }];
-    }
-       # save form_id into the DB before sending the form.
-       # TODO: need to find a better place for this.
-       $batch->{dbh}->commit();
-
-    $template->render({ 
-	form    => $batch,
-	columns => ..hidden..,
-        heading => $column_heading,
-        rows    => ..hidden..,
-        hiddens => $hiddens,
-        buttons => @buttons
-    });
+    my $report = LedgerSMB::DBObject::Report::Unapproved::Batch_Overview->new(
+                 %$request);
+    $report->run_report;
+    $report->render($request);
         
 }
 

Modified: trunk/LedgerSMB/Sysconfig.pm
===================================================================
--- trunk/LedgerSMB/Sysconfig.pm	2012-06-09 10:06:25 UTC (rev 4875)
+++ trunk/LedgerSMB/Sysconfig.pm	2012-06-09 10:23:02 UTC (rev 4876)
@@ -20,6 +20,7 @@
 our $auth = 'DB';
 our $images = getcwd() . '/images'; 
 our $cssdir = 'css/';
+our $fs_cssdir = 'css/';
 
 our $force_username_case = undef; # don't force case
 
@@ -106,7 +107,7 @@
 for my $var (
     qw(pathsep log_level DBI_TRACE check_max_invoices language auth latex
     db_autoupdate force_username_case max_post_size decimal_places cookie_name
-    return_accno no_db_str tempdir cache_templates cssdir)
+    return_accno no_db_str tempdir cache_templates cssdir fs_cssdir)
   )
 {
     ${$var} = $config{'main'}{$var} if $config{$var};

Modified: trunk/UI/Reports/filters/contact_search.html
===================================================================
--- trunk/UI/Reports/filters/contact_search.html	2012-06-09 10:06:25 UTC (rev 4875)
+++ trunk/UI/Reports/filters/contact_search.html	2012-06-09 10:23:02 UTC (rev 4876)
@@ -3,7 +3,7 @@
        PROCESS report_base.html ?> 
 <body>
 <?lsmb 
-IF account_class == 0;
+IF !account_class;
    title = text('Contact Search'); #'
 ELSIF account_class == 1;
    title = text('Vendor Search'); #'
@@ -112,356 +112,6 @@
     </td>
   </tr>
   <tr>
-    <td>
-      <table>
-<?lsmb IF target == 'list_history' -?>
-        <tr>
-          <td />
-          <td>
-            <table>
-              <tr>
-                <td>
-                  <table>
-                    <tr>
-                      <td align="right">
-                         <?lsmb INCLUDE input element_data={
-    type = 'radio',
-    name = 'type',
-    value = 'invoice',
-    label = text('Invoice'),
-    checked = 'checked',
-    } -?>
-                      </td>
-                    </tr>
-                    <tr>
-                      <td align="right">
-                         <?lsmb INCLUDE input element_data={
-    type = 'radio',
-    name = 'type',
-    value = 'order',
-    label = text('Order'),
-    } -?>
-                      </td>
-                    </tr>
-                    <tr>
-                      <td align="right">
-                         <?lsmb INCLUDE input element_data={
-    type = 'radio',
-    name = 'type',
-    value = 'quotation',
-    label = text('Quotation'),
-    } -?>
-                      </td>
-                    </tr>
-                  </table>
-                </td>
-                <td>
-                  <table>
-                    <tr>
-                      <th><?lsmb text('From') ?></th>
-                      <td><?lsmb INCLUDE input element_data={
-  size = '11', name = 'transdatefrom', class = 'date', title = user.dateformat} -?></td>
-                      <th><?lsmb text('To') ?></th>
-                      <td><?lsmb INCLUDE input element_data={
-  size = '11', name = 'transdateto', class = 'date', title = user.dateformat} -?></td>
-                    </tr>
-                    <tr>
-                      <td />
-                      <td colspan="3">
-                        <?lsmb INCLUDE input element_data={
-    name = 'open',
-    type = 'checkbox',
-    value = 'Y',
-    label = text('Open'),
-    checked = 'checked'
-    } -?>
-                        <?lsmb INCLUDE input element_data={
-    name = 'closed',
-    type = 'checkbox',
-    value = 'Y',
-    label = text('Closed'),
-    } -?>
-                      </td>
-                    </tr>
-                  </table>
-                </td>
-              </tr>
-            </table>
-          </td>
-        </tr>
-        <tr>
-          <th align="right"><?lsmb text('Include in Report') ?></th>
-            <td>
-              <table>
-                <tr>
-                  <td align="right">
-    <?lsmb INCLUDE input element_data={
-      name = 'history',
-      type = 'radio',
-      value = 'summary',
-      label = text('Summary'),
-      checked = 'checked',
-      } -?>
-                  </td>
-                  <td align="right">
-    <?lsmb INCLUDE input element_data={
-      name = 'history',
-      type = 'radio',
-      value = 'detail',
-      label = text('Detail'),
-      } -?>
-                  </td>
-                </tr>
-                <tr>
-                  <td align="right">
-    <?lsmb INCLUDE input element_data={
-      name = 'col_partnumber',
-      type = 'checkbox',
-      value = 'Y',
-      label = text('Part Number'), # '
-      checked = 'checked',
-      } -?>
-                  </td>
-                  <td align="right">
-    <?lsmb INCLUDE input element_data={
-      name = 'col_description',
-      type = 'checkbox',
-      value = 'Y',
-      label = text('Description'),
-      checked = 'checked',
-      } -?>
-                  </td>
-                  <td align="right">
-    <?lsmb INCLUDE input element_data={
-      name = 'col_sellprice',
-      type = 'checkbox',
-      value = 'Y',
-      label = text('Sell Price'), # '
-      checked = 'checked',
-      } -?>
-                  </td>
-                  <td align="right">
-    <?lsmb INCLUDE input element_data={
-      name = 'col_curr',
-      type = 'checkbox',
-      value = 'Y',
-      label = text('Currency'),
-      } -?>
-                  </td>
-                </tr>
-                <tr>
-                  <td align="right">
-    <?lsmb INCLUDE input element_data={
-      name = 'col_qty',
-      type = 'checkbox',
-      value = 'Y',
-      label = text('Qty'),
-      } -?>
-                  </td>
-                  <td align="right">
-    <?lsmb INCLUDE input element_data={
-      name = 'col_unit',
-      type = 'checkbox',
-      value = 'Y',
-      label = text('Unit'),
-      } -?>
-                  </td>
-                  <td align="right">
-    <?lsmb INCLUDE input element_data={
-      name = 'col_discount',
-      type = 'checkbox',
-      value = 'Y',
-      label = text('Discount'),
-      } -?>
-                  </td>
-                </tr>
-                <tr>
-                  <td align="right">
-    <?lsmb INCLUDE input element_data={
-      name = 'col_deliverydate',
-      type = 'checkbox',
-      value = 'Y',
-      label = text('Delivery Date'), # '
-      } -?>
-                  </td>
-                  <td align="right">
-    <?lsmb INCLUDE input element_data={
-      name = 'col_projectnumber',
-      type = 'checkbox',
-      value = 'Y',
-      label = text('Project Number'), # '
-      } -?>
-                  </td>
-                  <td align="right">
-    <?lsmb INCLUDE input element_data={
-      name = 'col_serialnumber',
-      type = 'checkbox',
-      value = 'Y',
-      label = text('Serial Number'), # '
-      } -?>
-                  </td>
-                </tr>
-              </table>
-            </td>
-          </tr>
-<?lsmb ELSIF target == 'list_names' ?>
-        <tr>
-          <td />
-          <td>
-  <?lsmb INCLUDE input element_data={name = 'status', type = 'radio', value = 'all', label = text('All'), checked = 'checked'} -?>
-  <?lsmb INCLUDE input element_data={name = 'status', type = 'radio', value = 'active', label = text('Active')} -?>
-  <?lsmb INCLUDE input element_data={name = 'status', type = 'radio', value = 'inactive', label = text('Inactive')} -?>
-  <?lsmb INCLUDE input element_data={name = 'status', type = 'radio', value = 'orphaned', label = text('Orphaned')} -?>
-          </td>
-        </tr>
-        <tr>
-          <td />
-          <td>
-            <table>
-              <tr>
-                <td>
-                  <table>
-                    <tr>
-                      <td align="right">
-  <?lsmb INCLUDE input element_data={
-    name = 'col_transnumber',
-    type = 'checkbox',
-    value = 'Y',
-    label = form.translabel,
-    } -?>
-                      </td>
-                    </tr>
-                    <tr>
-                      <td align="right">
-  <?lsmb INCLUDE input element_data={
-    name = 'col_invnumber',
-    type = 'checkbox',
-    value = 'Y',
-    label = form.invlabel,
-    } -?>
-                      </td>
-                    </tr>
-                    <tr>
-                      <td align="right">
-  <?lsmb INCLUDE input element_data={
-    name = 'col_ordnumber',
-    type = 'checkbox',
-    value = 'Y',
-    label = form.ordlabel,
-    } -?>
-                      </td>
-                    </tr>
-                    <tr>
-                      <td align="right">
-  <?lsmb INCLUDE input element_data={
-    name = 'col_quonumber',
-    type = 'checkbox',
-    value = 'Y',
-    label = form.quolabel,
-    } -?>
-                      </td>
-                    </tr>
-                  </table>
-                </td>
-                <td>
-                  <table>
-                    <tr>
-                      <th><?lsmb text('From') ?></th>
-                      <td>
-  <?lsmb INCLUDE input element_data={
-    name = 'transdatefrom',
-    class = 'date'
-    size = '11',
-    title = user.dateformat,
-    } -?>
-                      </td>
-                      <th><?lsmb text('To') ?></th>
-                      <td>
-  <?lsmb INCLUDE input element_data={
-    name = 'transdateto',
-    class = 'date'
-    size = '11',
-    title = user.dateformat,
-    } -?>
-                      </td>
-                    </tr>
-                    <tr>
-                      <td />
-                      <td colspan="3">
-                        <?lsmb INCLUDE input element_data={
-    name = 'open',
-    type = 'checkbox',
-    value = 'Y',
-    label = text('Open'),
-    checked = 'checked'
-    } -?>
-                        <?lsmb INCLUDE input element_data={
-    name = 'closed',
-    type = 'checkbox',
-    value = 'Y',
-    label = text('Closed'),
-    } -?>
-                      </td>
-                    </tr>
-                    <tr>
-                      <td />
-                      <td colspan="3">
-                        <?lsmb INCLUDE input element_data={
-    name = 'col_amount',
-    type = 'checkbox',
-    value = 'Y',
-    label = text('Amount'),
-    checked = 'checked'
-    } -?>
-                        <?lsmb INCLUDE input element_data={
-    name = 'col_tax',
-    type = 'checkbox',
-    value = 'Y',
-    label = text('Tax'),
-    checked = 'checked'
-    } -?>
-                        <?lsmb INCLUDE input element_data={
-    name = 'col_total',
-    type = 'checkbox',
-    value = 'Y',
-    label = text('Total'),
-    checked = 'checked'
-    } -?>
-                        <?lsmb INCLUDE input element_data={
-    name = 'col_subtotal',
-    type = 'checkbox',
-    value = 'Y',
-    label = text('Subtotal'),
-    } -?>
-                      </td>
-                    </tr>
-                  </table>
-                </td>
-              </tr>
-            </table>
-          </td>
-        </tr>
-        <tr>
-          <th align="right"><?lsmb text('Include in Report') ?></th>
-          <td>
-            <table>
-  <?lsmb FOREACH line IN form.includes -?>
-              <tr>
-    <?lsmb FOREACH item IN line -?>
-                <td align="right">
-        <?lsmb INCLUDE input element_data=item -?>
-                </td>
-    <?lsmb END -?>
-              </tr>
-  <?lsmb END -?>
-            </table>
-          </td>
-        </tr>
-<?lsmb END ?>
-      </table>
-    </td>
-  </tr>
-  <tr>
     <td><hr size="3" noshade="noshade" /></td>
   </tr>
 </table>

Modified: trunk/bin/aa.pl
===================================================================
--- trunk/bin/aa.pl	2012-06-09 10:06:25 UTC (rev 4875)
+++ trunk/bin/aa.pl	2012-06-09 10:23:02 UTC (rev 4876)
@@ -1013,7 +1013,7 @@
                    ndx   => 3, 
                    key   => 'O', 
                    value => $locale->text('Post as Saved') };
-           if (grep /^lsmb_$form->{company}__draft_modify$/, @{$form->{_roles}}){
+           if (grep /^lsmb_$form->{company}__draft_edit$/, @{$form->{_roles}}){
                $button{edit_and_approve} = { 
                    ndx   => 4, 
                    key   => 'E', 

Modified: trunk/bin/am.pl
===================================================================
--- trunk/bin/am.pl	2012-06-09 10:06:25 UTC (rev 4875)
+++ trunk/bin/am.pl	2012-06-09 10:23:02 UTC (rev 4876)
@@ -38,6 +38,7 @@
 use LedgerSMB::RP;
 use LedgerSMB::GL;
 use LedgerSMB::Template;
+use LedgerSMB::Sysconfig;
 
 1;
 
@@ -962,7 +963,7 @@
 
 sub display_stylesheet {
 
-    $form->{file} = "css/$myconfig{stylesheet}";
+    $form->{file} = "$LedgerSMB::Sysconfig::fs_cssdir/$myconfig{stylesheet}";
     &display_form;
 
 }
@@ -1405,7 +1406,7 @@
             };
     }
 
-    opendir CSS, "css/.";
+    opendir CSS, $LedgerSMB::Sysconfig::fs_cssdir;
     @all = grep /.*\.css$/, readdir CSS;
     closedir CSS;
 

Modified: trunk/ledgersmb.conf.default
===================================================================
--- trunk/ledgersmb.conf.default	2012-06-09 10:06:25 UTC (rev 4875)
+++ trunk/ledgersmb.conf.default	2012-06-09 10:23:02 UTC (rev 4876)
@@ -4,8 +4,15 @@
 #Be aware of tempdir setting.If client_browser and server_apache on same machine, sharing tmp-dir , problems 'Permission denied' if server tries to write temp-file wich already exists as client-owned
 tempdir = /tmp/ledgersmb
 
+# This is the logical CSS directory.  I.e. it is what comes before the 
+# ledgersmb.css in the url.  Example might be /my_css_dir/ or 
+# http://localhost/other_css_dir/
 cssdir = css/
 
+# THis is the location on the file system where the css files are, for editing 
+# and selection.  An example might be /var/www/ledgersmb_css/
+fs_cssdir = css/
+
 # Set language for login and admin pages
 language = 
 

Modified: trunk/sql/modules/Voucher.sql
===================================================================
--- trunk/sql/modules/Voucher.sql	2012-06-09 10:06:25 UTC (rev 4875)
+++ trunk/sql/modules/Voucher.sql	2012-06-09 10:23:02 UTC (rev 4876)
@@ -122,7 +122,7 @@
 END;
 $$ language plpgsql;
 
-COMMENT ON FUNCTION voucher_list (in_batch_id integer) IS
+COMMENT ON FUNCTION voucher__list (in_batch_id integer) IS
 $$ Retrieves a list of vouchers and amounts attached to the batch.$$;
 
 CREATE TYPE batch_list_item AS (
@@ -138,7 +138,7 @@
 );
 
 CREATE OR REPLACE FUNCTION 
-batch_search(in_class_id int, in_description text, in_created_by_eid int, 
+batch__search(in_class_id int, in_description text, in_created_by_eid int, 
 	in_date_from date, in_date_to date,
 	in_amount_gt numeric, 
 	in_amount_lt numeric, in_approved bool) 


Property changes on: trunk/sql/upgrade/1.2-1.3-manual.sql
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/sql/upgrade/1.2-1.3-manual.sql:3712-4870
/branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710
   + /branches/1.3/sql/upgrade/1.2-1.3-manual.sql:3712-4874
/branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710

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