Author: sichen
Date: Wed Nov 1 17:24:29 2006 New Revision: 470162 URL: http://svn.apache.org/viewvc?view=rev&rev=470162 Log: New OrderAdjustmentBilling entity to record the relationship between OrderAdjustment and InvoiceItem to help determine which tax, shipping, or promo has been invoiced Modified: incubator/ofbiz/trunk/applications/order/entitydef/entitygroup.xml incubator/ofbiz/trunk/applications/order/entitydef/entitymodel.xml incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderSimpleMethods.xml incubator/ofbiz/trunk/applications/order/servicedef/services.xml Modified: incubator/ofbiz/trunk/applications/order/entitydef/entitygroup.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/entitydef/entitygroup.xml?view=diff&rev=470162&r1=470161&r2=470162 ============================================================================== --- incubator/ofbiz/trunk/applications/order/entitydef/entitygroup.xml (original) +++ incubator/ofbiz/trunk/applications/order/entitydef/entitygroup.xml Wed Nov 1 17:24:29 2006 @@ -31,6 +31,7 @@ <entity-group group="org.ofbiz" entity="OldOrderShipmentPreference" /> <entity-group group="org.ofbiz" entity="OrderAdjustment" /> <entity-group group="org.ofbiz" entity="OrderAdjustmentAttribute" /> + <entity-group group="org.ofbiz" entity="OrderAdjustmentBilling" /> <entity-group group="org.ofbiz" entity="OrderAdjustmentType" /> <entity-group group="org.ofbiz" entity="OrderAdjustmentTypeAttr" /> <entity-group group="org.ofbiz" entity="OrderAttribute" /> Modified: incubator/ofbiz/trunk/applications/order/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/entitydef/entitymodel.xml?view=diff&rev=470162&r1=470161&r2=470162 ============================================================================== --- incubator/ofbiz/trunk/applications/order/entitydef/entitymodel.xml (original) +++ incubator/ofbiz/trunk/applications/order/entitydef/entitymodel.xml Wed Nov 1 17:24:29 2006 @@ -91,6 +91,9 @@ <field name="includeInShipping" type="indicator"></field> <field name="createdDate" type="date-time"></field> <field name="createdByUserLogin" type="id-vlong"></field> + <field name="originalAdjustmentId" type="id"> + <description>specifies relation to source OrderAdjustment - eg. for tax on shipping charges</description> + </field> <!-- old fields, deprecated --> <field name="oldAmountPerQuantity" col-name="AMOUNT_PER_QUANTITY" type="currency-amount"></field> <field name="oldPercentage" col-name="PERCENTAGE" type="floating-point"></field> @@ -148,6 +151,9 @@ <relation type="one" fk-name="ORDER_ADJ_TARP" rel-entity-name="TaxAuthorityRateProduct"> <key-map field-name="taxAuthorityRateSeqId"/> </relation> + <relation type="one-nofk" fk-name="ORDER_ADJ_OA" rel-entity-name="OrderAdjustment"> + <key-map field-name="originalAdjustmentId" rel-field-name="orderAdjustmentId"/> + </relation> </entity> <entity entity-name="OrderAdjustmentAttribute" package-name="org.ofbiz.order.order" @@ -175,6 +181,28 @@ <prim-key field="orderAdjustmentTypeId"/> <relation type="one" fk-name="ORDER_ADJ_TYPPAR" title="Parent" rel-entity-name="OrderAdjustmentType"> <key-map field-name="parentTypeId" rel-field-name="orderAdjustmentTypeId"/> + </relation> + </entity> + <entity entity-name="OrderAdjustmentBilling" + package-name="org.ofbiz.order.order" + never-cache="true" + title="Order Adjustment Billing Entity"> + <field name="orderAdjustmentId" type="id-ne"></field> + <field name="invoiceId" type="id-ne"></field> + <field name="invoiceItemSeqId" type="id-ne"></field> + <field name="amount" type="currency-amount"></field> + <prim-key field="orderAdjustmentId"/> + <prim-key field="invoiceId"/> + <prim-key field="invoiceItemSeqId"/> + <relation type="one" fk-name="ORDER_ADJBLNG_OA" rel-entity-name="OrderAdjustment"> + <key-map field-name="orderAdjustmentId"/> + </relation> + <relation type="one-nofk" fk-name="ORDER_ADJBLNG_INV" rel-entity-name="Invoice"> + <key-map field-name="invoiceId"/> + </relation> + <relation type="one" fk-name="ORDER_ADJBLNG_IITM" rel-entity-name="InvoiceItem"> + <key-map field-name="invoiceId"/> + <key-map field-name="invoiceItemSeqId"/> </relation> </entity> <entity entity-name="OrderAdjustmentTypeAttr" Modified: incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderSimpleMethods.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderSimpleMethods.xml?view=diff&rev=470162&r1=470161&r2=470162 ============================================================================== --- incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderSimpleMethods.xml (original) +++ incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderSimpleMethods.xml Wed Nov 1 17:24:29 2006 @@ -54,6 +54,13 @@ <call-service service-name="resetGrandTotal" in-map-name="params"/> </simple-method> + <simple-method method-name="createOrderAdjustmentBilling" short-description="Create an OrderAdjustmentBilling"> + <make-value entity-name="OrderAdjustmentBilling" value-name="newEntity"/> + <set-nonpk-fields map-name="parameters" value-name="newEntity"/> + <set-pk-fields map-name="parameters" value-name="newEntity"/> + <create-value value-name="newEntity"/> + </simple-method> + <simple-method method-name="createOrderItemBilling" short-description="Create an OrderItemBilling"> <make-value entity-name="OrderItemBilling" value-name="newEntity"/> <set-nonpk-fields map-name="parameters" value-name="newEntity"/> Modified: incubator/ofbiz/trunk/applications/order/servicedef/services.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/servicedef/services.xml?view=diff&rev=470162&r1=470161&r2=470162 ============================================================================== --- incubator/ofbiz/trunk/applications/order/servicedef/services.xml (original) +++ incubator/ofbiz/trunk/applications/order/servicedef/services.xml Wed Nov 1 17:24:29 2006 @@ -172,6 +172,15 @@ <auto-attributes mode="IN" include="pk" optional="false"/> </service> + <service name="createOrderAdjustmentBilling" engine="simple" + location="org/ofbiz/order/order/OrderSimpleMethods.xml" invoke="createOrderAdjustmentBilling"> + <description>Create a new order adjustment billing record</description> + <attribute name="orderAdjustmentId" type="String" mode="IN" optional="false"/> + <attribute name="invoiceId" type="String" mode="IN" optional="false"/> + <attribute name="invoiceItemSeqId" type="String" mode="IN" optional="false"/> + <attribute name="amount" type="Double" mode="IN" optional="true"/> + </service> + <service name="createPaymentFromPreference" engine="java" location="org.ofbiz.order.order.OrderServices" invoke="createPaymentFromPreference"> <description>Creates a payment using the order payment preference</description> |
Free forum by Nabble | Edit this page |