-
Notifications
You must be signed in to change notification settings - Fork 625
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Shopify] Shopify return location on refunds (#26728)
This pull request does not have a related issue as it's part of delivery for development agreed directly with @AndreiPanko Added a setting to the shopify shop to use original return location (From shopify) or a default return location set in the Shopify shop when creating Credit Memos for Refunds. Modified the return and refund creation to pull original location from shopify refund or return orders. When an item on a single return order in shopify is restocked to multiple locations, we cannot determine a single location to put on a return line. If there is any reason that Original location couldn't be determined then the Default Return Location will be used during the creation of a Credit Memo. Fixes #26819 Fixes [AB#540965](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/540965) --------- Co-authored-by: Tine Staric <[email protected]>
- Loading branch information
1 parent
0ba11c1
commit 096df31
Showing
15 changed files
with
311 additions
and
12 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
Apps/W1/Shopify/app/src/Base/Enums/ShpfyReturnLocationPriority.Enum.al
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,16 @@ | ||
namespace Microsoft.Integration.Shopify; | ||
|
||
enum 30162 "Shpfy Return Location Priority" | ||
{ | ||
Access = Public; | ||
Extensible = false; | ||
|
||
value(0; "Default Return Location") | ||
{ | ||
Caption = 'Default Return Location'; | ||
} | ||
value(1; "Original -> Default Location") | ||
{ | ||
Caption = 'Original -> Default Location'; | ||
} | ||
} |
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
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
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
27 changes: 27 additions & 0 deletions
27
Apps/W1/Shopify/app/src/GraphQL/Codeunits/ShpfyGQLNextRevFulfillOrdLns.Codeunit.al
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,27 @@ | ||
namespace Microsoft.Integration.Shopify; | ||
|
||
/// <summary> | ||
/// Codeunit Shpfy GQL NextRevFulfillOrdLns (ID 30349) implements Interface Shpfy IGraphQL. | ||
/// </summary> | ||
codeunit 30349 "Shpfy GQL NextRevFulfillOrdLns" implements "Shpfy IGraphQL" | ||
{ | ||
Access = Internal; | ||
|
||
/// <summary> | ||
/// GetGraphQL. | ||
/// </summary> | ||
/// <returns>Return value of type Text.</returns> | ||
internal procedure GetGraphQL(): Text | ||
begin | ||
exit('{"query":"{ reverseFulfillmentOrder(id: \"{{FulfillOrderId}}\") { lineItems(first: 10, after:\"{{After}}\") { pageInfo { endCursor hasNextPage } nodes { id fulfillmentLineItem { id lineItem { id name } } dispositions { id quantity type location { id legacyResourceId } } } } } }"}'); | ||
end; | ||
|
||
/// <summary> | ||
/// GetExpectedCost. | ||
/// </summary> | ||
/// <returns>Return value of type Integer.</returns> | ||
internal procedure GetExpectedCost(): Integer | ||
begin | ||
exit(15); | ||
end; | ||
} |
28 changes: 28 additions & 0 deletions
28
Apps/W1/Shopify/app/src/GraphQL/Codeunits/ShpfyGQLNextRevFulfillOrders.Codeunit.al
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,28 @@ | ||
namespace Microsoft.Integration.Shopify; | ||
|
||
/// <summary> | ||
/// Codeunit Shpfy GQL NextRevFulfillOrders (ID 30347) implements Interface Shpfy IGraphQL. | ||
/// </summary> | ||
codeunit 30347 "Shpfy GQL NextRevFulfillOrders" implements "Shpfy IGraphQL" | ||
{ | ||
Access = Internal; | ||
|
||
/// <summary> | ||
/// GetGraphQL. | ||
/// </summary> | ||
/// <returns>Return value of type Text.</returns> | ||
internal procedure GetGraphQL(): Text | ||
begin | ||
exit('{"query":"{ return(id: \"gid://shopify/Return/{{ReturnId}}\") { reverseFulfillmentOrders(first: 10, after:\"{{After}}\") { pageInfo { endCursor hasNextPage } nodes { id } } } }"}'); | ||
|
||
end; | ||
|
||
/// <summary> | ||
/// GetExpectedCost. | ||
/// </summary> | ||
/// <returns>Return value of type Integer.</returns> | ||
internal procedure GetExpectedCost(): Integer | ||
begin | ||
exit(7); | ||
end; | ||
} |
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
27 changes: 27 additions & 0 deletions
27
Apps/W1/Shopify/app/src/GraphQL/Codeunits/ShpfyGQLRevFulfillOrderLines.Codeunit.al
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,27 @@ | ||
namespace Microsoft.Integration.Shopify; | ||
|
||
/// <summary> | ||
/// Codeunit Shpfy GQL RevFulfillOrderLines (ID 30348) implements Interface Shpfy IGraphQL. | ||
/// </summary> | ||
codeunit 30348 "Shpfy GQL RevFulfillOrderLines" implements "Shpfy IGraphQL" | ||
{ | ||
Access = Internal; | ||
|
||
/// <summary> | ||
/// GetGraphQL. | ||
/// </summary> | ||
/// <returns>Return value of type Text.</returns> | ||
internal procedure GetGraphQL(): Text | ||
begin | ||
exit('{"query":"{ reverseFulfillmentOrder(id: \"{{FulfillOrderId}}\") { id lineItems(first: 10) { nodes { id fulfillmentLineItem { id lineItem { id name } } dispositions { id quantity type location { id legacyResourceId } } } } } }"}'); | ||
end; | ||
|
||
/// <summary> | ||
/// GetExpectedCost. | ||
/// </summary> | ||
/// <returns>Return value of type Integer.</returns> | ||
internal procedure GetExpectedCost(): Integer | ||
begin | ||
exit(15); | ||
end; | ||
} |
28 changes: 28 additions & 0 deletions
28
Apps/W1/Shopify/app/src/GraphQL/Codeunits/ShpfyGQLRevFulfillOrders.Codeunit.al
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,28 @@ | ||
namespace Microsoft.Integration.Shopify; | ||
|
||
/// <summary> | ||
/// Codeunit Shpfy GQL RevFulfillOrders (ID 30346) implements Interface Shpfy IGraphQL. | ||
/// </summary> | ||
codeunit 30346 "Shpfy GQL RevFulfillOrders" implements "Shpfy IGraphQL" | ||
{ | ||
Access = Internal; | ||
|
||
/// <summary> | ||
/// GetGraphQL. | ||
/// </summary> | ||
/// <returns>Return value of type Text.</returns> | ||
internal procedure GetGraphQL(): Text | ||
begin | ||
exit('{"query":"{ return(id: \"gid://shopify/Return/{{ReturnId}}\") { reverseFulfillmentOrders(first: 10) { pageInfo { endCursor hasNextPage } nodes { id } } } }"}'); | ||
|
||
end; | ||
|
||
/// <summary> | ||
/// GetExpectedCost. | ||
/// </summary> | ||
/// <returns>Return value of type Integer.</returns> | ||
internal procedure GetExpectedCost(): Integer | ||
begin | ||
exit(7); | ||
end; | ||
} |
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
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
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
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
Oops, something went wrong.