[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[4027] branches/1.3
- Subject: SF.net SVN: ledger-smb:[4027] branches/1.3
- From: ..hidden..
- Date: Mon, 21 Nov 2011 13:46:53 +0000
Revision: 4027
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4027&view=rev
Author: einhverfr
Date: 2011-11-21 13:46:53 +0000 (Mon, 21 Nov 2011)
Log Message:
-----------
Company name can now be prepopulated on login screen
Also pricematrix view from customer/vendor fix partially complete
Modified Paths:
--------------
branches/1.3/Changelog
branches/1.3/UI/login.html
branches/1.3/sql/modules/Company.sql
Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog 2011-11-21 11:39:58 UTC (rev 4026)
+++ branches/1.3/Changelog 2011-11-21 13:46:53 UTC (rev 4027)
@@ -16,6 +16,8 @@
* Corrected permission denied to partsgroup_id_seq (Chris T)
* Corrected discount_terms not being displayed after saving (Chris T)
* Corrected language drop-down missing from email form (Chris T)
+* Customer search result label correction (Herman V)
+* Company name can now be prepopulated on login screen (Chris T)
Chris T is Chris Travers
David B is David Bandel
Modified: branches/1.3/UI/login.html
===================================================================
--- branches/1.3/UI/login.html 2011-11-21 11:39:58 UTC (rev 4026)
+++ branches/1.3/UI/login.html 2011-11-21 13:46:53 UTC (rev 4027)
@@ -44,6 +44,7 @@
name="company"
size="30"
id="company"
+ value = "<?lsmb company ?>"
accesskey="c" />
</div>
</div>
Modified: branches/1.3/sql/modules/Company.sql
===================================================================
--- branches/1.3/sql/modules/Company.sql 2011-11-21 11:39:58 UTC (rev 4026)
+++ branches/1.3/sql/modules/Company.sql 2011-11-21 13:46:53 UTC (rev 4027)
@@ -6,6 +6,25 @@
BEGIN;
+DROP TYPE IF EXISTS eca__pricematrix CASCADE;
+
+CREATE TYPE eca__pricematrix AS (
+ parts_id int,
+ int_partnumber text,
+ description text,
+ credit_id int,
+ pricebreak numeric,
+ sellprice numeric,
+ lastcost numeric,
+ leadtime int,
+ partnumber text,
+ validfrom date,
+ validto date,
+ curr char(3),
+ entry_id int
+);
+
+
DROP TYPE IF EXISTS company_search_result CASCADE;
CREATE TYPE company_search_result AS (
@@ -1312,4 +1331,29 @@
in_entity_class int
) IS
$$ Returns a list of all entity credit accounts attached to that entity.$$;
+
+
+CREATE OR REPLACE FUNCTION eca__get_pricematrix(in_id int)
+RETURNS SETOF eca__pricematrix AS
+$$
+
+SELECT pc.parts_id, p.partnumber, p.description, pc.credit_id, pc.pricebreak,
+ pc.sellprice, NULL, NULL::int, NULL, pc.validfrom, pc.validto, pc.curr,
+ pc.entry_id
+ FROM partscustomer pc
+ JOIN parts p on pc.parts_id = p.id
+ JOIN entity_credit_account eca ON pc.credit_id = eca.id
+ WHERE pc.credit_id = $1 AND eca.entity_class = 2
+ UNION
+SELECT pv.parts_id, p.partnumber, p.description, pv.credit_id, NULL, NULL,
+ pv.lastcost, pv.leadtime::int, pv.partnumber, NULL, NULL, pv.curr,
+ pv.entry_id
+ FROM partsvendor pv
+ JOIN parts p on pv.parts_id = p.id
+ JOIN entity_credit_account eca ON pv.credit_id = eca.id
+ WHERE pv.credit_id = $1 and eca.entity_class = 1
+ ORDER BY partnumber, validfrom
+
+$$ language sql;
+
COMMIT;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.