[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5080] branches/1.3
- Subject: SF.net SVN: ledger-smb:[5080] branches/1.3
- From: ..hidden..
- Date: Thu, 02 Aug 2012 09:29:59 +0000
Revision: 5080
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5080&view=rev
Author: einhverfr
Date: 2012-08-02 09:29:59 +0000 (Thu, 02 Aug 2012)
Log Message:
-----------
Adding pricegroup selection bakc to entity credit account screen
Modified Paths:
--------------
branches/1.3/Changelog
branches/1.3/LedgerSMB/ScriptLib/Company.pm
branches/1.3/UI/Contact/contact.html
branches/1.3/sql/modules/Company.sql
Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog 2012-08-02 07:40:30 UTC (rev 5079)
+++ branches/1.3/Changelog 2012-08-02 09:29:59 UTC (rev 5080)
@@ -5,6 +5,7 @@
Changelog for 1.3.22
* Fixed error when trying to save multiple make/models for a part (Chris T)
* Better error handling when date is entered into statement balance (Chris T)
+* Added pricegroup selection back to entity credit account (Chris T)
Changelog for 1.3.21
* Added a default numberformat in Form.pm (Chris T)
Modified: branches/1.3/LedgerSMB/ScriptLib/Company.pm
===================================================================
--- branches/1.3/LedgerSMB/ScriptLib/Company.pm 2012-08-02 07:40:30 UTC (rev 5079)
+++ branches/1.3/LedgerSMB/ScriptLib/Company.pm 2012-08-02 09:29:59 UTC (rev 5080)
@@ -739,6 +739,9 @@
$company->{dbh}->commit;
$company->get_metadata();
set_entity_class($company);
+ @{$company->{pricegroups}} = $company->call_procedure(
+ procname => 'pricegroup__list'
+ );
$company->{creditlimit} = $company->format_amount({amount => $company->{creditlimit}}) unless !defined $company->{creditlimit};
$company->{discount} = "$company->{discount}" unless !defined $company->{discount};
Modified: branches/1.3/UI/Contact/contact.html
===================================================================
--- branches/1.3/UI/Contact/contact.html 2012-08-02 07:40:30 UTC (rev 5079)
+++ branches/1.3/UI/Contact/contact.html 2012-08-02 09:29:59 UTC (rev 5080)
@@ -587,6 +587,15 @@
label = text('Threshold')
class = "numeric"
} ?>
+ <td><?lsmb pricegroups.unshift({});
+ INCLUDE select element_data = {
+ default_values = [pricegroup_id],
+ name = 'pricegroup_id'
+ options = pricegroups
+ label = text('Pricegroup')
+ value_attr = 'id'
+ text_attr = 'pricegroup'
+ } ?></td>
</tr>
<tr id="taxform-threshold-row">
Modified: branches/1.3/sql/modules/Company.sql
===================================================================
--- branches/1.3/sql/modules/Company.sql 2012-08-02 07:40:30 UTC (rev 5079)
+++ branches/1.3/sql/modules/Company.sql 2012-08-02 09:29:59 UTC (rev 5080)
@@ -696,6 +696,14 @@
) is
$$ Saves a company. Returns the id number of the record stored.$$;
+CREATE OR REPLACE FUNCTION pricegroup__list() RETURNS SETOF pricegroup AS
+$$
+SELECT * FROM pricegroup ORDER BY pricegroup;
+$$ LANGUAGE SQL;
+
+COMMENT ON FUNCTION pricegroup__list() IS
+$$ Returns an alphabetically ordered pricegroup list.$$;
+
DROP FUNCTION IF EXISTS entity_credit_save (
in_credit_id int, in_entity_class int,
in_entity_id int, in_description text,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.