Skip to content

Commit

Permalink
Merge pull request #5 from Shinde-nutan/customer-deposit-view-entity
Browse files Browse the repository at this point in the history
Customer deposit view entity
  • Loading branch information
rehan3586 authored Jan 10, 2025
2 parents 56f870a + e8fe882 commit 965eeee
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 7 deletions.
57 changes: 51 additions & 6 deletions entity/NesuiteViewEntities.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
<date-filter/>
</entity-condition>
</member-entity>
<member-entity entity-alias="OR" entity-name="org.apache.ofbiz.order.order.OrderRole" join-from-alias="OH" join-optional="true">
<member-entity entity-alias="ODR" entity-name="org.apache.ofbiz.order.order.OrderRole" join-from-alias="OH" join-optional="true">
<key-map field-name="orderId"/>
<entity-condition>
<econdition entity-alias="OR" field-name="roleTypeId" operator="equals" value="BILL_TO_CUSTOMER"/>
<econdition entity-alias="ODR" field-name="roleTypeId" operator="equals" value="BILL_TO_CUSTOMER"/>
</entity-condition>
</member-entity>
<member-entity entity-alias="PID" entity-name="org.apache.ofbiz.party.party.PartyIdentification" join-from-alias="OR">
<member-entity entity-alias="PID" entity-name="org.apache.ofbiz.party.party.PartyIdentification" join-from-alias="ODR">
<key-map field-name="partyId"/>
<entity-condition>
<econdition entity-alias="PID" field-name="partyIdentificationTypeId" value="NETSUITE_CUSTOMER_ID"/>
Expand Down Expand Up @@ -89,13 +89,13 @@
<member-entity entity-alias="SCENM" entity-name="moqui.basic.Enumeration" join-from-alias="OH" join-optional="true">
<key-map field-name="salesChannelEnumId" related="enumId"/>
</member-entity>
<member-entity entity-alias="OR" entity-name="org.apache.ofbiz.order.order.OrderRole" join-from-alias="OH" join-optional="true">
<member-entity entity-alias="ODR" entity-name="org.apache.ofbiz.order.order.OrderRole" join-from-alias="OH" join-optional="true">
<key-map field-name="orderId"/>
<entity-condition>
<econdition entity-alias="OR" field-name="roleTypeId" operator="equals" value="BILL_TO_CUSTOMER"/>
<econdition entity-alias="ODR" field-name="roleTypeId" operator="equals" value="BILL_TO_CUSTOMER"/>
</entity-condition>
</member-entity>
<member-entity entity-alias="PID" entity-name="org.apache.ofbiz.party.party.PartyIdentification" join-from-alias="OR">
<member-entity entity-alias="PID" entity-name="org.apache.ofbiz.party.party.PartyIdentification" join-from-alias="ODR">
<key-map field-name="partyId"/>
<entity-condition>
<econdition entity-alias="PID" field-name="partyIdentificationTypeId" value="NETSUITE_CUSTOMER_ID"/>
Expand Down Expand Up @@ -261,4 +261,49 @@
<econdition field-name="orderTypeId" entity-alias="OH" operator="equals" value="SALES_ORDER"/>
</entity-condition>
</view-entity>
<view-entity entity-name="CustomerDepositSyncView" package="co.hotwax.financial">
<member-entity entity-alias="OH" entity-name="org.apache.ofbiz.order.order.OrderHeader"/>
<member-entity entity-alias="OID" entity-name="co.hotwax.order.OrderIdentification" join-from-alias="OH">
<key-map field-name="orderId"/>
<entity-condition>
<econdition entity-alias="OID" field-name="orderIdentificationTypeId" value="NETSUITE_ORDER_ID"/>
<date-filter/>
</entity-condition>
</member-entity>
<member-entity entity-alias="OPP" entity-name="org.apache.ofbiz.order.order.OrderPaymentPreference" join-from-alias="OH">
<key-map field-name="orderId"/>
</member-entity>
<member-entity entity-alias="OISG" entity-name="org.apache.ofbiz.order.order.OrderItemShipGroup" join-from-alias="OH">
<key-map field-name="orderId"/>
</member-entity>
<member-entity entity-alias="OS" entity-name="org.apache.ofbiz.order.order.OrderStatus" join-from-alias="OH" join-optional="true">
<key-map field-name="orderId"/>
<entity-condition>
<econdition field-name="orderItemSeqId" operator="is-null" entity-alias="OS"/>
<econdition field-name="orderPaymentPreferenceId" operator="is-null" entity-alias="OS"/>
</entity-condition>
</member-entity>
<alias name="shopifyOrderNo" field="externalId" entity-alias="OH"/>
<alias name="totalAmount" field="maxAmount" entity-alias="OPP"/>
<alias name="externalId" field="manualRefNum" entity-alias="OPP"/>
<alias name="fromDate" entity-alias="OID"/>
<alias name="orderId" field="idValue" entity-alias="OID"/>
<alias name="paymentMethodTypeId" entity-alias="OPP"/>
<alias name="orderPaymentPreferenceId" entity-alias="OPP"/>
<alias name="shipmentMethodTypeId" entity-alias="OISG" is-aggregate="true"/>
<alias name="statusCount" field="statusId" entity-alias="OS" function="count"/>
<alias name="status" field="statusId" entity-alias="OS" function="max"/>
<entity-condition>
<econdition entity-alias="OH" field-name="orderTypeId" value="SALES_ORDER"/>
<econdition field-name="statusId" operator="not-equals" value="PAYMENT_REFUNDED" entity-alias="OPP"/>
<econdition field-name="paymentMethodTypeId" operator="not-equals" value="EXT_SHOP_GFT_CARD" entity-alias="OPP"/>
<having-econditions combine="or">
<econditions>
<econdition field-name="statusCount" operator="equals" value="1"/>
<econdition field-name="status" operator="not-equals" value="ORDER_CANCELLED"/>
</econditions>
<econdition field-name="statusCount" operator="greater" value="1"/>
</having-econditions>
</entity-condition>
</view-entity>
</entities>
2 changes: 1 addition & 1 deletion entity/omsViewEntities.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<!-- we can shift this view into ofbiz-oms-udm component where all other generic views are created as IntegrationTypeMappingAndEnum view is not specific to netsuite. -->
<view-entity entity-name="IntegrationTypeMappingAndEnum" package="co.hotwax.integration">
<member-entity entity-alias="ITM" entity-name="co.hotwax.integration.IntegrationTypeMapping"/>
<member-entity entity-alias="ENUM" entity-name="org.apache.ofbiz.common.enum.Enumeration" join-from-alias="ITM">
<member-entity entity-alias="ENUM" entity-name="moqui.basic.Enumeration" join-from-alias="ITM">
<key-map field-name="integrationTypeId"/>
</member-entity>
<alias-all entity-alias="ITM"/>
Expand Down

0 comments on commit 965eeee

Please sign in to comment.