[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3245] trunk
- Subject: SF.net SVN: ledger-smb:[3245] trunk
- From: ..hidden..
- Date: Tue, 14 Jun 2011 00:55:53 +0000
Revision: 3245
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3245&view=rev
Author: einhverfr
Date: 2011-06-14 00:55:52 +0000 (Tue, 14 Jun 2011)
Log Message:
-----------
First full draft of history filter template, some adjustments to stored proc
Modified Paths:
--------------
trunk/UI/Contact/history_filter.html
trunk/sql/modules/Company.sql
Modified: trunk/UI/Contact/history_filter.html
===================================================================
--- trunk/UI/Contact/history_filter.html 2011-06-13 23:05:07 UTC (rev 3244)
+++ trunk/UI/Contact/history_filter.html 2011-06-14 00:55:52 UTC (rev 3245)
@@ -216,8 +216,23 @@
<tr>
<td></td>
<td colspan="3">
- <input name="open" type=checkbox class=checkbox value=Y checked> Open
- <input name="closed" type=checkbox class=checkbox value=Y checked> Closed
+ <?lsmb
+ INCLUDE input element_data = {
+ type = 'checkbox',
+ name = 'inc_open',
+ value = '1',
+ label = text('Open'),
+ class = 'checkbox',
+ checked = 'CHECKED'
+ };
+ INCLUDE input element_data = {
+ type = 'checkbox',
+ name = 'inc_closed',
+ value = '1',
+ label = text('Closed'),
+ class = 'checkbox',
+ checked = 'CHECKED'
+ }; ?>
</td>
</tr>
</table>
@@ -229,48 +244,124 @@
<tr>
- <th align=right nowrap>Include in Report</th>
+ <th align="right" nowrap><?lsmb text('Include in Report') ?></th>
<td>
<table>
<tr>
- <td><input name=history type=radio class=radio value=summary checked> Summary</td>
- <td><input name=history type=radio class=radio value=detail> Detail
- </td>
+ <td><?lsmb
+ INCLUDE input element_data= {
+ label = text('Summary'),
+ type = 'radio',
+ value = 'summary',
+ class = 'radio',
+ checked = 'CHECKED'
+ } ?></td>
+ <td><?lsmb
+ INCLUDE input element_data= {
+ label = text('Detail'),
+ type = 'radio',
+ value = 'detail',
+ class = 'radio',
+ } ?></td>
</tr>
<tr>
- <td>
- <input name="l_partnumber" type=checkbox class=checkbox value=Y checked> Part Number
+ <td><?lsmb
+ INCLUDE input element_data = {
+ type = 'checkbox',
+ name = 'l_partnumber',
+ value = '1',
+ label = text('Part Number'), #'
+ class = 'checkbox',
+ checked = 'CHECKED'
+ }; ?>
</td>
- <td>
- <input name="l_description" type=checkbox class=checkbox value=Y checked> Description
+ <td><?lsmb
+ INCLUDE input element_data = {
+ type = 'checkbox',
+ name = 'l_description',
+ value = '1',
+ label = text('Description'),
+ class = 'checkbox',
+ checked = 'CHECKED'
+ }; ?>
</td>
- <td>
- <input name="l_sellprice" type=checkbox class=checkbox value=Y checked> Sell Price
+ <td><?lsmb
+ INCLUDE input element_data = {
+ type = 'checkbox',
+ name = 'l_sellprice',
+ value = '1',
+ label = text('Sell Price'), #'
+ class = 'checkbox',
+ }; ?>
</td>
- <td>
- <input name="l_curr" type=checkbox class=checkbox value=Y> Currency
+ <td><?lsmb
+ INCLUDE input element_data = {
+ type = 'checkbox',
+ name = 'l_curr',
+ value = '1',
+ label = text('Currency'),
+ class = 'checkbox',
+ }; ?>
</td>
</tr>
<tr>
- <td>
- <input name="l_qty" type=checkbox class=checkbox value=Y> Qty
+ <td><?lsmb
+ INCLUDE input element_data = {
+ type = 'checkbox',
+ name = 'l_qty',
+ value = '1',
+ label = text('Qty'),
+ class = 'checkbox',
+ checked = 'CHECKED'
+ }; ?>
</td>
- <td>
- <input name="l_unit" type=checkbox class=checkbox value=Y> Unit
+ <td><?lsmb
+ INCLUDE input element_data = {
+ type = 'checkbox',
+ name = 'l_unit',
+ value = '1',
+ label = text('Unit'),
+ class = 'checkbox',
+ checked = 'CHECKED'
+ }; ?>
</td>
- <td>
- <input name="l_discount" type=checkbox class=checkbox value=Y> Discount
+ <td><?lsmb
+ INCLUDE input element_data = {
+ type = 'checkbox',
+ name = 'l_discount',
+ value = '1',
+ label = text('Discount'),
+ class = 'checkbox',
+ }; ?>
</td>
<tr>
</tr>
- <td>
- <input name="l_deliverydate" type=checkbox class=checkbox value=Y> Delivery Date
+ <td><?lsmb
+ INCLUDE input element_data = {
+ type = 'checkbox',
+ name = 'l_deliverydate',
+ value = '1',
+ label = text('Delivery Date'), #'
+ class = 'checkbox',
+ }; ?>
</td>
- <td>
- <input name="l_projectnumber" type=checkbox class=checkbox value=Y> Project Number
+ <td><?lsmb
+ INCLUDE input element_data = {
+ type = 'checkbox',
+ name = 'l_projectnumber',
+ value = '1',
+ label = text('Project Number'), #'
+ class = 'checkbox',
+ }; ?>
</td>
- <td>
- <input name="l_serialnumber" type=checkbox class=checkbox value=Y> Serial Number
+ <td><?lsmb
+ INCLUDE input element_data = {
+ type = 'checkbox',
+ name = 'l_serialnumber',
+ value = '1',
+ label = text('Serial Number'), #'
+ class = 'checkbox',
+ }; ?>
</td>
</tr>
</table>
@@ -287,14 +378,15 @@
</tr>
</table>
-<input type="hidden" name="nextsub" value="list_history">
-<input type="hidden" name="path" value="bin/mozilla">
-<input type="hidden" name="login" value="ctravers">
-<input type="hidden" name="sessionid" value="">
-
<br>
-<button type="submit" class="submit" name="action" value="continue">Continue</button>
+<?lsmb INCLUDE button element_data = {
+ text = text('Continue'),
+ value = 'display_history',
+ type = 'submit',
+ class = 'submit',
+ name = 'action'
+} ?>
</form>
</body>
Modified: trunk/sql/modules/Company.sql
===================================================================
--- trunk/sql/modules/Company.sql 2011-06-13 23:05:07 UTC (rev 3244)
+++ trunk/sql/modules/Company.sql 2011-06-14 00:55:52 UTC (rev 3245)
@@ -40,7 +40,8 @@
(in_name text, in_meta_number text, in_contact_info text, in_address_line text,
in_city text, in_state text, in_zip text, in_salesperson text, in_notes text,
in_country_id int, in_from_date date, in_to_date date, in_type char(1),
- in_start_from date, in_start_to date, in_account_class int)
+ in_start_from date, in_start_to date, in_account_class int,
+ inc_open bool, inc_closed bool)
RETURNS SETOF eca_history_result AS
$$
SELECT eca.id, e.name, eca.meta_number,
@@ -62,35 +63,41 @@
person_id
FROM ar
where $16 = 2 and $13 = 'i'
+ and (($17 and amount = paid) or ($18 and amount <> paid))
UNION
select invnumber, curr, transdate, entity_credit_account, id,
person_id
FROM ap
where $16 = 1 and $13 = 'i'
+ and (($17 and amount = paid) or ($18 and amount <> paid))
union
select ordnumber, curr, transdate, entity_credit_account, id,
person_id
from oe
where ($16= 1 and oe.oe_class_id = 2 and $13 = 'o'
and quotation is not true)
+ and (($17 and not closed) or ($18 and closed))
union
select ordnumber, curr, transdate, entity_credit_account, id,
person_id
from oe
where ($16= 2 and oe.oe_class_id = 1 and $13 = 'o'
and quotation is not true)
+ and (($17 and not closed) or ($18 and closed))
union
select quonumber, curr, transdate, entity_credit_account, id,
person_id
from oe
where($16= 1 and oe.oe_class_id = 4 and $13 = 'q'
and quotation is true)
+ and (($17 and not closed) or ($18 and closed))
union
select quonumber, curr, transdate, entity_credit_account, id,
person_id
from oe
where($16= 2 and oe.oe_class_id = 4 and $13 = 'q'
and quotation is true)
+ and (($17 and not closed) or ($18 and closed))
) a ON (a.entity_credit_account = eca.id) -- broken into unions
-- for performance
JOIN ( select trans_id, parts_id, qty, description, unit, discount,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.