[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5350] trunk
- Subject: SF.net SVN: ledger-smb:[5350] trunk
- From: ..hidden..
- Date: Sat, 15 Dec 2012 07:23:43 +0000
Revision: 5350
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5350&view=rev
Author: einhverfr
Date: 2012-12-15 07:23:40 +0000 (Sat, 15 Dec 2012)
Log Message:
-----------
Initial bug fixes for transaction search and outstanding reports
Modified Paths:
--------------
trunk/LedgerSMB/Scripts/invoice.pm
trunk/UI/Reports/filters/invoice_outstanding.html
trunk/UI/Reports/filters/invoice_search.html
trunk/UI/lib/report_base.html
trunk/css/ledgersmb.css
Removed Paths:
-------------
trunk/UI/Reports/filters/search_purchases.html
Modified: trunk/LedgerSMB/Scripts/invoice.pm
===================================================================
--- trunk/LedgerSMB/Scripts/invoice.pm 2012-12-15 06:13:37 UTC (rev 5349)
+++ trunk/LedgerSMB/Scripts/invoice.pm 2012-12-15 07:23:40 UTC (rev 5350)
@@ -27,14 +27,14 @@
=over
-=item begin_report
+=item start_report
This is a specialized preprocessor for LedgerSMB::Scripts::Report::begin_report
which sets up various data structures for the report screens.
=cut
-sub begin_report {
+sub start_report {
my ($request) = @_;
my $link;
if ($request->{entity_class} == 1){
@@ -51,7 +51,7 @@
@{$request->{employees}} = $request->call_procedure(
procname => 'employee__all_salespeople'
);
- LedgerSMB::Scripts::reports::begin_report($request);
+ LedgerSMB::Scripts::reports::start_report($request);
}
=item invoices_outstanding
@@ -63,20 +63,20 @@
sub invoices_outstanding {
my ($request) = @_;
- my $report = LedgerSMB::Reports::Invoices::Outstanding->new(%$request);
+ my $report = LedgerSMB::Report::Invoices::Outstanding->new(%$request);
$report->render($request);
}
-=item search_transactions
+=item invoice_search
This produces the transactions earch report. See
LedgerSMB::Report::Invoices::Transactions for expected properties.
=cut
-sub search_transactions {
+sub invoice_search{
my ($request) = @_;
- my $report = LedgerSMB::Reports::Invoices::Transactions->new(%$request);
+ my $report = LedgerSMB::Report::Invoices::Transactions->new(%$request);
$report->render($request);
}
Modified: trunk/UI/Reports/filters/invoice_outstanding.html
===================================================================
--- trunk/UI/Reports/filters/invoice_outstanding.html 2012-12-15 06:13:37 UTC (rev 5349)
+++ trunk/UI/Reports/filters/invoice_outstanding.html 2012-12-15 07:23:40 UTC (rev 5350)
@@ -1,5 +1,5 @@
<?lsmb INCLUDE "ui-header.html" ;
- PROCESS "report-base.html";
+ PROCESS "report_base.html";
PROCESS "elements.html";
IF entity_class == 1;
TITLE = text('AP Outstanding'); #'
@@ -9,7 +9,16 @@
TITLE = text('AR Outstanding'); #'
NAME = text('Customer');
META_NUMBER = text('Customer Number'); #'
- END; ?>
+ END;
+ FOREACH T IN accounts;
+ T.text = T.accno _ '--' _ T.description;
+ END;
+ accounts.unshift({});
+ FOREACH T IN tax_accounts;
+ T.text = T.accno _ '--' _ T.description;
+ END;
+ accounts.unshift({});
+?>
<body>
<form action="invoice.pl" method="GET">
<?lsmb PROCESS input element_data = {
@@ -51,7 +60,7 @@
} ?></td>
</tr>
<?lsmb PROCESS employee_row ?>
-<?lsmb PROCESS business_units ?>
+<?lsmb PROCESS business_classes ?>
<tr id="ship-via-row">
<th><?lsmb text('Ship Via') ?></th>
<td><?lsmb PROCESS input element_data = {
@@ -62,7 +71,7 @@
class = "text"
} ?></td>
</tr>
-<?lsmb PROCESS date_row ?>
+<?lsmb label_pos = 1; PROCESS date_row ?>
<tr id="onhold-row">
<th><?lsmb text('Invoice Status') ?></th>
<td><?lsmb PROCESS input element_data = {
@@ -86,11 +95,11 @@
}; ?></td>
</tr>
<tr>
-<th colspan=2><?lsmb text('Include in Report') ?></th>
+<th colspan="4" class="centered"><?lsmb text('Include in Report') ?></th>
</tr>
<tr>
<th> </th>
- <td>
+ <td colspan="3">
<table>
<tr>
<td><?lsmb PROCESS input element_data = {
@@ -275,6 +284,7 @@
value = 'invoice_outstanding'
type = 'submit'
class = 'submit'
+ text = text('Continue')
} ?>
</form>
</body>
Modified: trunk/UI/Reports/filters/invoice_search.html
===================================================================
--- trunk/UI/Reports/filters/invoice_search.html 2012-12-15 06:13:37 UTC (rev 5349)
+++ trunk/UI/Reports/filters/invoice_search.html 2012-12-15 07:23:40 UTC (rev 5350)
@@ -1,5 +1,5 @@
<?lsmb INCLUDE "ui-header.html" ;
- PROCESS "report-base.html";
+ PROCESS "report_base.html";
PROCESS "elements.html";
IF entity_class == 1;
TITLE = text('Search AP Invoices'); #'
@@ -9,7 +9,12 @@
TITLE = text('Search AR Invoices'); #'
NAME = text('Customer');
META_NUMBER = text('Customer Number'); #'
- END; ?>
+ END;
+ FOREACH T IN accounts;
+ T.text = T.accno _ '--' _ T.description;
+ END;
+ accounts.unshift({});
+?>
<body>
<form action="invoice.pl" method="GET">
<?lsmb PROCESS input element_data = {
@@ -27,7 +32,7 @@
text_attr = 'text',
default_values = [account_id],
class = 'account',
- options = 'ar_ap_accounts'
+ options = accounts
} ?></td>
</tr>
<tr id="name-row">
@@ -51,7 +56,7 @@
} ?></td>
</tr>
<?lsmb PROCESS employee_row ?>
-<?lsmb PROCESS business_units ?>
+<?lsmb PROCESS business_classes ?>
<tr id="taxable-row">
<th><?lsmb text('Tax Status') ?></th>
<td><?lsmb PROCESS select element_data = {
@@ -64,13 +69,18 @@
</tr>
<tr id="tax-account-row">
<th><?lsmb text('Tax Account') ?></th>
- <td><?lsmb PROCESS select element_data = {
+ <td><?lsmb
+ FOREACH T IN tax_accounts;
+ T.text = T.accno _ '--' _ T.description;
+ END;
+ tax_accounts.unshift({});
+ PROCESS select element_data = {
name = 'tax_account_id',
value_attr = 'id',
text_attr = 'text',
default_values = [tax_account_id],
class = 'account',
- options = 'tax_accounts'
+ options = tax_accounts
} ?></td>
</tr>
<tr id="invnumber-row">
@@ -146,7 +156,7 @@
<?lsmb PROCESS date_row ?>
<tr id="onhold-row">
<th><?lsmb text('Invoice Status') ?></th>
- <td><?lsmb PROCESS input element_data = {
+ <td><?lsmb label_pos = 1; PROCESS input element_data = {
label = text('All')
type = 'radio'
name = 'on_hold'
@@ -167,11 +177,11 @@
}; ?></td>
</tr>
<tr>
-<th colspan=2><?lsmb text('Include in Report') ?></th>
+<th colspan="4" class="centered"><?lsmb text('Include in Report') ?></th>
</tr>
<tr>
<th> </th>
- <td>
+ <td colspan="3">
<table>
<tr>
<td><?lsmb PROCESS input element_data = {
@@ -356,6 +366,7 @@
value = 'invoice_search'
type = 'submit'
class = 'submit'
+ text = text('Continue')
} ?>
</form>
</body>
Deleted: trunk/UI/Reports/filters/search_purchases.html
===================================================================
--- trunk/UI/Reports/filters/search_purchases.html 2012-12-15 06:13:37 UTC (rev 5349)
+++ trunk/UI/Reports/filters/search_purchases.html 2012-12-15 07:23:40 UTC (rev 5350)
@@ -1,433 +0,0 @@
-<?lsmb INCLUDE 'ui-header.html'
- include_script = ["UI/ajax/scriptaculous/lib/prototype.js","UI/ajax/scriptaculous/src/scriptaculous.js?load=builder,effects,dragdrop,controls","UI/ajax/helpers.js"]
-?>
-<?lsmb PROCESS 'elements.html';
- PROCESS 'report_base.html';
-
-IF entity_class == 1;
- report_type = 'AR';
- name_label = text('Vendor');
- eca_label = text('Vendor Number'); #'
-END;
-IF entity_class == 2;
- report_type = 'AP';
- name_label = text('Customer');
- eca_label = text('Customer Number'); #'
-END;
-
- ?>
-<body>
-
-<form method="get" action="journal.pl">
-<?lsmb PROCESS input element_data = {
- name = 'entity_class'
- type = 'hidden'
- value = entity_class
-} ?>
-<table width="100%">
- <tr>
- <th class="listtop"><?lsmb text('Search Transactions', ) ?></th>
-
- </tr>
- <tr height="5"></tr>
- <tr>
- <td>
- <table>
- <tr>
- <th align="right"><?lsmb text('Account') ?></th>
- <td colspan="3">
- <?lsmb PROCESS ajaxselect element_data = {
- name = "accno"
- initial_value = accno
- text_attr = 'accno'
- value_attr = 'id'
- ajax_target = 'journal.pl'
- params = { link_desc = report_type }
- } ?> </td>
- </tr>
- <tr>
- <th align="right"><?lsmb name_label ?></th>
- <td colspan="3">
- <?lsmb PROCESS input element_data = {
- name = 'name_part'
- type = 'text'
- value = name_part
- size = 32
- class = 'name'
- } ?>
- </td>
- </tr>
- <tr>
- <th align="right"><?lsmb eca_label ?></th>
- <td colspan="3">
- <?lsmb PROCESS input element_data = {
- name = 'meta_number'
- type = 'text'
- value = meta_number
- size = 32
- class = 'control-code'
- } ?>
- </td>
- </tr>
- <?lsmb PROCESS business_classes ?>
- <tr>
- <th align="right"><?lsmb text('Invoice Number') ?></th>
- <td colspan="3">
- <?lsmb PROCESS input element_data = {
- name = 'invnumber'
- type = 'text'
- value = invnumber
- size = 32
- class = 'control-code'
- } ?>
- </td>
- </tr>
- <tr>
- <th align="right"><?lsmb text('Order Number') ?></th>
- <td colspan="3">
- <?lsmb PROCESS input element_data = {
- name = 'meta_number'
- type = 'text'
- value = ordnumber
- size = 32
- class = 'control-code'
- } ?>
- </td>
- </tr>
- <tr>
- <th align="right"><?lsmb text('PO Number') ?></th>
- <td colspan="3">
- <?lsmb PROCESS input element_data = {
- name = 'ponumber'
- type = 'text'
- value = ponumber
- size = 32
- class = 'control-code'
- } ?>
- </td>
- </tr>
- <tr>
- <th align="right"><?lsmb text('Source') ?></th>
- <td colspan="3">
- <?lsmb PROCESS input element_data = {
- name = 'source'
- type = 'text'
- value = source
- size = 32
- class = 'control-code'
- } ?>
- </td>
- </tr>
- <tr>
- <th align="right"><?lsmb text('Description') ?></th>
- <td colspan="3">
- <?lsmb PROCESS input element_data = {
- name = 'description'
- type = 'text'
- value = description
- size = 40
- class = 'description'
- } ?>
- </td>
- </tr>
- <tr>
- <th align="right"><?lsmb text('Notes') ?></th>
- <td colspan="3">
- <?lsmb PROCESS input element_data = {
- name = 'notes'
- type = 'text'
- value = notes
- size = 40
- class = 'notes'
- } ?>
- </td>
- </tr>
- <tr>
- <th align="right"><?lsmb text('Ship via') ?></th>
- <td colspan="3">
- <?lsmb PROCESS input element_data = {
- name = 'ship_via'
- type = 'text'
- value = ship_via
- size = 40
- class = 'description'
- } ?>
- </td>
- </tr>
- <?lsmb PROCESS date_row ?>
- <tr>
- <th align="right"><?lsmb text('Payments As Of') ?></th>
- <td colspan="3">
- <?lsmb PROCESS input element_data = {
- name = 'as_of'
- type = 'text'
- value = as_of
- size = 11
- class = 'date'
- } ?>
- </td>
- </tr>
- <tr>
- <th align="right"><?lsmb text('Report Type') ?></th>
- <td colspan='3'>
- <?lsmb PROCESS input element_data = {
- name = 'summarize'
- type = 'radio'
- label = text('Summary')
- value = '1'
- checked = 'checked'
- } ?>
- <?lsmb PROCESS input element_data = {
- name = 'summarize'
- type = 'radio'
- label = text('Detail')
- value = '0'
- } ?>
- </td>
- </tr>
- <th><?lsmb text('Include In Report') ?></th>
- <td colspan='7'>
- <table class='criteria'>
- <tr>
- <td>
- <?lsmb PROCESS input element_data = {
- name = 'on_hold'
- type = 'radio'
- label = text('All Invoices') #'
- value = ''
- checked = 'checked'
- } ?>
- </td>
- <td>
- <?lsmb PROCESS input element_data = {
- name = 'on_hold'
- type = 'radio'
- label = text('Active')
- value = '0'
- } ?>
- </td>
- <td>
- <?lsmb PROCESS input element_data = {
- name = 'on_hold'
- type = 'radio'
- label = text('On Hold') #'
- value = '1'
- } ?>
- </td>
- </tr>
- <tr>
- <td>
- <?lsmb PROCESS input element_data = {
- name = 'inc_open'
- type = 'checkbox'
- checked = 'checked'
- label = text('Open')
- value = 1
- } ?>
- </td>
- <td>
- <?lsmb PROCESS input element_data = {
- name = 'inc_closed'
- type = 'checkbox'
- label = text('Closed')
- value = 1
- } ?>
- </td>
- </tr>
- <tr>
- <td colspan="3"><hr /></td>
- </tr>
- <tr>
- <td>
- <?lsmb PROCESS input element_data = {
- name = 'col_running_number'
- type = 'checkbox'
- value = 1
- label = text('Running Number') #'
- } ?>
- </td>
- <td>
- <?lsmb PROCESS input element_data = {
- name = 'col_id'
- type = 'checkbox'
- value = 1
- label = text('ID')
- } ?>
- </td>
- <td>
- <?lsmb PROCESS input element_data = {
- name = 'col_invnumber'
- type = 'checkbox'
- value = 1
- label = text('Invoice Number') #'
- checked = 'checked'
- } ?>
- </td>
- <td>
- <?lsmb PROCESS input element_data = {
- name = 'col_ordnumber'
- type = 'checkbox'
- value = 1
- label = text('Order Number') #'
- } ?>
- </td>
- <td>
- <?lsmb PROCESS input element_data = {
- name = 'col_ponumber'
- type = 'checkbox'
- value = 1
- label = text('PO Number') #'
- } ?>
- </td>
- </tr>
- <tr>
- <td>
- <?lsmb PROCESS input element_data = {
- name = 'col_transdate'
- type = 'checkbox'
- value = 1
- checked = 'checked'
- label = text('Invoice Date') #'
- } ?>
- </td>
- <td>
- <?lsmb PROCESS input element_data = {
- name = 'col_business_units'
- type = 'checkbox'
- value = 1
- label = text('Reporting Units') #'
- } ?>
- </td>
- <td>
- <?lsmb PROCESS input element_data = {
- name = 'col_name'
- type = 'checkbox'
- value = 1
- label = name_label
- checked = 'checked'
- } ?>
- </td>
- <td>
- <?lsmb PROCESS input element_data = {
- name = 'col_amount'
- type = 'checkbox'
- value = 1
- checked = 'checked'
- label = text('Amount')
- } ?>
- </td>
- <td>
- <?lsmb PROCESS input element_data = {
- name = 'col_tax'
- type = 'checkbox'
- value = 1
- label = text('Tax')
- } ?>
- </td>
- </tr>
- <tr>
- <td>
- <?lsmb PROCESS input element_data = {
- name = 'col_total'
- type = 'checkbox'
- value = 1
- checked = 'checked'
- label = text('Total')
- } ?>
- </td>
- <td>
- <?lsmb PROCESS input element_data = {
- name = 'col_currency'
- type = 'checkbox'
- value = 1
- label = text('Currency')
- } ?>
- </td>
- <td>
- <?lsmb PROCESS input element_data = {
- name = 'col_date_paid'
- type = 'checkbox'
- value = 1
- label = text('Date Paid') #'
- } ?>
- </td>
- <td>
- <?lsmb PROCESS input element_data = {
- name = 'col_paid'
- type = 'checkbox'
- value = 1
- label = text('Paid')
- checked = 'checked'
- } ?>
- </td>
- <td>
- <?lsmb PROCESS input element_data = {
- name = 'col_duedate'
- type = 'checkbox'
- value = 1
- label = text('Due Date') #'
- } ?>
- </td>
- </tr>
- <tr>
- <td>
- <?lsmb PROCESS input element_data = {
- name = 'col_due'
- type = 'checkbox'
- value = 1
- checked = 'checked'
- label = text('Amount Due') #'
- } ?>
- </td>
- <td>
- <?lsmb PROCESS input element_data = {
- name = 'col_notes'
- type = 'checkbox'
- value = 1
- label = text('Notes')
- } ?>
- </td>
- <td>
- <?lsmb PROCESS input element_data = {
- name = 'col_shipping_point'
- type = 'checkbox'
- value = 1
- label = text('Shipping Point') #'
- } ?>
- </td>
- <td>
- <?lsmb PROCESS input element_data = {
- name = 'col_ship_via'
- type = 'checkbox'
- value = 1
- label = text('Ship Via') #'
- } ?>
- </td>
- </tr>
- <tr>
- <td>
- <?lsmb PROCESS input element_data = {
- name = 'inc_subtotals'
- type = 'checkbox'
- value = 1
- label = text('Subtotals')
- } ?>
- </td>
- </tr>
- </table>
- </td>
- </tr>
-</table>
-</td>
-</tr>
-</table>
-<hr />
-<?lsmb PROCESS button element_data = {
- text = text('Continue')
- name = 'action'
- type = 'submit'
- class = 'submit'
- value = 'search_purchases'
-} ?>
-</body>
-</html>
Modified: trunk/UI/lib/report_base.html
===================================================================
--- trunk/UI/lib/report_base.html 2012-12-15 06:13:37 UTC (rev 5349)
+++ trunk/UI/lib/report_base.html 2012-12-15 07:23:40 UTC (rev 5350)
@@ -191,14 +191,15 @@
<?lsmb
- BLOCK employees;
+ BLOCK employee_row;
# DEFAULTS
IF ! SELECTNAME.defined;
SELECTNAME = 'employee_id';
END;
FOREACH e IN employees;
e.text = e.first_name _ ' ' _ e.last_name;
- END ?>
+ END;
+ employees.push({}) ?>
<tr>
<th><?lsmb text('Employees') ?></th>
<td><?lsmb PROCESS select element_data = {
Modified: trunk/css/ledgersmb.css
===================================================================
--- trunk/css/ledgersmb.css 2012-12-15 06:13:37 UTC (rev 5349)
+++ trunk/css/ledgersmb.css 2012-12-15 07:23:40 UTC (rev 5350)
@@ -30,6 +30,14 @@
font-size: 10pt;
}
+table.form th {
+ text-align: right;
+}
+
+table.form th.centered, th.centered {
+ text-align: center;
+}
+
table.criteria td {
text-align: right;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.