Author: hansbak
Date: Sat May 19 18:30:28 2007
New Revision: 539814
URL: http://svn.apache.org/viewvc?view=rev&rev=539814
Log:
added a very limited acctPreference update possibility inclusive separate
security
Modified:
ofbiz/trunk/applications/accounting/data/AccountingSecurityData.xml
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml
ofbiz/trunk/applications/accounting/servicedef/services_admin.xml
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
ofbiz/trunk/applications/accounting/webapp/accounting/admin/AdminForms.xml
Modified: ofbiz/trunk/applications/accounting/data/AccountingSecurityData.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/data/AccountingSecurityData.xml?view=diff&rev=539814&r1=539813&r2=539814
==============================================================================
--- ofbiz/trunk/applications/accounting/data/AccountingSecurityData.xml
(original)
+++ ofbiz/trunk/applications/accounting/data/AccountingSecurityData.xml Sat May
19 18:30:28 2007
@@ -80,6 +80,9 @@
<SecurityPermission description="Set organization accounting preferences"
permissionId="ACCTG_PREF_CREATE"/>
<SecurityGroupPermission groupId="FULLADMIN"
permissionId="ACCTG_PREF_CREATE"/>
<SecurityGroupPermission groupId="BIZADMIN"
permissionId="ACCTG_PREF_CREATE"/>
+ <SecurityPermission description="Update organization accounting
preferences" permissionId="ACCTG_PREF_UPDATE"/>
+ <SecurityGroupPermission groupId="FULLADMIN"
permissionId="ACCTG_PREF_UPDATE"/>
+ <SecurityGroupPermission groupId="BIZADMIN"
permissionId="ACCTG_PREF_UPDATE"/>
<SecurityPermission description="Set foreign exchange rates"
permissionId="ACCTG_FX_ENTRY"/>
<SecurityGroupPermission groupId="FULLADMIN"
permissionId="ACCTG_FX_ENTRY"/>
Modified:
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml?view=diff&rev=539814&r1=539813&r2=539814
==============================================================================
---
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml
(original)
+++
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml
Sat May 19 18:30:28 2007
@@ -41,6 +41,14 @@
<create-value value-name="newEntity"/>
</simple-method>
+ <simple-method method-name="updatePartyAcctgPreference"
+ short-description="Update the accounting preference settings for a
party">
+ <!-- permission checking is done in the services definition file
(services_other.xml) -->
+ <entity-one entity-name="PartyAcctgPreference" value-name="newEntity"/>
+ <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
+ <store-value value-name="newEntity"/>
+ </simple-method>
+
<!-- update currency conversion rates in the UomConversionDated entity -->
<simple-method method-name="updateFXConversion" short-description="Update
Foreign Exchange conversion rate">
<!-- set the FX rate changes as of now -->
Modified: ofbiz/trunk/applications/accounting/servicedef/services_admin.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_admin.xml?view=diff&rev=539814&r1=539813&r2=539814
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_admin.xml (original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_admin.xml Sat May
19 18:30:28 2007
@@ -32,6 +32,15 @@
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
</service>
+ <service name="updatePartyAcctgPreference"
default-entity-name="PartyAcctgPreference" engine="simple"
+ location="org/ofbiz/accounting/admin/AcctgAdminServices.xml"
invoke="updatePartyAcctgPreference" auth="true">
+ <description>Update accounting preferences for a party
(organization)</description>
+ <required-permissions join-type="OR">
+ <check-permission permission="ACCTG_PREF_UPDATE"/>
+ </required-permissions>
+ <auto-attributes include="pk" mode="IN" optional="false"/>
+ <auto-attributes include="nonpk" mode="IN" optional="true"/>
+ </service>
<service name="updateFXConversion" engine="simple"
location="org/ofbiz/accounting/admin/AcctgAdminServices.xml"
invoke="updateFXConversion">
Modified:
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml?view=diff&rev=539814&r1=539813&r2=539814
==============================================================================
---
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
(original)
+++
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
Sat May 19 18:30:28 2007
@@ -1075,6 +1075,13 @@
<response name="error" type="view" value="PartyAcctgPreference"/>
</request-map>
+ <request-map uri="updatePartyAcctgPreference">
+ <security https="true" auth="true"/>
+ <event type="service" invoke="updatePartyAcctgPreference"/>
+ <response name="success" type="view" value="PartyAcctgPreference"/>
+ <response name="error" type="view" value="PartyAcctgPreference"/>
+ </request-map>
+
<request-map uri="GlAccountAssignment">
<security https="true" auth="true"/>
<response name="success" type="view" value="GlAccountSalInvoice"/>
Modified:
ofbiz/trunk/applications/accounting/webapp/accounting/admin/AdminForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/admin/AdminForms.xml?view=diff&rev=539814&r1=539813&r2=539814
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/admin/AdminForms.xml
(original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/admin/AdminForms.xml
Sat May 19 18:30:28 2007
@@ -28,6 +28,7 @@
</form>
<form name="PartyAcctgPreference" type="single"
target="createPartyAcctgPreference"
default-service-name="createPartyAcctgPreference"
default-map-name="partyAcctgPreference">
+ <alt-target use-when="partyAcctgPreference!=null"
target="updatePartyAcctgPreference"/>
<auto-fields-service service-name="createPartyAcctgPreference"/>
<field name="organizationPartyId"><hidden
value="${parameters.organizationPartyId}"/></field>
<!-- the partyId is always displayed -->
@@ -118,7 +119,8 @@
</entity-options>
</drop-down>
</field>
- <field name="submitButton" title="${uiLabelMap.CommonCreate}"
use-when="partyAcctgPreference==null"><submit/></field>
+ <field name="createButton"
use-when="partyAcctgPreference==null"><submit/></field>
+ <field name="updateButton"
use-when="partyAcctgPreference!=null"><submit/></field>
<!-- otherwise, we just display the fields. there is no submit button
because we shouldn't try to create it again and don't support an update option
right now-->
<field name="fiscalYearStartMonth"
use-when="partyAcctgPreference!=null"><display/></field>
@@ -147,6 +149,14 @@
<!-- these 2 are ONLY displayed, never allow manual editing -->
<field name="lastInvoiceNumber"><display/></field>
<field name="lastInvoiceRestartDate"><display/></field>
+
+ <field name="refundPaymentMethodId">
+ <drop-down>
+ <entity-options entity-name="PaymentMethod"
description="${description}" key-field-name="paymentMethodId">
+ <entity-constraint name="partyId" operator="equals"
env-name="organizationPartyId"/>
+ </entity-options>
+ </drop-down>
+ </field>
</form>
<form name="ListUnpostedAcctgTrans" type="list" title="Unposted Accounting
Transactions" list-name="transactions">