You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by si...@apache.org on 2007/08/16 22:37:43 UTC

svn commit: r566834 - in /ofbiz/trunk/applications: accounting/config/AccountingUiLabels.properties accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java product/entitydef/entitymodel_shipment.xml

Author: sichen
Date: Thu Aug 16 13:37:42 2007
New Revision: 566834

URL: http://svn.apache.org/viewvc?view=rev&rev=566834
Log:
Add an additionalShippingChargeDesc field to the Shipment entity to accompany the additionalShippingCharge field. If this field is populated, it will be used for the order adjustment and invoice item descriptions instead of the default description.

Modified:
    ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
    ofbiz/trunk/applications/product/entitydef/entitymodel_shipment.xml

Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties?view=diff&rev=566834&r1=566833&r2=566834
==============================================================================
--- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties (original)
+++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.properties Thu Aug 16 13:37:42 2007
@@ -639,7 +639,7 @@
 AccountingInvoiceCommissionNoItems=No order or return items, not creating commission invoice
 AccountingInvoiceCommissionEntityDataProblem=Entity/data problem creating commission invoice: ${reason} 
 AccountingPageTitleAgreementPriceList=Agreement Price List
-AccountingAdditionalShippingChargeForShipment=Additional Shipping Charge For Shipment
+AccountingAdditionalShippingChargeForShipment=Additional Shipping Charge For Shipment #${shipmentId}
 AccountingIgnoringAdditionalShipCharges=prorateShipping is not N for productStoreId ${productStoreId}: Additional shipping charges for shipments are ignored
 AccountingUnableToAuthAdditionalShipCharges=Unable to authorize additional shipping charges for shipmentId ${shipmentId} to paymentMethodId ${paymentMethodId} (orderPaymentPreferenceId ${orderPaymentPreferenceId})
 AccountingTroubleCallingAuthOrderPaymentPreferenceService=Trouble calling authOrderPaymentPreference service

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?view=diff&rev=566834&r1=566833&r2=566834
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java Thu Aug 16 13:37:42 2007
@@ -1352,7 +1352,11 @@
                         Map createOrderAdjustmentContext = new HashMap();
                         createOrderAdjustmentContext.put("orderId", orderId);
                         createOrderAdjustmentContext.put("orderAdjustmentTypeId", "SHIPPING_CHARGES");
-                        createOrderAdjustmentContext.put("description", UtilProperties.getMessage(resource, "AccountingAdditionalShippingChargeForShipment", locale) + " #" + shipmentId);
+                        String addtlChargeDescription = shipment.getString("additionalShippingChargeDesc");
+                        if (UtilValidate.isEmpty(addtlChargeDescription)) {
+                            addtlChargeDescription = UtilProperties.getMessage(resource, "AccountingAdditionalShippingChargeForShipment", UtilMisc.toMap("shipmentId", shipmentId), locale);
+                        }
+                        createOrderAdjustmentContext.put("description", addtlChargeDescription);
                         createOrderAdjustmentContext.put("sourceReferenceId", shipmentId);
                         createOrderAdjustmentContext.put("amount", new Double(additionalShippingCharge.doubleValue()));
                         createOrderAdjustmentContext.put("userLogin", context.get("userLogin"));

Modified: ofbiz/trunk/applications/product/entitydef/entitymodel_shipment.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel_shipment.xml?view=diff&rev=566834&r1=566833&r2=566834
==============================================================================
--- ofbiz/trunk/applications/product/entitydef/entitymodel_shipment.xml (original)
+++ ofbiz/trunk/applications/product/entitydef/entitymodel_shipment.xml Thu Aug 16 13:37:42 2007
@@ -545,6 +545,7 @@
       <field name="partyIdTo" type="id"></field>
       <field name="partyIdFrom" type="id"></field>
       <field name="additionalShippingCharge" type="currency-amount"></field>
+      <field name="additionalShippingChargeDesc" type="long-varchar"></field>
       <field name="createdDate" type="date-time"></field>
       <field name="createdByUserLogin" type="id-vlong"></field>
       <field name="lastModifiedDate" type="date-time"></field>



Re: svn commit: r566834 - in /ofbiz/trunk/applications: accounting/config/AccountingUiLabels.properties accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java product/entitydef/entitymodel_shipment.xml

Posted by Hans Bakker <ma...@antwebsystems.com>.
Hi Si,

i get the following warning in the log:

 [FieldNameGT30] Column name [ADDITIONAL_SHIPPING_CHARGE_DESC] of entity
Shipment is longer than 30 characters.

Regards, Hans