You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ar...@apache.org on 2017/07/22 05:28:38 UTC
svn commit: r1802653 - in /ofbiz/ofbiz-framework/trunk/applications:
accounting/src/main/java/org/apache/ofbiz/accounting/invoice/InvoiceServices.java
product/servicedef/services_shipment.xml
Author: arunpatidar
Date: Sat Jul 22 05:28:38 2017
New Revision: 1802653
URL: http://svn.apache.org/viewvc?rev=1802653&view=rev
Log:
Improvements in ShipmentItemBilling entity definition and services. (OFBIZ-8462).
Thanks Rishi Solanki and Devanshu Vyas fro your contribution.
Modified:
ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/invoice/InvoiceServices.java
ofbiz/ofbiz-framework/trunk/applications/product/servicedef/services_shipment.xml
Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/invoice/InvoiceServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/invoice/InvoiceServices.java?rev=1802653&r1=1802652&r2=1802653&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/invoice/InvoiceServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/invoice/InvoiceServices.java Sat Jul 22 05:28:38 2017
@@ -510,10 +510,13 @@ public class InvoiceServices {
if (UtilValidate.isEmpty(shipmentItemBillings)) {
// create the ShipmentItemBilling record
- GenericValue shipmentItemBilling = delegator.makeValue("ShipmentItemBilling", UtilMisc.toMap("invoiceId", invoiceId, "invoiceItemSeqId", invoiceItemSeqId));
- shipmentItemBilling.put("shipmentId", currentValue.get("shipmentId"));
- shipmentItemBilling.put("shipmentItemSeqId", currentValue.get("shipmentItemSeqId"));
- shipmentItemBilling.create();
+ Map<String, Object> shipmentItemBillingCtx = new HashMap<>();
+ shipmentItemBillingCtx.put("invoiceId", invoiceId);
+ shipmentItemBillingCtx.put("invoiceItemSeqId", invoiceItemSeqId);
+ shipmentItemBillingCtx.put("shipmentId", currentValue.get("shipmentId"));
+ shipmentItemBillingCtx.put("shipmentItemSeqId", currentValue.get("shipmentItemSeqId"));
+ shipmentItemBillingCtx.put("userLogin", userLogin);
+ dispatcher.runSync("createShipmentItemBilling", shipmentItemBillingCtx);
}
}
Modified: ofbiz/ofbiz-framework/trunk/applications/product/servicedef/services_shipment.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/servicedef/services_shipment.xml?rev=1802653&r1=1802652&r2=1802653&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/servicedef/services_shipment.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/servicedef/services_shipment.xml Sat Jul 22 05:28:38 2017
@@ -1122,4 +1122,19 @@ under the License.
<description>Delete a ShippingDocument</description>
<auto-attributes include="pk" mode="IN" optional="false"/>
</service>
+
+ <service name="createShipmentItemBilling" default-entity-name="ShipmentItemBilling" engine="entity-auto" invoke="create" auth="true">
+ <description>Create a ShipmentItemBilling</description>
+ <auto-attributes include="pk" mode="IN" optional="false"/>
+ <auto-attributes include="nonpk" mode="IN" optional="true"/>
+ </service>
+ <service name="updateShipmentItemBilling" default-entity-name="ShipmentItemBilling" engine="entity-auto" invoke="update" auth="true">
+ <description>Update a ShipmentItemBilling</description>
+ <auto-attributes include="pk" mode="IN" optional="false"/>
+ <auto-attributes include="nonpk" mode="IN" optional="true"/>
+ </service>
+ <service name="deleteShipmentItemBilling" default-entity-name="ShipmentItemBilling" engine="entity-auto" invoke="delete" auth="true">
+ <description>Delete a ShipmentItemBilling</description>
+ <auto-attributes include="pk" mode="IN" optional="false"/>
+ </service>
</services>