[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3151] trunk
- Subject: SF.net SVN: ledger-smb:[3151] trunk
- From: ..hidden..
- Date: Sun, 22 May 2011 19:37:11 +0000
Revision: 3151
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3151&view=rev
Author: einhverfr
Date: 2011-05-22 19:37:11 +0000 (Sun, 22 May 2011)
Log Message:
-----------
Undoing erroneous, untested commit
Modified Paths:
--------------
trunk/LedgerSMB/Company_Config.pm
trunk/LedgerSMB/IC.pm
trunk/LedgerSMB/Template.pm
trunk/UI/Contact/contact.html
trunk/sql/modules/Company.sql
trunk/sql/modules/Drafts.sql
trunk/sql/modules/Roles.sql
trunk/sql/modules/test/Taxform.sql
Modified: trunk/LedgerSMB/Company_Config.pm
===================================================================
--- trunk/LedgerSMB/Company_Config.pm 2011-05-22 19:32:19 UTC (rev 3150)
+++ trunk/LedgerSMB/Company_Config.pm 2011-05-22 19:37:11 UTC (rev 3151)
@@ -42,14 +42,16 @@
sub initialize{
my ($self) = @_;
- $settings= {}; # In case code is cached
- for my $key (@company_settings){
+ for my $k (keys %$settings){
+ delete $settings->{$k};
+ }
+ for my $setting (@company_settings){
my ($ref) = LedgerSMB::call_procedure($self, procname => 'setting_get',
- args => [$key ]);
+ args => [$setting]);
if ($ref->{setting_key} eq 'curr'){
- $settings->{$key } = split /:/, $ref->{value};
+ $settings->{$setting} = split /:/, $ref->{value};
} else {
- $settings->{$key } = $ref->{value};
+ $settings->{$setting} = $ref->{value};
}
}
}
Modified: trunk/LedgerSMB/IC.pm
===================================================================
--- trunk/LedgerSMB/IC.pm 2011-05-22 19:32:19 UTC (rev 3150)
+++ trunk/LedgerSMB/IC.pm 2011-05-22 19:37:11 UTC (rev 3151)
@@ -172,9 +172,8 @@
pv.lastcost, pv.leadtime,
pv.curr AS vendorcurr
FROM partsvendor pv
- JOIN entity_credit_account v
- ON (v.id = pv.credit_id)
- JOIN entity e ON (e.id = v.entity_id)
+ JOIN vendor v ON (v.id = pv.credit_id)
+ JOIN entity e ON (e.id = pv.entity_id)
WHERE pv.parts_id = ?
ORDER BY 2|;
Modified: trunk/LedgerSMB/Template.pm
===================================================================
--- trunk/LedgerSMB/Template.pm 2011-05-22 19:32:19 UTC (rev 3150)
+++ trunk/LedgerSMB/Template.pm 2011-05-22 19:37:11 UTC (rev 3151)
@@ -364,9 +364,6 @@
@mailmime = ('contenttype', $self->{mimeytype});
}
- # User default for email from
- $args->{from} ||= $self->{user}->{email};
-
# Default addresses
my $csettings = $LedgerSMB::Company_Config::settings;
$args->{from} ||= $csettings->{default_email_from};
@@ -374,10 +371,9 @@
$args->{cc} ||= $csettings->{default_email_cc};
$args->{bcc} ||= $csettings->{default_email_bcc};
-
# Mailer stuff
my $mail = new LedgerSMB::Mailer(
- from => $args->{from},
+ from => $args->{from} || $self->{user}->{email},
to => $args->{to},
cc => $args->{cc},
bcc => $args->{bcc},
Modified: trunk/UI/Contact/contact.html
===================================================================
--- trunk/UI/Contact/contact.html 2011-05-22 19:32:19 UTC (rev 3150)
+++ trunk/UI/Contact/contact.html 2011-05-22 19:37:11 UTC (rev 3151)
@@ -486,7 +486,6 @@
</tr>
<tr id="taxform-threshold-row">
- <?lsmb taxform_list.unshift({}) ?>
<td> <?lsmb INCLUDE select element_data = {
name = "taxform_id"
Modified: trunk/sql/modules/Company.sql
===================================================================
--- trunk/sql/modules/Company.sql 2011-05-22 19:32:19 UTC (rev 3150)
+++ trunk/sql/modules/Company.sql 2011-05-22 19:37:11 UTC (rev 3151)
@@ -42,7 +42,7 @@
WHERE meta_number = in_meta_number
UNION ALL
SELECT * from entity_credit_account
- WHERE in_meta_number IS NULL) ec ON (ec.entity_id = e.id)
+ WHERE meta_number IS NULL) ec ON (ec.entity_id = e.id)
LEFT JOIN business b ON (ec.business_id = b.id)
WHERE ec.entity_class = in_account_class
AND (c.id IN (select company_id FROM company_to_contact
Modified: trunk/sql/modules/Drafts.sql
===================================================================
--- trunk/sql/modules/Drafts.sql 2011-05-22 19:32:19 UTC (rev 3150)
+++ trunk/sql/modules/Drafts.sql 2011-05-22 19:37:11 UTC (rev 3151)
@@ -25,7 +25,7 @@
END) as amount
FROM (
SELECT id, transdate, reference,
- description,
+ (SELECT name FROM eca__get_entity(entity_credit_account)),
approved from gl
WHERE lower(in_type) = 'gl'
UNION
Modified: trunk/sql/modules/Roles.sql
===================================================================
--- trunk/sql/modules/Roles.sql 2011-05-22 19:32:19 UTC (rev 3150)
+++ trunk/sql/modules/Roles.sql 2011-05-22 19:37:11 UTC (rev 3151)
@@ -602,10 +602,8 @@
GRANT SELECT, INSERT ON acc_trans TO "lsmb_<?lsmb dbname ?>__payment_process";
GRANT ALL ON acc_trans_entry_id_seq TO "lsmb_<?lsmb dbname ?>__payment_process";
GRANT UPDATE ON ap TO "lsmb_<?lsmb dbname ?>__payment_process";
-GRANT ALL ON payment, payment_id_seq TO "lsmb_<?lsmb dbname ?>__payment_process";
-
INSERT INTO menu_acl (node_id, acl_type, role_name)
values (35, 'allow', 'lsmb_<?lsmb dbname ?>__payment_process');
INSERT INTO menu_acl (node_id, acl_type, role_name)
Modified: trunk/sql/modules/test/Taxform.sql
===================================================================
--- trunk/sql/modules/test/Taxform.sql 2011-05-22 19:32:19 UTC (rev 3150)
+++ trunk/sql/modules/test/Taxform.sql 2011-05-22 19:37:11 UTC (rev 3151)
@@ -25,7 +25,6 @@
INSERT INTO account_heading(id, accno ) VALUES (-255, '-billion');
INSERT INTO account (id, accno, category, heading ) VALUES (-255, '-billion', 'T', -255);
-INSERT INTO account (id, accno, category, heading ) VALUES (-256, '-billiontest', 'T', -255);
-- New account is created.
@@ -59,46 +58,20 @@
INSERT INTO ap (id, amount, approved, entity_credit_account, curr) VALUES (-258, -2500, 't'::bool, -255, 'USD');
INSERT INTO acc_trans (trans_id, chart_id, amount, approved, entry_id) VALUES (-258, -255, -2500, 't'::bool, -1003);
-INSERT INTO ap (id, amount, approved, entity_credit_account, curr) VALUES (-259, 5000, 't'::bool, -255, 'USD');
-INSERT INTO acc_trans (trans_id, chart_id, amount, approved, entry_id) VALUES (-259, -255, 5000, 't'::bool, -1004);
-
--- Set up the paid transactions
-
-INSERT INTO ap (id, amount, approved, entity_credit_account, curr) VALUES (-260, -1000, 't'::bool, -255, 'USD');
-INSERT INTO acc_trans (trans_id, chart_id, amount, approved, entry_id) VALUES (-260, -255, -1000, 't'::bool, -1005);
-INSERT INTO acc_trans (trans_id, chart_id, amount, approved, entry_id) VALUES (-260, -256, 1000, 't'::bool, -1006);
-
-INSERT INTO ap (id, amount, approved, entity_credit_account, curr) VALUES (-261, -1500, 't'::bool, -255, 'USD');
-INSERT INTO acc_trans (trans_id, chart_id, amount, approved, entry_id) VALUES (-261, -255, -1500, 't'::bool, -1007);
-INSERT INTO acc_trans (trans_id, chart_id, amount, approved, entry_id) VALUES (-261, -256, 1500, 't'::bool, -1008);
-
-INSERT INTO ap (id, amount, approved, entity_credit_account, curr) VALUES (-262, -2500, 't'::bool, -255, 'USD');
-
-INSERT INTO acc_trans (trans_id, chart_id, amount, approved, entry_id) VALUES (-262, -255, -2500, 't'::bool, -1009);
-INSERT INTO acc_trans (trans_id, chart_id, amount, approved, entry_id) VALUES (-262, -256, 2500, 't'::bool, -1010);
-
-- Now we set up the invoice entries themselves.
INSERT INTO invoice (id, trans_id, sellprice, qty) VALUES (-1000, -256, 250, 4);
INSERT INTO invoice (id, trans_id, sellprice, qty) VALUES (-1001, -257, 750, 2);
INSERT INTO invoice (id, trans_id, sellprice, qty) VALUES (-1002, -258, 500, 5);
-INSERT INTO invoice (id, trans_id, sellprice, qty) VALUES (-1003, -260, 250, 4);
-INSERT INTO invoice (id, trans_id, sellprice, qty) VALUES (-1004, -261, 750, 2);
-INSERT INTO invoice (id, trans_id, sellprice, qty) VALUES (-1005, -262, 500, 5);
-
-- And finally, the tax_form references
INSERT INTO invoice_tax_form (invoice_id, reportable) VALUES (-1000, TRUE);
INSERT INTO invoice_tax_form (invoice_id, reportable) VALUES (-1001, TRUE);
INSERT INTO invoice_tax_form (invoice_id, reportable) VALUES (-1002, TRUE);
-INSERT INTO invoice_tax_form (invoice_id, reportable) VALUES (-1003, TRUE);
-INSERT INTO invoice_tax_form (invoice_id, reportable) VALUES (-1004, TRUE);
-INSERT INTO invoice_tax_form (invoice_id, reportable) VALUES (-1005, TRUE);
-
--
-- Finally, we test if the entries are showing up
--
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.