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

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



Revision: 6695
          http://sourceforge.net/p/ledger-smb/code/6695
Author:   einhverfr
Date:     2014-01-28 14:51:16 +0000 (Tue, 28 Jan 2014)
Log Message:
-----------
Allowing multiple cash accounts outside of batch workflows

Modified Paths:
--------------
    trunk/LedgerSMB/Report/Invoices/Payments.pm
    trunk/UI/Reports/filters/payments.html

Modified: trunk/LedgerSMB/Report/Invoices/Payments.pm
===================================================================
--- trunk/LedgerSMB/Report/Invoices/Payments.pm	2014-01-28 14:47:59 UTC (rev 6694)
+++ trunk/LedgerSMB/Report/Invoices/Payments.pm	2014-01-28 14:51:16 UTC (rev 6695)
@@ -45,7 +45,7 @@
 
 =cut
 
-has cash_accno => (is => 'ro', isa => 'Str', required => 1);
+has cash_accno => (is => 'ro', isa => 'Str');
 
 =item source
 
@@ -220,6 +220,8 @@
 
 sub run_report{
     my ($self) = @_;
+    die LedgerSMB::Report::text('Must have cash account in batch') 
+        if $self->batch_id and !defined $self->cash_accno;
     $ENV{LSMB_ALWAYS_MONEY} = 1;
     my @rows = $self->exec_method({funcname => 'payment__search'});
     my $count = 1;

Modified: trunk/UI/Reports/filters/payments.html
===================================================================
--- trunk/UI/Reports/filters/payments.html	2014-01-28 14:47:59 UTC (rev 6694)
+++ trunk/UI/Reports/filters/payments.html	2014-01-28 14:51:16 UTC (rev 6695)
@@ -54,6 +54,7 @@
 	} ?> --></div>
 <div class="input" id="account_input_div">
 	<?lsmb 
+             IF !batch_id; cash_accounts.unshift({}); END;
              INCLUDE select element_data = {
 		name           = "cash_accno"
 		options        = cash_accounts

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


------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits