[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[6241] trunk/LedgerSMB/Report/Listings/Overpayments. pm
- Subject: SF.net SVN: ledger-smb:[6241] trunk/LedgerSMB/Report/Listings/Overpayments. pm
- From: ..hidden..
- Date: Thu, 7 Nov 2013 10:40:20 +0000
Revision: 6241
http://sourceforge.net/p/ledger-smb/code/6241
Author: einhverfr
Date: 2013-11-07 10:40:19 +0000 (Thu, 07 Nov 2013)
Log Message:
-----------
Initial report class for listing overpayments, for reversal, etc.
Added Paths:
-----------
trunk/LedgerSMB/Report/Listings/Overpayments.pm
Added: trunk/LedgerSMB/Report/Listings/Overpayments.pm
===================================================================
--- trunk/LedgerSMB/Report/Listings/Overpayments.pm (rev 0)
+++ trunk/LedgerSMB/Report/Listings/Overpayments.pm 2013-11-07 10:40:19 UTC (rev 6241)
@@ -0,0 +1,164 @@
+=head1 NAME
+
+LedgerSMB::Report::Listings::Overpayments - Overpayments Search Results for
+LedgerSMB
+
+=head1 SYNPOSIS
+
+ LedgerSMB::Report::Listings::Overpayments->new(%$request)->render($request);
+
+=cut
+
+package LedgerSMB::Report::Listings::Overpayments;
+use Moose;
+extends 'LedgerSMB::Report';
+with 'LedgerSMB::Report::Dates';
+
+=head1 DESCRIPTION
+
+This report provides a general listing of overpayments for reversal or
+reporting.
+
+
+=head1 CRITERIA PROPERTIES
+
+In addition to standard dates, we also have:
+
+=over
+
+=item amount_from
+
+=item amount_to
+
+=item control_code
+
+=item meta_number
+
+=back
+
+=cut
+
+has amount_from => (is => 'ro', isa => 'LedgerSMB::Moose::Number', coerce=> 1,
+ required => 0);
+
+has amount_to => (is => 'ro', isa => 'LedgerSMB::Moose::Number', coerce=> 1,
+ required => 0);
+
+has control_code => (is => 'ro', isa => 'Str', required => 0);
+
+has meta_number => (is => 'ro', isa => 'Str', required => 0);
+
+=head1 REPORT CONSTANTS
+
+=head2 name
+
+localized string 'Overpayments'
+
+=cut
+
+sub name {
+ return LedgerSMB::Report::text('Overpayments');
+}
+
+=head2 header_lines
+
+=over
+
+=item meta_number
+
+=item date_from
+
+=item date_to
+
+=item amount_from
+
+=item amount_to
+
+=cut
+
+sub header_lines {
+ return [
+ {name => 'meta_number', text => LedgerSMB::Report::text('Counterparty Code')}.
+ {name => 'date_from', text => LedgerSMB::Report::text('Date From')},
+ {name => 'date_to', text => LedgerSMB::Report::text('Date To')},
+ {name => 'amount_from', text => LedgerSMB::Report::text('Amount From')},
+ {name => 'amount_to', text => LedgerSMB::Report::text('Amount To')},
+ ];
+}
+
+=head2 columns
+
+=over
+
+=item select
+
+=item entity_name
+
+=item transdate
+
+=item amount
+
+=item available
+
+=back
+
+=cut
+
+sub columns {
+ return [{
+ col_id => 'select',
+ name => '',
+ type => 'select',
+ },
+ { col_id => 'entity_name',
+ name => LedgerSMB::Report::text('Counterparty'),
+ type => 'text',
+ },
+ { col_id => 'transdate',
+ name => LedgerSMB::Report::text('Date'),
+ type => 'text',
+ },
+ { col_id => 'amount',
+ name => LedgerSMB::Report::text('Paid'),
+ type => 'text',
+ },
+ { col_id => 'available',
+ name => LedgerSMB::Report::text('Available'),
+ type => 'text',
+ }];
+}
+
+=head1 METHODS
+
+=head2 run_report
+
+=cut
+
+sub run_report {
+ my ($self, $request) = @_;
+ if (ref $request){
+ $self->buttons([
+ { name => 'action',
+ text => LedgerSMB::Report::text('Reverse'),
+ value => 'reverse',
+ type => 'submit',
+ class => 'submit'
+ },
+ ]) if $request->is_allowed_role('overpayments_reverse');
+ }
+ my @rows = $self->exec_method({funcname => 'payment__overpayments_list'});
+ for my $r (@rows){
+ $r->{row_id} = $r->{payment_id};
+ }
+ $self->rows(@rows);
+}
+
+=head1 COPYRIGHT
+
+COPYRIGHT(C) 2013 The LedgerSMB Core Team. This file may be reused under the terms
+of the GNU General Public License, versin 2 or at your option any later version.
+Please see the included LICENSE.txt for more details.
+
+=cut
+
+__PACKAGE__->meta->make_immutable;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits