svn commit: r1736734 - in /ofbiz/trunk/applications: accounting/config/ accounting/script/org/ofbiz/accounting/invoice/ accounting/script/org/ofbiz/accounting/payment/ accounting/script/org/ofbiz/accounting/test/ accounting/src/org/ofbiz/accounting/inv...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1736734 - in /ofbiz/trunk/applications: accounting/config/ accounting/script/org/ofbiz/accounting/invoice/ accounting/script/org/ofbiz/accounting/payment/ accounting/script/org/ofbiz/accounting/test/ accounting/src/org/ofbiz/accounting/inv...

jleroux@apache.org
Author: jleroux
Date: Sun Mar 27 10:59:54 2016
New Revision: 1736734

URL: http://svn.apache.org/viewvc?rev=1736734&view=rev
Log:
Patches from Pierre Smits for <<rename AccountingConfig.properties to accounting.properties>> https://issues.apache.org/jira/browse/OFBIZ-6954

Currently many properties files in various components are named after the component, i.e. the bi component has bi.properties.
In order to have consistency from component to component the AccountingConfig.properties file must be renamed to accounting.properties and all references in other components should reflect the change.

jleroux: I also changed a bunch of accountingconfig names in comments/descriptions/etc.



Added:
    ofbiz/trunk/applications/accounting/config/accounting.properties   (with props)
Removed:
    ofbiz/trunk/applications/accounting/config/AccountingConfig.properties
Modified:
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/InvoicePerShipmentTests.xml
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
    ofbiz/trunk/applications/order/servicedef/secas.xml
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
    ofbiz/trunk/applications/product/script/org/ofbiz/product/rental/RentalServices.xml

Added: ofbiz/trunk/applications/accounting/config/accounting.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/accounting.properties?rev=1736734&view=auto
==============================================================================
--- ofbiz/trunk/applications/accounting/config/accounting.properties (added)
+++ ofbiz/trunk/applications/accounting/config/accounting.properties Sun Mar 27 10:59:54 2016
@@ -0,0 +1,44 @@
+###############################################################################
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+###############################################################################
+
+# User Interface properties/defaults of the extented Accounting component.
+
+# what should the default of the payment to invoice processing be?
+# paymentProcessing by invoice or paymentprocessing by invoiceitem?
+# there is still a box on the menu to change this option by the user.
+# value Y: applying payments to the invoice as a whole (invoiceItemSeqNr = null) with the option to apply per invoice item
+# value N: applying payments to every invoice item with the option to apply to an invoice as a whole
+#value YY: do not show the option box to the user and do only invoice processing
+#value NN: do not show the option box to the user and do only invoiceitem processing
+invoiceProcessing=YY
+
+# Automatically create a fixed asset when an 'asset usage' type product is created?
+accounting.fixedasset.autocreate=Y
+
+# create a payment application if a payment is received/sent or invoice is approved (take the oldest not closed one)
+accounting.payment.application.autocreate=Y
+
+# create a 'not-paid' payment record if the purchase order is approved
+accounting.payment.purchaseorder.autocreate=Y
+
+# create a 'not-paid' payment record if the sales order is completed and no payment exist yet.
+accounting.payment.salesorder.autocreate=Y
+
+# create invoice per shipment = Y Invoice per order = N
+create.invoice.per.shipment=Y

Propchange: ofbiz/trunk/applications/accounting/config/accounting.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/accounting/config/accounting.properties
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/accounting/config/accounting.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml?rev=1736734&r1=1736733&r2=1736734&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml Sun Mar 27 10:59:54 2016
@@ -918,7 +918,7 @@ under the License.
         </entity-one>
         <set field="invoicePerShipment" from-field="orderHeader.invoicePerShipment"/>
         <if-empty field="invoicePerShipment">
-            <property-to-field resource="AccountingConfig" property="create.invoice.per.shipment" field="invoicePerShipment"/>
+            <property-to-field resource="accounting" property="create.invoice.per.shipment" field="invoicePerShipment"/>
         </if-empty>
         <if-compare operator="equals" value="N" field="invoicePerShipment">
             <entity-and list="orderItemBilling" entity-name="OrderItemBilling">

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml?rev=1736734&r1=1736733&r2=1736734&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml Sun Mar 27 10:59:54 2016
@@ -892,17 +892,17 @@ under the License.
         <entity-one value-field="orderHeader" entity-name="OrderHeader"/>
 
         <if-compare operator="equals" value="PURCHASE_ORDER" field="orderHeader.orderTypeId">
-            <property-to-field resource="AccountingConfig" property="accounting.payment.purchaseorder.autocreate" field="purchaseAutoCreate" default="Y"/>
+            <property-to-field resource="accounting" property="accounting.payment.purchaseorder.autocreate" field="purchaseAutoCreate" default="Y"/>
             <if-compare operator="not-equals" value="Y" field="purchaseAutoCreate">
-                <log level="info" message="payment not created from approved order because config (accounting.payment.purchaseorder.autocreate) is not set to Y (AccountingConfig.properties)"/>
+                <log level="info" message="payment not created from approved order because config (accounting.payment.purchaseorder.autocreate) is not set to Y (accounting.properties)"/>
                 <return/>
             </if-compare>
         </if-compare>
 
         <if-compare operator="equals" value="SALES_ORDER" field="orderHeader.orderTypeId">
-            <property-to-field resource="AccountingConfig" property="accounting.payment.salesorder.autocreate" field="salesAutoCreate" default="Y"/>
+            <property-to-field resource="accounting" property="accounting.payment.salesorder.autocreate" field="salesAutoCreate" default="Y"/>
             <if-compare operator="not-equals" value="Y" field="salesAutoCreate">
-                <log level="info" message="payment not created from approved order because config (accounting.payment.salesorder.autocreate) is not set to Y (AccountingConfig.properties)"/>
+                <log level="info" message="payment not created from approved order because config (accounting.payment.salesorder.autocreate) is not set to Y (accounting.properties)"/>
                 <return/>
             </if-compare>
         </if-compare>
@@ -1029,11 +1029,11 @@ under the License.
         <set-service-fields service-name="updatePayment" to-map="updatePayment" map="parameters"/>
         <call-service service-name="updatePayment" in-map-name="updatePayment"/>
         <field-to-result field="parameters.paymentId" result-name="paymentId"/>
-        <log level="info" message="payment ${parameters.paymentId} with the not-paid status automatically created from order: ${parameters.orderId} (can be disabled in AccountingConfig.properties)"/>
+        <log level="info" message="payment ${parameters.paymentId} with the not-paid status automatically created from order: ${parameters.orderId} (can be disabled in accounting.properties)"/>
     </simple-method>
 
     <simple-method method-name="createMatchingPaymentApplication" short-description="Create a payment application if either the invoice of payment could be found">
-        <property-to-field resource="AccountingConfig" property="accounting.payment.application.autocreate" field="autoCreate" default="Y"/>
+        <property-to-field resource="accounting" property="accounting.payment.application.autocreate" field="autoCreate" default="Y"/>
         <if-compare operator="not-equals" value="Y" field="autoCreate">
             <log level="info" message="payment application not automatically created because config is not set to Y"/>
             <return/>
@@ -1151,7 +1151,7 @@ under the License.
         <if-not-empty field="createAppl.paymentId">
             <if-not-empty field="createAppl.invoiceId">
                 <call-service service-name="createPaymentApplication" in-map-name="createAppl"/>
-                <log level="info" message="payment application automatically created between invoiceId: ${createAppl.invoiceId} and paymentId: ${createAppl.paymentId} for the amount: ${createAppl.appliedAmount} (can be disabled in AccountingConfig.properties)"/>
+                <log level="info" message="payment application automatically created between invoiceId: ${createAppl.invoiceId} and paymentId: ${createAppl.paymentId} for the amount: ${createAppl.appliedAmount} (can be disabled in accounting.properties)"/>
             </if-not-empty>
         </if-not-empty>
     </simple-method>

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/InvoicePerShipmentTests.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/InvoicePerShipmentTests.xml?rev=1736734&r1=1736733&r2=1736734&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/InvoicePerShipmentTests.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/InvoicePerShipmentTests.xml Sun Mar 27 10:59:54 2016
@@ -23,7 +23,7 @@ under the License.
 
     <simple-method method-name="testInvoicePerShipmentSetFalse" short-description="Test Invoice Per Shipment Set False" login-required="false">
         <!-- Test Invoice Per Shipment
-             Step 1) Set create.invoice.per.shipment=N in AccountingConfig.properties file.
+             Step 1) Set create.invoice.per.shipment=N in accounting.properties file.
              Step 2) Create order and approve order.
              Step 3) Pack Shipment For Ship Group.
              Step 4) Check invoice should not created.
@@ -31,7 +31,7 @@ under the License.
         <!-- Step 1 -->
         <call-bsh><![CDATA[
             import org.ofbiz.base.util.UtilProperties;
-            UtilProperties.setPropertyValueInMemory("AccountingConfig", "create.invoice.per.shipment", "N");
+            UtilProperties.setPropertyValueInMemory("accounting", "create.invoice.per.shipment", "N");
         ]]></call-bsh>
         <log level="info" message="===== >>> Set Accounting.properties / create.invoice.per.shipment = N"/>
         <!-- Step 2 -->
@@ -150,7 +150,7 @@ under the License.
     </simple-method>
     <simple-method method-name="testInvoicePerShipmentSetTrue" short-description="Test Invoice Per Shipment Set True" login-required="false">
         <!-- Test Invoice Per Shipment
