ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sascharodek...@apache.org
Subject svn commit: r1197247 [1/10] - in /ofbiz/branches/jackrabbit20100709: ./ applications/accounting/script/org/ofbiz/accounting/invoice/ applications/accounting/servicedef/ applications/accounting/src/org/ofbiz/accounting/invoice/ applications/accounting/w...
Date Thu, 03 Nov 2011 17:59:33 GMT
Author: sascharodekamp
Date: Thu Nov  3 17:59:29 2011
New Revision: 1197247

URL: http://svn.apache.org/viewvc?rev=1197247&view=rev
Log:
Update the Jackrabbit branch with the current trunk version to keep the branch up to date

Added:
    ofbiz/branches/jackrabbit20100709/framework/entity/lib/jdbc/derby-10.8.2.2.jar
      - copied unchanged from r1197242, ofbiz/trunk/framework/entity/lib/jdbc/derby-10.8.2.2.jar
    ofbiz/branches/jackrabbit20100709/framework/entity/lib/jdbc/derbytools-10.8.2.2.jar
      - copied unchanged from r1197242, ofbiz/trunk/framework/entity/lib/jdbc/derbytools-10.8.2.2.jar
Removed:
    ofbiz/branches/jackrabbit20100709/framework/entity/lib/jdbc/derby-10.8.1.2.jar
    ofbiz/branches/jackrabbit20100709/framework/entity/lib/jdbc/derbytools-10.8.1.2.jar
Modified:
    ofbiz/branches/jackrabbit20100709/   (props changed)
    ofbiz/branches/jackrabbit20100709/LICENSE
    ofbiz/branches/jackrabbit20100709/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
    ofbiz/branches/jackrabbit20100709/applications/accounting/servicedef/secas_invoice.xml
    ofbiz/branches/jackrabbit20100709/applications/accounting/servicedef/services_invoice.xml
    ofbiz/branches/jackrabbit20100709/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
    ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl
    ofbiz/branches/jackrabbit20100709/applications/content/config/ContentEntityLabels.xml
    ofbiz/branches/jackrabbit20100709/applications/content/config/ContentErrorUiLabels.xml
    ofbiz/branches/jackrabbit20100709/applications/content/config/ContentUiLabels.xml
    ofbiz/branches/jackrabbit20100709/applications/content/widget/forum/BlogForms.xml
    ofbiz/branches/jackrabbit20100709/applications/humanres/config/HumanResUiLabels.xml
    ofbiz/branches/jackrabbit20100709/applications/humanres/src/org/ofbiz/humanres/HumanResEvents.java
    ofbiz/branches/jackrabbit20100709/applications/humanres/webapp/humanres/WEB-INF/controller.xml
    ofbiz/branches/jackrabbit20100709/applications/humanres/widget/EmployeeScreens.xml
    ofbiz/branches/jackrabbit20100709/applications/humanres/widget/HumanresMenus.xml
    ofbiz/branches/jackrabbit20100709/applications/humanres/widget/forms/EmplPositionForms.xml
    ofbiz/branches/jackrabbit20100709/applications/humanres/widget/forms/EmployeeForms.xml
    ofbiz/branches/jackrabbit20100709/applications/manufacturing/config/ManufacturingUiLabels.xml
    ofbiz/branches/jackrabbit20100709/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml
    ofbiz/branches/jackrabbit20100709/applications/manufacturing/servicedef/services_production_run.xml
    ofbiz/branches/jackrabbit20100709/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRun.java
    ofbiz/branches/jackrabbit20100709/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
    ofbiz/branches/jackrabbit20100709/applications/manufacturing/widget/manufacturing/ProductionRunForms.xml
    ofbiz/branches/jackrabbit20100709/applications/marketing/webapp/sfa/WEB-INF/controller.xml
    ofbiz/branches/jackrabbit20100709/applications/marketing/widget/sfa/forms/OpportunityForms.xml
    ofbiz/branches/jackrabbit20100709/applications/order/script/org/ofbiz/order/opportunity/OpportunityServices.xml
    ofbiz/branches/jackrabbit20100709/applications/order/servicedef/services_request.xml
    ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy
    ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy
    ofbiz/branches/jackrabbit20100709/applications/order/webapp/ordermgr/order/orderpaymentinfo.ftl
    ofbiz/branches/jackrabbit20100709/applications/product/config/ProductErrorUiLabels.xml
    ofbiz/branches/jackrabbit20100709/applications/product/config/ProductUiLabels.xml
    ofbiz/branches/jackrabbit20100709/applications/product/data/ProductHelpData.xml
    ofbiz/branches/jackrabbit20100709/applications/product/entitydef/entitymodel.xml
    ofbiz/branches/jackrabbit20100709/applications/product/entitydef/entitymodel_shipment.xml
    ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml
    ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml
    ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml
    ofbiz/branches/jackrabbit20100709/applications/product/servicedef/services_facility.xml
    ofbiz/branches/jackrabbit20100709/applications/product/servicedef/services_picklist.xml
    ofbiz/branches/jackrabbit20100709/applications/product/webapp/facility/WEB-INF/actions/shipment/WeightPackage.groovy
    ofbiz/branches/jackrabbit20100709/applications/product/webapp/facility/WEB-INF/controller.xml
    ofbiz/branches/jackrabbit20100709/applications/product/webapp/facility/facility/PicklistManage.ftl
    ofbiz/branches/jackrabbit20100709/applications/product/webapp/facility/inventory/receiveInventory.ftl
    ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/CommonScreens.xml
    ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/PriceForms.xml
    ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/ProductForms.xml
    ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/ProductStoreForms.xml
    ofbiz/branches/jackrabbit20100709/applications/product/widget/facility/FacilityMenus.xml
    ofbiz/branches/jackrabbit20100709/applications/workeffort/servicedef/services.xml
    ofbiz/branches/jackrabbit20100709/framework/common/config/CommonEntityLabels.xml
    ofbiz/branches/jackrabbit20100709/framework/common/config/CommonErrorUiLabels.xml
    ofbiz/branches/jackrabbit20100709/framework/common/config/CommonPortalEntityLabels.xml
    ofbiz/branches/jackrabbit20100709/framework/common/config/CommonUiLabels.xml
    ofbiz/branches/jackrabbit20100709/framework/common/config/PrefErrorUiLabels.xml
    ofbiz/branches/jackrabbit20100709/framework/common/config/SecurityUiLabels.xml
    ofbiz/branches/jackrabbit20100709/framework/common/config/SecurityextUiLabels.xml
    ofbiz/branches/jackrabbit20100709/framework/common/config/TemporalExpressionUiLabels.xml
    ofbiz/branches/jackrabbit20100709/framework/common/data/GeoData.xml
    ofbiz/branches/jackrabbit20100709/framework/common/script/org/ofbiz/common/PortalPageServices.xml
    ofbiz/branches/jackrabbit20100709/framework/common/src/org/ofbiz/common/FindServices.java
    ofbiz/branches/jackrabbit20100709/framework/common/widget/PortalPageScreens.xml
    ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java
    ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
    ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/config/EcommerceUiLabels.xml
    ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/widget/blog/BlogForms.xml

Propchange: ofbiz/branches/jackrabbit20100709/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov  3 17:59:29 2011
@@ -2,4 +2,4 @@
 /ofbiz/branches/dojo1.4:951708-952957
 /ofbiz/branches/jquery:952958-1044489
 /ofbiz/branches/multitenant20100310:921280-927264
-/ofbiz/trunk:962442-1188616
+/ofbiz/trunk:962442-1197242

Modified: ofbiz/branches/jackrabbit20100709/LICENSE
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/LICENSE?rev=1197247&r1=1197246&r2=1197247&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/LICENSE (original)
+++ ofbiz/branches/jackrabbit20100709/LICENSE Thu Nov  3 17:59:29 2011
@@ -86,8 +86,8 @@ ofbiz/trunk/framework/catalina/lib/tomca
 ofbiz/trunk/framework/catalina/lib/tomcat-6.0.32-tomcat-juli.jar
 ofbiz/trunk/framework/catalina/lib/tomcat-6.0.32-tomcat-juli-adapters.jar
 ofbiz/trunk/framework/entity/lib/commons-dbcp-1.3-20091113-r835956.jar
-ofbiz/trunk/framework/entity/lib/jdbc/derby-10.8.1.2.jar
-ofbiz/trunk/framework/entity/lib/jdbc/derbytools-10.8.1.2.jar
+ofbiz/trunk/framework/entity/lib/jdbc/derby-10.8.2.2.jar
+ofbiz/trunk/framework/entity/lib/jdbc/derbytools-10.8.2.2.jar
 ofbiz/trunk/framework/jetty/lib/ant-1.6.5.jar
 ofbiz/trunk/framework/jetty/lib/jasper-compiler-5.5.15.jar
 ofbiz/trunk/framework/jetty/lib/jasper-compiler-jdt-5.5.15.jar

Modified: ofbiz/branches/jackrabbit20100709/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml?rev=1197247&r1=1197246&r2=1197247&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
(original)
+++ ofbiz/branches/jackrabbit20100709/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
Thu Nov  3 17:59:29 2011
@@ -720,6 +720,25 @@ under the License.
         </iterate>
     </simple-method>
 
+    <simple-method method-name="resetOrderItemBillingAndOrderAdjustmentBillingOnCancelInvoice"
+        short-description="Reset OrderItemBilling and OrderAdjustmentBilling records on cancel
invoice, so it is isn't considered invoiced any more by createInvoiceForOrder service">
+        <entity-and entity-name="OrderItemBilling" list="orderItemBillings">
+            <field-map field-name="invoiceId" from-field="parameters.invoiceId"/>
+        </entity-and>
+        <iterate entry="orderItemBilling" list="orderItemBillings">
+            <set field="orderItemBilling.quantity" value="0" type="BigDecimal"/>
+            <store-value value-field="orderItemBilling"/>
+        </iterate>
+
+        <entity-and entity-name="OrderAdjustmentBilling" list="orderAdjustmentBillings">
+            <field-map field-name="invoiceId" from-field="parameters.invoiceId"/>
+        </entity-and>
+        <iterate entry="orderAdjustmentBilling" list="orderAdjustmentBillings">
+            <set field="orderAdjustmentBilling.amount" value="0" type="BigDecimal"/>
+            <store-value value-field="orderAdjustmentBilling"/>
+        </iterate>
+    </simple-method>
+
     <simple-method method-name="massChangeInvoiceStatus" short-description="Service set
status of Invoices in bulk.">
         <iterate list="parameters.invoiceIds" entry="invoiceId">
             <set field="setInvoiceStatusMap.invoiceId" from-field="invoiceId"/>

Modified: ofbiz/branches/jackrabbit20100709/applications/accounting/servicedef/secas_invoice.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/accounting/servicedef/secas_invoice.xml?rev=1197247&r1=1197246&r2=1197247&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/accounting/servicedef/secas_invoice.xml
(original)
+++ ofbiz/branches/jackrabbit20100709/applications/accounting/servicedef/secas_invoice.xml
Thu Nov  3 17:59:29 2011
@@ -32,6 +32,10 @@ under the License.
         <action service="removeInvoiceItemAssocOnCancelInvoice" mode="sync"/>
     </eca>
 
+    <eca service="cancelInvoice" event="commit">
+        <action service="resetOrderItemBillingAndOrderAdjustmentBillingOnCancelInvoice"
mode="sync"/>
+    </eca>
+
     <eca service="setInvoiceStatus" event="commit">
         <condition operator="equals" field-name="statusId" value="INVOICE_APPROVED"/>
         <condition operator="not-equals" field-name="oldStatusId" value="INVOICE_APPROVED"/>

Modified: ofbiz/branches/jackrabbit20100709/applications/accounting/servicedef/services_invoice.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/accounting/servicedef/services_invoice.xml?rev=1197247&r1=1197246&r2=1197247&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/accounting/servicedef/services_invoice.xml
(original)
+++ ofbiz/branches/jackrabbit20100709/applications/accounting/servicedef/services_invoice.xml
Thu Nov  3 17:59:29 2011
@@ -363,6 +363,12 @@ under the License.
         <attribute name="invoiceId" type="String" mode="IN" optional="false"/>
     </service>
 
+    <service name="resetOrderItemBillingAndOrderAdjustmentBillingOnCancelInvoice" engine="simple"
+            location="component://accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml"
invoke="resetOrderItemBillingAndOrderAdjustmentBillingOnCancelInvoice" auth="true">
+        <description>Reset OrderItemBilling and OrderAdjustmentBilling records on cancel
invoice, so it is isn't considered invoiced any more by createInvoiceForOrder service</description>
+        <attribute name="invoiceId" type="String" mode="IN" optional="false"/>
+    </service>
+
     <service name="massChangeInvoiceStatus" engine="simple"
             location="component://accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml"
invoke="massChangeInvoiceStatus" auth="true">
         <description>Set status of invoices in bulk.</description>

Modified: ofbiz/branches/jackrabbit20100709/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java?rev=1197247&r1=1197246&r2=1197247&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
(original)
+++ ofbiz/branches/jackrabbit20100709/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
Thu Nov  3 17:59:29 2011
@@ -522,27 +522,30 @@ public class InvoiceServices {
                         continue;
                     }
 
+                    BigDecimal originalOrderItemQuantity = OrderReadHelper.getOrderItemQuantity(originalOrderItem);
                     BigDecimal amount = ZERO;
