microsoft / ALAppExtensions

Repository for collaboration on Microsoft AL application add-on and localization extensions for Microsoft Dynamics 365 Business Central.
MIT License
773 stars 610 forks source link

[Shopify] Shopify return location on refunds #26728

Closed tinestaric closed 2 months ago

tinestaric commented 3 months ago

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

JesperSchulz commented 2 months ago

@tinestaric, I'll try to process as many of the Shopify PRs as I can this week. Any chance you could resolve the merge issue before I do?

JesperSchulz commented 2 months ago

Also, it seems like ShpfyGraphQLType.Enum.al is modified in a lot of PRs. Maybe it would be an idea to already take care of the IDs to prevent overlap between all PRs?

tinestaric commented 2 months ago

@JesperSchulz Fixed the merge conflict.

As for the enum, we'll have the same issue with object IDs. We weren't sure how these PRs were going to be processed. Would they go through the normal contribution workflow, or was someone from MS team taking them over.

In any case, I have no problem aligning the enum and object ids. Is there an order of PRs you'll follow? So I can sequence the ids in the same way.

JesperSchulz commented 2 months ago

@JesperSchulz Fixed the merge conflict.

As for the enum, we'll have the same issue with object IDs. We weren't sure how these PRs were going to be processed. Would they go through the normal contribution workflow, or was someone from MS team taking them over.

In any case, I have no problem aligning the enum and object ids. Is there an order of PRs you'll follow? So I can sequence the ids in the same way.

Let's just say I'm going bottom up 😋 Oldest first. I too wasn't sure how these will get processed, but I'm tired of having them open, so now I decided to take action 😎

JesperSchulz commented 2 months ago

@tinestaric, will you make sure that CI passes on the Shopify PRs too? Currently they are all failing for one reason or another - some as simple as unused using directives... But they should pass before I attempt to merge any of the code into our internal repo.

tinestaric commented 2 months ago

@JesperSchulz I'll go through them. Quick question, what's the [OnHold] tag for?

tinestaric commented 2 months ago

@JesperSchulz I went through all the Shopify PRs and fixed the CI/CD errors. I've also tried to renumber object and enum IDs so that they wouldn't clash if only these PRs would be merged oldest to newest.

GraphQL Enum will most likely still throw a merge conflict, just because every PR is adding values at the end after value 78.

I didn't fix object IDs for the newest PR #26748, primarily because I ran out of IDs for Codeunits, so the object range will have to be addressed, before that one can be merged in.

JesperSchulz commented 2 months ago

@JesperSchulz I went through all the Shopify PRs and fixed the CI/CD errors. I've also tried to renumber object and enum IDs so that they wouldn't clash if only these PRs would be merged oldest to newest.

GraphQL Enum will most likely still throw a merge conflict, just because every PR is adding values at the end after value 78.

I didn't fix object IDs for the newest PR #26748, primarily because I ran out of IDs for Codeunits, so the object range will have to be addressed, before that one can be merged in.

That's awesome! I'll run CI and see how many pass. The ones that do, I will process tomorrow / Friday (before I go on a 3 week long vacation 😎)