-             Step 1) Set create.invoice.per.shipment=N in AccountingConfig.properties file.
+             Step 1) Set create.invoice.per.shipment=N in accounting.properties file.
              Step 2) Create order and approve order.
              Step 3) Pack Shipment For Ship Group.
              Step 4) Check invoice should created.
@@ -158,7 +158,7 @@ under the License.
         <!-- Step 1 -->
         <call-bsh><![CDATA[
             import org.ofbiz.base.util.UtilProperties;
-            UtilProperties.setPropertyValueInMemory("AccountingConfig", "create.invoice.per.shipment", "Y");
+            UtilProperties.setPropertyValueInMemory("accounting", "create.invoice.per.shipment", "Y");
         ]]></call-bsh>
         <log level="info" message="===== >>> Set Accounting.properties / create.invoice.per.shipment = Y"/>
         <!-- Step 2 -->

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java?rev=1736734&r1=1736733&r2=1736734&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java Sun Mar 27 10:59:54 2016
@@ -1121,7 +1121,7 @@ public class InvoiceServices {
         // Either no orderShipment exists, or there's a null invoicePerShipment in the OrderHeader.
         // In either case, use the default value from the properties
         if (invoicePerShipment == null) {
-            invoicePerShipment = EntityUtilProperties.getPropertyValue("AccountingConfig","create.invoice.per.shipment", delegator);
+            invoicePerShipment = EntityUtilProperties.getPropertyValue("accounting","create.invoice.per.shipment", delegator);
         }
 
         if ("Y".equals(invoicePerShipment)) {
@@ -2486,7 +2486,7 @@ public class InvoiceServices {
             context.put("useHighestAmount","Y");
         }
 
-        String defaultInvoiceProcessing = EntityUtilProperties.getPropertyValue("AccountingConfig","invoiceProcessing", delegator);
+        String defaultInvoiceProcessing = EntityUtilProperties.getPropertyValue("accounting","invoiceProcessing", delegator);
 
         boolean debug = true; // show processing messages in the log..or not....
 

Modified: ofbiz/trunk/applications/order/servicedef/secas.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/servicedef/secas.xml?rev=1736734&r1=1736733&r2=1736734&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/servicedef/secas.xml (original)
+++ ofbiz/trunk/applications/order/servicedef/secas.xml Sun Mar 27 10:59:54 2016
@@ -97,7 +97,7 @@ under the License.
         <action service="createReturnItemForRental" mode="sync"/>
     </eca>
     
-    <!-- create payment from purchase order when approved (can be disabled by accountingConfig)-->
+    <!-- create payment from purchase order when approved (can be disabled by accounting config)-->
     <eca service="changeOrderStatus" event="commit" run-on-error="false">
         <condition field-name="orderTypeId" operator="equals" value="PURCHASE_ORDER"/>
         <condition field-name="statusId" operator="equals" value="ORDER_APPROVED"/>
@@ -105,7 +105,7 @@ under the License.
         <action service="createPaymentFromOrder" mode="sync" persist="true"/>
     </eca>
 
-    <!-- create payment from sales order when completed and not created yet (can be disabled by accountingConfig) -->
+    <!-- create payment from sales order when completed and not created yet (can be disabled by accounting config) -->
     <eca service="changeOrderStatus" event="commit" run-on-error="false">
         <condition field-name="orderTypeId" operator="equals" value="SALES_ORDER"/>
         <condition field-name="statusId" operator="equals" value="ORDER_COMPLETED"/>

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1736734&r1=1736733&r2=1736734&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java Sun Mar 27 10:59:54 2016
@@ -544,7 +544,7 @@ public class OrderServices {
             orderHeader.set("createdBy", userLogin.getString("userLoginId"));
         }
 
-        String invoicePerShipment = EntityUtilProperties.getPropertyValue("AccountingConfig","create.invoice.per.shipment", delegator);
+        String invoicePerShipment = EntityUtilProperties.getPropertyValue("accounting","create.invoice.per.shipment", delegator);
         if (UtilValidate.isNotEmpty(invoicePerShipment)) {
             orderHeader.set("invoicePerShipment", invoicePerShipment);
         }

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/rental/RentalServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/rental/RentalServices.xml?rev=1736734&r1=1736733&r2=1736734&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/rental/RentalServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/rental/RentalServices.xml Sun Mar 27 10:59:54 2016
@@ -22,7 +22,7 @@ under the License.
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods-v2.xsd">
 
     <simple-method method-name="createFixedAssetAndLinkToProduct" short-description="Create an FixedAsset and link the asset to the product, used when a asset usage product is created">
-        <property-to-field field="autoCreate" resource="AccountingConfig" property="accounting.fixedasset.autocreate" no-locale="true"/>
+        <property-to-field field="autoCreate" resource="accounting" property="accounting.fixedasset.autocreate" no-locale="true"/>
         <if-compare field="autoCreate" value="Y" operator="not-equals">
             <return/>
         </if-compare>