-                    if (adj.get("amount") != null) {
-                        // pro-rate the amount
-                        // set decimals = 100 means we don't round this intermediate value,
which is very important
-                        amount = adj.getBigDecimal("amount").divide(originalOrderItem.getBigDecimal("quantity"),
100, ROUNDING);
-                        amount = amount.multiply(billingQuantity);
-                        // Tax needs to be rounded differently from other order adjustments
-                        if (adj.getString("orderAdjustmentTypeId").equals("SALES_TAX")) {
-                            amount = amount.setScale(TAX_DECIMALS, TAX_ROUNDING);
-                        } else {
+                    if (originalOrderItemQuantity.signum() != 0) {
+                        if (adj.get("amount") != null) {
+                            // pro-rate the amount
+                            // set decimals = 100 means we don't round this intermediate
value, which is very important
+                            amount = adj.getBigDecimal("amount").divide(originalOrderItemQuantity,
100, ROUNDING);
+                            amount = amount.multiply(billingQuantity);
+                            // Tax needs to be rounded differently from other order adjustments
+                            if (adj.getString("orderAdjustmentTypeId").equals("SALES_TAX"))
{
+                                amount = amount.setScale(TAX_DECIMALS, TAX_ROUNDING);
+                            } else {
+                                amount = amount.setScale(invoiceTypeDecimals, ROUNDING);
+                            }
+                        } else if (adj.get("sourcePercentage") != null) {
+                            // pro-rate the amount
+                            // set decimals = 100 means we don't round this intermediate
value, which is very important
+                            BigDecimal percent = adj.getBigDecimal("sourcePercentage");
+                            percent = percent.divide(new BigDecimal(100), 100, ROUNDING);
+                            amount = billingAmount.multiply(percent);
+                            amount = amount.divide(originalOrderItemQuantity, 100, ROUNDING);
+                            amount = amount.multiply(billingQuantity);
                             amount = amount.setScale(invoiceTypeDecimals, ROUNDING);
                         }
-                    } else if (adj.get("sourcePercentage") != null) {
-                        // pro-rate the amount
-                        // set decimals = 100 means we don't round this intermediate value,
which is very important
-                        BigDecimal percent = adj.getBigDecimal("sourcePercentage");
-                        percent = percent.divide(new BigDecimal(100), 100, ROUNDING);
-                        amount = billingAmount.multiply(percent);
-                        amount = amount.divide(originalOrderItem.getBigDecimal("quantity"),
100, ROUNDING);
-                        amount = amount.multiply(billingQuantity);
-                        amount = amount.setScale(invoiceTypeDecimals, ROUNDING);
                     }
                     if (amount.signum() != 0) {
                         Map<String, Object> createInvoiceItemAdjContext = FastMap.newInstance();

Modified: ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl?rev=1197247&r1=1197246&r2=1197247&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl
(original)
+++ ofbiz/branches/jackrabbit20100709/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl
Thu Nov  3 17:59:29 2011
@@ -29,7 +29,7 @@ function toggleInvoiceId(master) {
 }
 
 function getInvoiceRunningTotal() {
-    var invoices = jQuery("#listPurchaseInvoices: checkbox[name='invoiceIds']");
+    var invoices = jQuery("#listPurchaseInvoices :checkbox[name='invoiceIds']");
 
     //test if all checkboxes are checked
     var allChecked = true;
@@ -67,7 +67,7 @@ function getInvoiceRunningTotal() {
         });
 
         if(jQuery('#serviceName').val() != "") {
-            jQuery('#submitButton').attr('disabled', '');
+            jQuery('#submitButton').removeAttr('disabled');
         }
 
     } else {
@@ -79,8 +79,7 @@ function getInvoiceRunningTotal() {
 function setServiceName(selection) {
     if ( selection.value == 'massInvoicesToApprove' || selection.value == 'massInvoicesToReceive'
|| selection.value == 'massInvoicesToReady' || selection.value == 'massInvoicesToPaid' ||
selection.value == 'massInvoicesToWriteoff' || selection.value == 'massInvoicesToCancel')
{
         document.listPurchaseInvoices.action = jQuery('#invoiceStatusChange').value;
-    }
-    else {
+    } else {
         document.listPurchaseInvoices.action = selection.value;
     }
     if (selection.value == 'massInvoicesToApprove') {
@@ -96,10 +95,10 @@ function setServiceName(selection) {
     }else if (selection.value == 'massInvoicesToCancel') {
         jQuery('#statusId').val("INVOICE_CANCELLED");
     }
-    if (jQuery('#processMassCheckRun').is(':selected')) {
-        jQuery('#issueChecks').fadeOut('slow');
-    } else {
+    if (selection.value.indexOf('processMassCheckRun') >= 0) {
         jQuery('#issueChecks').fadeIn('slow');
+    } else {
+        jQuery('#issueChecks').fadeOut('slow');
     }
 
     var invoices = jQuery("#listPurchaseInvoices :checkbox[name='invoiceIds']");
@@ -113,7 +112,7 @@ function setServiceName(selection) {
     });
 
     if(anyChecked && (jQuery('#serviceName').val() != "")) {
-            jQuery('#submitButton').attr('disabled', '');
+            jQuery('#submitButton').removeAttr('disabled');
     }
 }
 



Mime
View raw message