[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[4031] trunk
- Subject: SF.net SVN: ledger-smb:[4031] trunk
- From: ..hidden..
- Date: Tue, 22 Nov 2011 08:56:41 +0000
Revision: 4031
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4031&view=rev
Author: einhverfr
Date: 2011-11-22 08:56:40 +0000 (Tue, 22 Nov 2011)
Log Message:
-----------
Merging from branches/1.3
Modified Paths:
--------------
trunk/Changelog
trunk/LedgerSMB/OE.pm
trunk/LedgerSMB/ScriptLib/Company.pm
trunk/UI/io-email.html
trunk/UI/login.html
trunk/sql/modules/Company.sql
trunk/sql/modules/Roles.sql
Property Changed:
----------------
trunk/
trunk/LedgerSMB/Scripts/admin.pm
trunk/LedgerSMB/Scripts/employee.pm
trunk/LedgerSMB/Scripts/payment.pm
trunk/LedgerSMB/Scripts/setup.pm
trunk/sql/upgrade/1.2-1.3-manual.sql
Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3:3711-4020
+ /branches/1.3:3711-4030
Modified: trunk/Changelog
===================================================================
--- trunk/Changelog 2011-11-21 23:36:39 UTC (rev 4030)
+++ trunk/Changelog 2011-11-22 08:56:40 UTC (rev 4031)
@@ -20,6 +20,12 @@
* Logging improvements (Herman V)
* Fixed SQL errors in Goods and Services/All Items report (David B)
* Corrected issue saving country in contact.html (Pongracz I)
+* 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)
+* Corrected SQL error in OE.pm (Herman V)
Chris T is Chris Travers
David B is David Bandel
Modified: trunk/LedgerSMB/OE.pm
===================================================================
--- trunk/LedgerSMB/OE.pm 2011-11-21 23:36:39 UTC (rev 4030)
+++ trunk/LedgerSMB/OE.pm 2011-11-22 08:56:40 UTC (rev 4031)
@@ -149,9 +149,10 @@
my ( $warehouse, $warehouse_id ) = split /--/, $form->{warehouse};
+ #HV alias company.ct changed to company.c
$query = qq|
SELECT DISTINCT o.id, o.ordnumber, o.transdate,
- o.reqdate, o.amount, ct.legal_name, o.netamount,
+ o.reqdate, o.amount, c.legal_name, o.netamount,
o.entity_credit_account as $form->{vc}_id, ex.$rate AS exchangerate,
o.closed, o.quonumber, o.shippingpoint,
o.shipvia, ee.name AS employee, o.curr,
@@ -159,7 +160,7 @@
FROM oe o
JOIN entity_credit_account eca
ON (o.entity_credit_account = eca.id)
- JOIN company ct ON eca.entity_id = ct.entity_id
+ JOIN company c ON eca.entity_id = c.entity_id
JOIN orderitems oi ON (oi.trans_id = o.id)
JOIN parts p ON (p.id = oi.parts_id)|;
@@ -200,7 +201,7 @@
$query .= qq| AND o.$form->{vc}_id = $form->{"$form->{vc}_id"}|;
}
elsif ( $form->{ $form->{vc} } ne "" ) {
- $query .= " AND lower(ct.legal_name) LIKE ?";
+ $query .= " AND lower(c.legal_name) LIKE ?";
push @queryargs, $name;
}
Modified: trunk/LedgerSMB/ScriptLib/Company.pm
===================================================================
--- trunk/LedgerSMB/ScriptLib/Company.pm 2011-11-21 23:36:39 UTC (rev 4030)
+++ trunk/LedgerSMB/ScriptLib/Company.pm 2011-11-22 08:56:40 UTC (rev 4031)
@@ -360,13 +360,17 @@
$search_url .= "&$_=$form->{$_}";
}
+ my $meta_number_name;
+ if($company->{account_class}==1){$meta_number_name='Vendor Number';}
+ elsif($company->{account_class}==2){$meta_number_name='Customer Number';}
+ else{$meta_number_name='Unknown';}
# Column definitions for dynatable
@columns = qw(legal_name entity_control_code meta_number credit_description business_type curr);
my $column_names = {
legal_name => 'Name',
entity_control_code => 'Control Code',
- meta_number => 'Vendor Number',
+ meta_number => $meta_number_name,
credit_description => 'Description',
business_type => 'Business Type',
curr => 'Currency'
@@ -387,7 +391,8 @@
curr => $ref->{curr},
};
}
- my $label = $ec_labels->{"$company->{account_class}"};
+ #my $label = $ec_labels->{"$company->{account_class}"};
+ my $label_text="Add ".$ec_labels->{"$company->{account_class}"};
# CT: Labels for i18n:
# text->{'Add Customer')
# text->('Add Vendor')
@@ -405,7 +410,7 @@
# },
{name => 'action',
value => 'add',
- text => $company->{_locale}->text("Add [_1]", $label),
+ text => $company->{_locale}->text($label_text),
type => 'submit',
class => 'submit',
}
Property changes on: trunk/LedgerSMB/Scripts/admin.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-4020
/branches/1.3/scripts/admin.pl:3711-3903
+ /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-4030
/branches/1.3/scripts/admin.pl:3711-3903
Property changes on: trunk/LedgerSMB/Scripts/employee.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-4020
/branches/1.3/scripts/employee.pl:3842-3843
+ /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-4030
/branches/1.3/scripts/employee.pl:3842-3843
Property changes on: trunk/LedgerSMB/Scripts/payment.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/payment.pm:4010-4020
/branches/1.3/scripts/payment.pl:3711-4011
+ /branches/1.3/LedgerSMB/Scripts/payment.pm:4010-4030
/branches/1.3/scripts/payment.pl:3711-4011
Property changes on: trunk/LedgerSMB/Scripts/setup.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/setup.pm:3937-4020
/branches/1.3/scripts/setup.pl:3711-3967
+ /branches/1.3/LedgerSMB/Scripts/setup.pm:3937-4030
/branches/1.3/scripts/setup.pl:3711-3967
Modified: trunk/UI/io-email.html
===================================================================
--- trunk/UI/io-email.html 2011-11-21 23:36:39 UTC (rev 4030)
+++ trunk/UI/io-email.html 2011-11-22 08:56:40 UTC (rev 4031)
@@ -49,6 +49,7 @@
</td>-->
<td><?lsmb PROCESS select element_data=print.format ?></td>
<td><?lsmb PROCESS select element_data=print.media ?> </td>
+ <td><?lsmb PROCESS select element_data=print.lang ?> </td>
<?lsmb PROCESS input element_data = {
name = "formname"
type = "hidden"
Modified: trunk/UI/login.html
===================================================================
--- trunk/UI/login.html 2011-11-21 23:36:39 UTC (rev 4030)
+++ trunk/UI/login.html 2011-11-22 08:56:40 UTC (rev 4031)
@@ -44,6 +44,7 @@
name="company"
size="30"
id="company"
+ value = "<?lsmb company ?>"
accesskey="c" />
</div>
</div>
Modified: trunk/sql/modules/Company.sql
===================================================================
--- trunk/sql/modules/Company.sql 2011-11-21 23:36:39 UTC (rev 4030)
+++ trunk/sql/modules/Company.sql 2011-11-22 08:56:40 UTC (rev 4031)
@@ -4,6 +4,29 @@
-- Docstrings already added to this file.
+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 (
entity_id int,
entity_control_code text,
@@ -18,6 +41,8 @@
curr text
);
+DROP TYPE IF EXISTS eca_history_result CASCADE;
+
create type eca_history_result as (
id int,
name text,
@@ -405,7 +430,7 @@
COMMENT ON FUNCTION entity_list_contact_class() IS
$$ Returns a list of contact classes ordered by ID.$$;
-
+DROP TYPE IF EXISTS entity_credit_search_return CASCADE;
CREATE TYPE entity_credit_search_return AS (
legal_name text,
id int,
@@ -430,11 +455,14 @@
threshold numeric
);
+DROP TYPE IF EXISTS entity_credit_retrieve CASCADE;
+
CREATE TYPE entity_credit_retrieve AS (
id int,
entity_id int,
entity_class int,
discount numeric,
+ discount_terms int,
taxincluded bool,
creditlimit numeric,
terms int2,
@@ -486,7 +514,8 @@
BEGIN
FOR out_row IN
- SELECT c.id, e.id, ec.entity_class, ec.discount,
+ SELECT c.id, e.id, ec.entity_class, ec.discount,
+ ec.discount_terms,
ec.taxincluded, ec.creditlimit, ec.terms,
ec.meta_number, ec.description, ec.business_id,
ec.language_code,
@@ -569,7 +598,7 @@
COMMENT ON FUNCTION list_taxforms (in_entity_id int) IS
$$Returns a list of tax forms for the entity's country.$$; --'
-
+DROP TYPE IF EXISTS company_billing_info CASCADE;
CREATE TYPE company_billing_info AS (
legal_name text,
meta_number text,
@@ -611,6 +640,7 @@
account.$$;
+DROP FUNCTION IF EXISTS company_save(int, text, int, text, text, int, text, int);
CREATE OR REPLACE FUNCTION company_save (
in_id int, in_control_code text, in_entity_class int,
in_name text, in_tax_id TEXT,
@@ -814,6 +844,7 @@
COMMENT ON FUNCTION company__list_locations(in_entity_id int) IS
$$ Lists all locations for an entity.$$;
+DROP TYPE IF EXISTS contact_list CASCADE;
CREATE TYPE contact_list AS (
class text,
class_id int,
@@ -975,6 +1006,7 @@
(in_entity_id int, in_contact_class int, in_description text, in_contact text) IS
$$ Saves company contact information. The return value is meaningless. $$;
+DROP TYPE IF EXISTS entity_note_list CASCADE;
CREATE TYPE entity_note_list AS (
id int,
note_class int,
@@ -1300,3 +1332,28 @@
) 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;
Modified: trunk/sql/modules/Roles.sql
===================================================================
--- trunk/sql/modules/Roles.sql 2011-11-21 23:36:39 UTC (rev 4030)
+++ trunk/sql/modules/Roles.sql 2011-11-22 08:56:40 UTC (rev 4031)
@@ -757,7 +757,7 @@
GRANT ALL ON partsvendor, partscustomer TO "lsmb_<?lsmb dbname ?>__part_create";
GRANT INSERT ON parts, makemodel, partsgroup, assembly TO "lsmb_<?lsmb dbname ?>__part_create";
-GRANT ALL ON parts_id_seq TO "lsmb_<?lsmb dbname ?>__part_create";
+GRANT ALL ON parts_id_seq, partsgroup_id_seq TO "lsmb_<?lsmb dbname ?>__part_create";
GRANT INSERT ON partstax TO "lsmb_<?lsmb dbname ?>__part_create";
INSERT INTO menu_acl (node_id, acl_type, role_name)
Property changes on: trunk/sql/upgrade/1.2-1.3-manual.sql
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/sql/upgrade/1.2-1.3-manual.sql:3712-4020
/branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710
+ /branches/1.3/sql/upgrade/1.2-1.3-manual.sql:3712-4030
/branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.