-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customer deposit view entity #5
Merged
rehan3586
merged 6 commits into
hotwax:main
from
Shinde-nutan:customer-deposit-view-entity
Jan 10, 2025
+52
−7
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f6a90ee
Added two views to fetch the data for the customer deposit feed
dcebcc8
Merge branch 'hotwax:main' into customer-deposit-view-entity
Shinde-nutan c387839
added the netsuite order id in view
3547b0e
Added the conditions in the view
Shinde-nutan 1b3ce1f
updated the view entity
Shinde-nutan e8fe882
Merge branch 'main' of https://github.com/hotwax/mantle-net-suite-con…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/entity-definition-3.xsd"> | ||
|
||
<view-entity entity-name="CustomerDepositSyncView" package="co.hotwax.financial" group="ofbiz_transactional"> | ||
<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="DCO" entity-name="co.hotwax.order.DirectCancelOrder" join-from-alias="OH" sub-select="true" join-optional="true"> | ||
<key-map field-name="orderId"/> | ||
</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"/> | ||
<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"/> | ||
</entity-condition> | ||
</view-entity> | ||
|
||
<view-entity entity-name="DirectCancelOrder" package="co.hotwax.order" group="ofbiz_transactional"> | ||
<member-entity entity-alias="OS" entity-name="org.apache.ofbiz.order.order.OrderStatus"/> | ||
<alias name="statusCount" field="statusId" entity-alias="OS" function="count"/> | ||
<alias name="status" field="statusId" entity-alias="OS" function="max"/> | ||
<alias name="orderId" entity-alias="OS"/> | ||
<entity-condition> | ||
<econdition field-name="orderItemSeqId" operator="is-null" entity-alias="OS"/> | ||
<econdition field-name="orderPaymentPreferenceId" operator="is-null" entity-alias="OS"/> | ||
<having-econditions> | ||
<econditions> | ||
<econdition field-name="statusCount" operator="equals" value="1"/> | ||
<econdition field-name="status" operator="equals" value="ORDER_CANCELLED"/> | ||
</econditions> | ||
</having-econditions> | ||
</entity-condition> | ||
</view-entity> | ||
</entities> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not recommended to include the ViewEntity an another view entity, it will create complex join and cause performance issue.
Instead use the entities directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dixitdeepak do you have a suggestion of when we should use sub select? how will we know if it is right time to use it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will generate the SQL for all the views where we are using the sub-select, for further analysis.