[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[4726] trunk
- Subject: SF.net SVN: ledger-smb:[4726] trunk
- From: ..hidden..
- Date: Sat, 19 May 2012 00:56:20 +0000
Revision: 4726
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4726&view=rev
Author: einhverfr
Date: 2012-05-19 00:56:19 +0000 (Sat, 19 May 2012)
Log Message:
-----------
Merging from branches/1.3
Modified Paths:
--------------
trunk/Changelog
trunk/LedgerSMB/DBObject/Entity.pm
trunk/LedgerSMB/Form.pm
trunk/LedgerSMB/Template/CSV.pm
trunk/UI/Contact/contact.html
trunk/UI/Contact/divs/credit.html
trunk/UI/Contact/divs/notes.html
trunk/UI/lib/dynatable.csv
trunk/bin/arapprn.pl
trunk/bin/io.pl
trunk/sql/Pg-database.sql
trunk/sql/modules/Company.sql
Property Changed:
----------------
trunk/
trunk/LedgerSMB/Scripts/account.pm
trunk/LedgerSMB/Scripts/admin.pm
trunk/LedgerSMB/Scripts/customer.pm
trunk/LedgerSMB/Scripts/employee.pm
trunk/LedgerSMB/Scripts/file.pm
trunk/LedgerSMB/Scripts/journal.pm
trunk/LedgerSMB/Scripts/login.pm
trunk/LedgerSMB/Scripts/menu.pm
trunk/LedgerSMB/Scripts/payment.pm
trunk/LedgerSMB/Scripts/recon.pm
trunk/LedgerSMB/Scripts/setup.pm
trunk/LedgerSMB/Scripts/taxform.pm
trunk/LedgerSMB/Scripts/vendor.pm
trunk/sql/upgrade/1.2-1.3-manual.sql
Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3:3711-4721
+ /branches/1.3:3711-4725
Modified: trunk/Changelog
===================================================================
--- trunk/Changelog 2012-05-19 00:28:20 UTC (rev 4725)
+++ trunk/Changelog 2012-05-19 00:56:19 UTC (rev 4726)
@@ -52,7 +52,10 @@
Changelog for 1.3.18
* Fixed missing template for CSV pricelists (Chris T)
* Added ODS pricelists (Chris T)
+* Better CSV escaping (Chris T, h/t Erik H)
+* Fixed menu errors preventing quote/rfq template editing (Chris T, 3524793)
+
Changelog for 1.3.17
* Address now shows on ECA selection screen (Erik H)
* Taxes::Simple now respects min/max values based on subtotal (Chris T)
Modified: trunk/LedgerSMB/DBObject/Entity.pm
===================================================================
--- trunk/LedgerSMB/DBObject/Entity.pm 2012-05-19 00:28:20 UTC (rev 4725)
+++ trunk/LedgerSMB/DBObject/Entity.pm 2012-05-19 00:56:19 UTC (rev 4726)
@@ -45,7 +45,7 @@
=cut
-has 'control_code' => (is => 'rw', isa => 'Str', required => 1, default => 'DEFAULT');
+has 'control_code' => (is => 'rw', isa => 'Maybe[Str]', required => 1, default => 'DEFAULT');
=item name
Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm 2012-05-19 00:28:20 UTC (rev 4725)
+++ trunk/LedgerSMB/Form.pm 2012-05-19 00:56:19 UTC (rev 4726)
@@ -1285,7 +1285,7 @@
}
LedgerSMB::Company_Config::initialize($self);
$sth->finish();
- LedgerSMB::App_State::DBH = $self->{dbh};
+ $LedgerSMB::App_State::DBH = $self->{dbh};
$logger->trace("end");
}
Property changes on: trunk/LedgerSMB/Scripts/account.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/account.pm:4369-4721
/branches/1.3/scripts/account.pl:3711-4368
+ /branches/1.3/LedgerSMB/Scripts/account.pm:4369-4725
/branches/1.3/scripts/account.pl:3711-4368
Property changes on: trunk/LedgerSMB/Scripts/admin.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-4721
/branches/1.3/scripts/admin.pl:3711-4678
+ /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-4725
/branches/1.3/scripts/admin.pl:3711-4678
Property changes on: trunk/LedgerSMB/Scripts/customer.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/customer.pm:4288-4721
/branches/1.3/scripts/customer.pl:4273-4287
+ /branches/1.3/LedgerSMB/Scripts/customer.pm:4288-4725
/branches/1.3/scripts/customer.pl:4273-4287
Property changes on: trunk/LedgerSMB/Scripts/employee.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-4721
/branches/1.3/scripts/employee.pl:3842-3843,4273-4287,4289-4310
+ /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-4725
/branches/1.3/scripts/employee.pl:3842-3843,4273-4287,4289-4310
Property changes on: trunk/LedgerSMB/Scripts/file.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/file.pm:3711-4721
/branches/1.3/scripts/file.pl:3711-4138
+ /branches/1.3/LedgerSMB/Scripts/file.pm:3711-4725
/branches/1.3/scripts/file.pl:3711-4138
Property changes on: trunk/LedgerSMB/Scripts/journal.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/journal.pm:4288-4721
/branches/1.3/scripts/journal.pl:3711-4328
+ /branches/1.3/LedgerSMB/Scripts/journal.pm:4288-4725
/branches/1.3/scripts/journal.pl:3711-4328
Property changes on: trunk/LedgerSMB/Scripts/login.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/login.pm:4193-4721
/branches/1.3/scripts/login.pl:3711-4192
+ /branches/1.3/LedgerSMB/Scripts/login.pm:4193-4725
/branches/1.3/scripts/login.pl:3711-4192
Property changes on: trunk/LedgerSMB/Scripts/menu.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/menu.pm:4155-4721
/branches/1.3/scripts/menu.pl:3711-4192,4273-4287
+ /branches/1.3/LedgerSMB/Scripts/menu.pm:4155-4725
/branches/1.3/scripts/menu.pl:3711-4192,4273-4287
Property changes on: trunk/LedgerSMB/Scripts/payment.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/payment.pm:4010-4721
/branches/1.3/scripts/payment.pl:3711-4680
+ /branches/1.3/LedgerSMB/Scripts/payment.pm:4010-4725
/branches/1.3/scripts/payment.pl:3711-4680
Property changes on: trunk/LedgerSMB/Scripts/recon.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/recon.pm:3711-4721
/branches/1.3/scripts/recon.pl:4194-4271,4273-4287,4393-4438
+ /branches/1.3/LedgerSMB/Scripts/recon.pm:3711-4725
/branches/1.3/scripts/recon.pl:4194-4271,4273-4287,4393-4438
Property changes on: trunk/LedgerSMB/Scripts/setup.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/setup.pm:3937-4721
/branches/1.3/scripts/setup.pl:3711-4550
+ /branches/1.3/LedgerSMB/Scripts/setup.pm:3937-4725
/branches/1.3/scripts/setup.pl:3711-4550
Property changes on: trunk/LedgerSMB/Scripts/taxform.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/taxform.pm:4193-4721
/branches/1.3/scripts/taxform.pl:3711-4192,4273-4287
+ /branches/1.3/LedgerSMB/Scripts/taxform.pm:4193-4725
/branches/1.3/scripts/taxform.pl:3711-4192,4273-4287
Property changes on: trunk/LedgerSMB/Scripts/vendor.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/vendor.pm:4288-4721
/branches/1.3/scripts/vendor.pl:4273-4287
+ /branches/1.3/LedgerSMB/Scripts/vendor.pm:4288-4725
/branches/1.3/scripts/vendor.pl:4273-4287
Modified: trunk/LedgerSMB/Template/CSV.pm
===================================================================
--- trunk/LedgerSMB/Template/CSV.pm 2012-05-19 00:28:20 UTC (rev 4725)
+++ trunk/LedgerSMB/Template/CSV.pm 2012-05-19 00:56:19 UTC (rev 4726)
@@ -76,10 +76,13 @@
} else {
$vars = $rawvars;
}
-
+ $vars =~ s/(^ +| +$)//g;
+ $vars =~ s/"/""/g;
+ $vars = qq|"$vars"| if $vars =~ /[^0-9.+-]/;
+ warn $vars;
} else { # hashes and objects
for ( keys %{$rawvars} ) {
- $vars->{preprocess($_)} = preprocess( $rawvars->{$_} );
+ $vars->{$_} = preprocess( $rawvars->{$_} );
}
}
return $vars;
Modified: trunk/UI/Contact/contact.html
===================================================================
--- trunk/UI/Contact/contact.html 2012-05-19 00:28:20 UTC (rev 4725)
+++ trunk/UI/Contact/contact.html 2012-05-19 00:56:19 UTC (rev 4726)
@@ -1,4 +1,4 @@
-
+<?lsmb
INCLUDE 'ui-header.html'
stylesheet = USER.stylesheet
include_stylesheet = [
@@ -8,7 +8,8 @@
'UI/Contact/contact.js'
]
?>
-<?lsmb PROCESS 'elements.html' ?>
+<?lsmb PROCESS 'elements.html';
+PROCESS "dynatable.html" ?>
<?lsmb IF !country_id; country_id = default_country; END -?>
<?lsmb IF !country_id_t; country_id_t = default_country; END -?>
<?lsmb
@@ -63,6 +64,7 @@
-->
<?lsmb # TODO: Move to controller scripts.
nav_list = [];
+ DIVS = [];
IF entity_class == 3;
DIVS.push({id = 'hr_div',
label = text('HR'),
@@ -105,11 +107,12 @@
<li class="nav"><a href="#<?lsmb nav.id ?>"><?lsmb nav.label ?></a></li>
<?lsmb END ?>
</ul>
+
<?lsmb FOREACH ITEM IN DIVS;
INCLUDEDIV = "divs/" _ ITEM.template _ ".html";
- IF ITEM.deplate;
+ IF ITEM.template;
PROCESS $INCLUDEDIV;
- END
+ END;
END
?>
</body>
Modified: trunk/UI/Contact/divs/credit.html
===================================================================
--- trunk/UI/Contact/divs/credit.html 2012-05-19 00:28:20 UTC (rev 4725)
+++ trunk/UI/Contact/divs/credit.html 2012-05-19 00:56:19 UTC (rev 4726)
@@ -1,32 +1,30 @@
-<?lsmb IF credit_list ?>
+<?lsmb IF entity_id ?>
<div id="credit_div" class="container">
<div class="listtop"><strong>Accounts</strong></div>
- <table width="100%">
- <tr class="listheading">
- <th class="account_class"><?lsmb text('Type') ?></th>
- <th class="number"><?lsmb text("Number") ?></th>
- <th class="description"><?lsmb text("Description") ?></th>
- <th class="credit_limit"><?lsmb text('Credit Limit') ?></th>
- <th class="start_date"><?lsmb text('Start Date') ?></th>
- <th class="end_date"><?lsmb text('End Date') ?></th>
- </tr>
- <?lsmb FOREACH cl_item IN credit_list ?>
- <tr <?lsmb IF meta_number == cl_item.meta_number ;
- credit_act = cl_item; ?> class="active"<?lsmb END ?>>
- <td><?lsmb IF cl_item.entity_class == 1 ?><?lsmb text('Vendor') ?>
- <?lsmb ELSIF cl_item.entity_class == 2 ?><?lsmb text('Customer') ?>
- <?lsmb END ?>
- </td>
- <td><a href="<?lsmb script ?>?action=get&account_class=<?lsmb
- account_class ?>&entity_id=<?lsmb entity_id
- ?>&meta_number=<?lsmb cl_item.meta_number ?>"><?lsmb cl_item.meta_number ?></a></td>
- <td><?lsmb cl_item.description ?></td>
- <td><?lsmb cl_item.credit_limit ?></td>
- <td><?lsmb cl_item.start_date ?></td>
- <td><?lsmb cl_item.end_date ?></td>
- </tr>
- <?lsmb END ?>
- </table>
+<?lsmb
+
+FOREACH cl IN credit_list;
+ IF cl.entity_class == 1;
+ cl.account_class_label = text('Vendor');
+ ELSIF cl.entity_class == 2;
+ cl.account_class_label = text('Customer');
+ END;
+ cl.meta_number_href_suffix = 'account_class=' _ cl.entity_class _
+ '&entity_id=' _ cl.entity_id _ '&meta_number=' _ cl.meta_number;
+END;
+
+PROCESS dynatable
+ attributes = {id = 'credit_accounts_list' }
+ columns = [
+ { col_id = 'account_class_label', type = 'text', name = text('Type') }
+ { col_id = 'meta_number', type = 'href', name = text("Number"),
+ href_base = "$script?action=get&" }
+ { col_id = 'description', type = 'text', name = text("Description") }
+ { col_id = 'credit_limit', type = 'text', name = text('Credit Limit') }
+ { col_id = 'start_date', type = 'text', name = text('Start Date') }
+ { col_id = 'end_date', type = 'text', name = text('End Date') }
+ ], #'
+ tbody = {rows = credit_list}; ?>
<form id="credit_form" name="credit_form" method="post"
action="<?lsmb script ?>">
<?lsmb PROCESS input element_data = {
Modified: trunk/UI/Contact/divs/notes.html
===================================================================
--- trunk/UI/Contact/divs/notes.html 2012-05-19 00:28:20 UTC (rev 4725)
+++ trunk/UI/Contact/divs/notes.html 2012-05-19 00:56:19 UTC (rev 4726)
@@ -61,4 +61,5 @@
<div class="author"><?lsmb text("Author: [_1]", n.created_by) ?></div>
<div class="note_contents"><?lsmb n.note ?></div>
</div>
+<?lsmb END ?>
</div>
Modified: trunk/UI/lib/dynatable.csv
===================================================================
--- trunk/UI/lib/dynatable.csv 2012-05-19 00:28:20 UTC (rev 4725)
+++ trunk/UI/lib/dynatable.csv 2012-05-19 00:56:19 UTC (rev 4726)
@@ -1,6 +1,6 @@
<?lsmb- BLOCK escape;
-IF VALUE.match('\D'); # any non-digit means run escaping
+IF VALUE.match('[^0-9.+-]'); # any non-digit means run escaping
'"' _ VALUE.replace('"', '""') _ '"';
ELSE;
VALUE;
Modified: trunk/bin/arapprn.pl
===================================================================
--- trunk/bin/arapprn.pl 2012-05-19 00:28:20 UTC (rev 4725)
+++ trunk/bin/arapprn.pl 2012-05-19 00:56:19 UTC (rev 4726)
@@ -519,7 +519,7 @@
$media = qq|<select name=media>
<option value="screen">| . $locale->text('Screen');
- $form->{selectformat} = qq|<option value="html">html\n|;
+ $form->{selectformat} = qq|<option value="html">html<option value="csv">csv\n|;
if ( %{LedgerSMB::Sysconfig::printer} && ${LedgerSMB::Sysconfig::latex} ) {
for ( sort keys %{LedgerSMB::Sysconfig::printer} ) {
Modified: trunk/bin/io.pl
===================================================================
--- trunk/bin/io.pl 2012-05-19 00:28:20 UTC (rev 4725)
+++ trunk/bin/io.pl 2012-05-19 00:56:19 UTC (rev 4726)
@@ -1434,7 +1434,8 @@
$options{format} = {
name => 'format',
default_values => $form->{selectformat},
- options => [{text => 'HTML', value => 'html'}],
+ options => [{text => 'HTML', value => 'html'},
+ {text => 'CSV', value => 'csv'} ],
};
if ( ${LedgerSMB::Sysconfig::latex} ) {
push @{$options{format}{options}}, {
Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql 2012-05-19 00:28:20 UTC (rev 4725)
+++ trunk/sql/Pg-database.sql 2012-05-19 00:56:19 UTC (rev 4726)
@@ -3165,8 +3165,8 @@
166 template purchase_order 427
167 template bin_list 428
168 template statement 429
-169 template quotation 430
-170 template rfq 431
+169 template sales_quotation 430
+170 template request_quotation 431
171 template timecard 432
241 template letterhead 644
157 format HTML 433
Modified: trunk/sql/modules/Company.sql
===================================================================
--- trunk/sql/modules/Company.sql 2012-05-19 00:28:20 UTC (rev 4725)
+++ trunk/sql/modules/Company.sql 2012-05-19 00:56:19 UTC (rev 4726)
@@ -272,7 +272,7 @@
WHERE line_one
ilike '%' ||
coalesce(in_address, '')
- || '%
+ || '%'
AND city ILIKE
'%' ||
coalesce(in_city, '')
@@ -673,7 +673,7 @@
CREATE OR REPLACE FUNCTION company__save (
in_id int, in_control_code text, in_entity_class int,
- in_name text, in_tax_id TEXT,
+ in_legal_name text, in_tax_id TEXT,
in_entity_id int, in_sic_code text,in_country_id int,
in_sales_tax_id text, in_license_number text
) RETURNS INT AS $$
@@ -690,7 +690,7 @@
END IF;
UPDATE entity
- SET name = in_name,
+ SET name = in_legal_name,
entity_class = in_entity_class,
control_code = in_control_code
WHERE id = in_entity_id;
@@ -699,12 +699,12 @@
t_entity_id = in_entity_id;
ELSE
INSERT INTO entity (name, entity_class, control_code,country_id)
- VALUES (in_name, in_entity_class, t_control_code,in_country_id);
+ VALUES (in_legal_name, in_entity_class, t_control_code,in_country_id);
t_entity_id := currval('entity_id_seq');
END IF;
UPDATE company
- SET legal_name = in_name,
+ SET legal_name = in_legal_name,
tax_id = in_tax_id,
sic_code = in_sic_code,
sales_tax_id = in_sales_tax_id,
@@ -715,7 +715,7 @@
IF NOT FOUND THEN
INSERT INTO company(entity_id, legal_name, tax_id, sic_code,
sales_tax_id, license_number)
- VALUES (t_entity_id, in_name, in_tax_id, in_sic_code,
+ VALUES (t_entity_id, in_legal_name, in_tax_id, in_sic_code,
in_sales_tax_id, in_license_number);
END IF;
@@ -725,7 +725,7 @@
COMMENT ON FUNCTION company__save (
in_id int, in_control_code text, in_entity_class int,
- in_name text, in_tax_id TEXT,
+ in_legal_name text, in_tax_id TEXT,
in_entity_id int, in_sic_code text,in_country_id int,
in_sales_tax_id text, in_license_number text
) is
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-4721
/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-4725
/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.