Граф коммитов

1461 Коммитов

Автор SHA1 Сообщение Дата
Alexander Holstrup bc92c14e0e
Syncing with version 26.0.29419.0 (#27998)
Fixes
[AB#560539](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/560539)
2025-01-28 11:17:08 +01:00
Florian Dietrich d64f83940e
Add unpublish extension action in automation api (#27916)
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to AlAppExtensions please read our pull request guideline
below
* https://github.com/microsoft/ALAppExtensions/blob/main/CONTRIBUTING.md
-->
#### Summary <!-- Provide a general summary of your changes -->
add a new action unpublish to page ```30002 "APIV2 - Aut. Extensions"```
[link](a1f39200bc/Apps/W1/APIV2/app/src/pages/APIV2AutExtensions.Page.al).

##### Flow:

1. User sends a request ```POST
https://.../api/microsoft/automation/v2.0/companies(...)/extensions(<packageId>)/Microsoft.NAV.unpublish```
2. new unpublish action gets called
3. If package is installed, raise error
4. call ExtensionManagement.UnpublishExtension(Rec."Package ID"); to
unpublish app
5. Return WebServiceActionResultCode::Deleted 

#### Work Item(s) 
<!-- Add the issue number here after the #. The issue needs to be open
and approved. Submitting PRs with no linked issues or unapproved issues
is highly discouraged. -->
Fixes #27901

Fixes
[AB#391847](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/391847)
2025-01-28 09:33:44 +01:00
Alexander Holstrup 821f23d010
Syncing with version 26.0.29027.0 (#27952)
Fixes
[AB#560539](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/560539)
2025-01-17 14:12:42 +01:00
Alexander Holstrup 2840c2f6a4
Update Baseline (#27908) 2025-01-09 12:25:05 +01:00
SUMIT KUMAR DAS a1f39200bc
Update ShpfyShopCard.Page.al to fix tooltip message for Shopify Action for Removed Products Option (#27813)
This pull request updates the tooltip message for the Shopify product
status setting in the Shopify connector. The previous message was
misleading, implying that changes occur when an item is removed directly
in Shopify.

The new tooltip clarifies that the status is updated in Shopify via sync
when:
- An item is removed from the Shopify Product in D365BC.
- An item is blocked in Business Central.

This change aims to improve clarity for users of the connector.

Fixes
[AB#561468](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/561468)
2025-01-03 11:25:05 +01:00
Alexander Holstrup dfa3c76ed6
Update AL-Go Files + Run CICD on schedule (#27842)
Related to
[AB#539394](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/539394)

---------

Co-authored-by: aholstrup1 <aholstrup1@users.noreply.github.com>
2024-12-18 15:01:57 +01:00
Alexander Holstrup 4f1d3e4b45
Syncing with version 26.0.28000.0 (#27808)
Fixes
[AB#420000](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/420000)
2024-12-13 11:51:01 +01:00
Vladyslav Kovalchuk 2ac1ba8cbd
Fix Sustainability preview posting subscriber (#27775)
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to AlAppExtensions please read our pull request guideline
below
* https://github.com/microsoft/ALAppExtensions/blob/main/CONTRIBUTING.md
-->
#### Summary <!-- Provide a general summary of your changes -->
Change the binding preview posting codeunits using try method like in
service posting
#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes #27706


Fixes
[AB#559882](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/559882)

Co-authored-by: Vladyslav Kovalchuk <vladkovalchuk09@gmail.com>
2024-12-13 08:01:40 +01:00
jaymckinney-enavate cb4a2a0213
GP - Correct issue with IRS 1099 data migration (#27784)
This change corrects an issue when migrating GP Vendor 1099 data on
version v25.

Changes:

- Always check to see if the new IRS Forms feature is enabled.
- Initialize the original/old IRS 1099 Forms feature if required.

Fixes #26487
Fixes
[AB#560225](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/560225)

---------

Co-authored-by: jaymckinney <jay.mckinney82@gmail.com>
Co-authored-by: Jesper Schulz-Wedde <JesperSchulz@users.noreply.github.com>
2024-12-12 19:00:22 +00:00
Miljan Milosavljević 0bb636e963
Exclude or Include Tables from Cloud Migration (#27773)
#### Summary
Enables a developer:
- To prepare packages of tables for cloud sync
- Disable some tables for cloud sync- those that are set as default
during initial setup - in order to save database space.
- Select custom tables programmatically

#### Work Item(s)
Fixes #27655

@nikolakukrika There are some tests in the Codeunit 139656 "Hybrid Cloud
Management Tests". I am not sure if new tests are needed for this
change.
Fixes
[AB#558218](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/558218)
2024-12-12 10:37:52 +01:00
Alexander Holstrup 42a98a09af
Syncing with version 26.0.27721.0 (#27774)
Fixes
[AB#420000](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/420000)
2024-12-06 14:01:43 +01:00
Miljan Milosavljević b5ef06ad2f
Salesperson API (#27664)
#### Summary
A new API page for Salespeople/Purchasers
I created the tests in a similar manner that I found suitable for
Locations, but I did not manage to run the test. Thus, looking forward
to the feedback if tests do pass in Microsoft Pipelines or how to test
those calls in a container. Currently I do not have a clue how to do it.

#### Work Item(s) 
Fixes #26806

Fixes
[AB#541735](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/541735)

---------

Co-authored-by: Jesper Schulz-Wedde <JesperSchulz@users.noreply.github.com>
2024-12-06 10:55:37 +01:00
blauerPCL c7ddf7a290
Plumbline: HybridSL updates 202411 (#27756)
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to AlAppExtensions please read our pull request guideline
below
* https://github.com/microsoft/ALAppExtensions/blob/main/CONTRIBUTING.md
-->
#### Summary <!-- Provide a general summary of your changes -->

- Hide "Set All Dimensions" action and "Open Purchase Orders" option on
SL Company Migration Configuration page.
- Create Accounting Periods
- Create Tax Areas
- Add Permission Sets for objects

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes #27620

Fixes
[AB#559550](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/559550)

---------

Co-authored-by: Jesper Schulz-Wedde <JesperSchulz@users.noreply.github.com>
2024-12-06 10:55:28 +01:00
Tine Starič 07ec75fbd4
[Shopify] Sales Channels publishing for new products (#27540)
This pull request does not have a related issue as it's part of delivery
for development agreed directly with @AndreiPanko
Fixes #26819

### Sales Channels publishing for new products

This PR contains new functionality where user can choose Sales Channels
which will new products be published to on creation from BC.

Solution contains new page and table - Shopify Sales Channels available
from Shopify Shop. On page user can import sales channels available for
shop and choose to which new products should be published to. If user
does not choose any of the channels, then channel "Online Shop" is being
used by default.

In case user did not import Sales Channels before running create product
sales channels are pulled from Shopify on before publishing and default
channel is used.

Pulled sales channels are updated in BC - in case the channel was
removed in Shopify its removed from list in BC.

### Modified/new objects

- New GQL query codeunit was created to import the Sales Channels.
- New GQL Query Enum Value 
- New codeunit Shpfy Sales Channel API to handle sales channels import
- Removed detracted published = true from Shpfy Product API, added
procedures to handle new way of publishing new products to sales
channels
- Sales Channels page and table
- New action on Shopify Shop Card page - Sales Channels


Fixes
[AB#556526](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/556526),
[AB#550319](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/550319)

---------

Co-authored-by: Piotr Michalak <piotr.michalak@companial.com>
Co-authored-by: Jesper Schulz-Wedde <JesperSchulz@users.noreply.github.com>
Co-authored-by: Onat Buyukakkus <55088871+onbuyuka@users.noreply.github.com>
2024-12-06 10:55:19 +01:00
jaymckinney-enavate 83d72b0005
GP - Config Oldest G/L Year warning message (#27683)
This change enhances the migration configuration page to display a
warning message if a company is configured to migrate without setting
the Oldest G/L Year.

Fixes #26487
Fixes
[AB#558913](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/558913)

Co-authored-by: jaymckinney <jay.mckinney82@gmail.com>
2024-12-03 09:27:06 +01:00
Gediminas Gaubys 4a45f90a4a
[Shopify] - Different Shipping Charges Types Tests (#27575)
This pull request does not have a related issue as it's part of the
delivery for development agreed directly with @AndreiPanko

Different shipping charges types Tests
Automated tests for changes
https://github.com/microsoft/ALAppExtensions/pull/26708

Fixes #26819
Fixes
[AB#556525](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/556525)

---------

Co-authored-by: Piotr Michalak <piotr.michalak@companial.com>
Co-authored-by: Jesper Schulz-Wedde <JesperSchulz@users.noreply.github.com>
2024-12-02 16:33:49 +01:00
Magnus Hartvig Grønbech d311efd52a
Syncing with version 26.0.27457.0 (#27732)
Related to
[AB#420000](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/420000)

Co-authored-by: magnushar <magnushar@microsoft.com>
2024-11-30 16:32:46 +00:00
Magnus Hartvig Grønbech 8cb747a518
Syncing with version 26.0.27417.0 (#27726)
Related to
[AB#420000](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/420000)

---------

Co-authored-by: magnushar <magnushar@microsoft.com>
Co-authored-by: aholstrup1 <aholstrup@microsoft.com>
2024-11-30 10:44:59 +01:00
Miljan Milosavljević 1945118171
extending GL Setup API (#27660)
#### Summary
Added Shortcut Dimension Codes to the API page for "G/L Setup"

Fixes #26805

Fixes
[AB#541734](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/541734)
2024-11-27 15:06:27 +01:00
blauerPCL 583d582cd8
Initial upload of the Dynamics SL Migration extension (#27530)
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to AlAppExtensions please read our pull request guideline
below
* https://github.com/microsoft/ALAppExtensions/blob/main/CONTRIBUTING.md
-->
#### Summary: Initial upload of the Dynamics SL Migration extension

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes #27620

Fixes
[AB#556923](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/556923)

---------

Co-authored-by: Jesper Schulz-Wedde <JesperSchulz@users.noreply.github.com>
2024-11-27 14:03:30 +01:00
Alexander Holstrup 83eeeee456
Uptake issue types (#27708)
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to AlAppExtensions please read our pull request guideline
below
* https://github.com/microsoft/ALAppExtensions/blob/main/CONTRIBUTING.md
-->
#### Summary <!-- Provide a general summary of your changes -->
Uptake issue types

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#555781](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/555781)
2024-11-27 13:37:44 +01:00
Magnus Hartvig Grønbech 07aa6c5540
Syncing with version 26.0.27052.0 (#27662)
Co-authored-by: Magnus Hartvig Grønbech <magnushar@microsoft.com>
2024-11-21 12:23:07 +00:00
Magnus Hartvig Grønbech 449bcbe87d
Syncing with version 26.0.26951.0 (#27654)
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to AlAppExtensions please read our pull request guideline
below
* https://github.com/microsoft/ALAppExtensions/blob/main/CONTRIBUTING.md
-->
#### Summary <!-- Provide a general summary of your changes -->

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes #

Co-authored-by: magnushar <magnushar@microsoft.com>
2024-11-20 08:22:38 +01:00
Magnus Hartvig Grønbech cc4a0879d6
Syncing with version 26.0.26946.0 (#27653)
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to AlAppExtensions please read our pull request guideline
below
* https://github.com/microsoft/ALAppExtensions/blob/main/CONTRIBUTING.md
-->
#### Summary <!-- Provide a general summary of your changes -->

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes #

Co-authored-by: magnushar <magnushar@microsoft.com>
2024-11-20 00:40:52 +01:00
blauerPCL 610bd2fc07
Initial upload of the Dynamics SL Historical Data extension (#27527)
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to AlAppExtensions please read our pull request guideline
below
* https://github.com/microsoft/ALAppExtensions/blob/main/CONTRIBUTING.md
-->
#### Summary: Initial upload of the Dynamics SL Historical Data
extension

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes #27620

Fixes
[AB#556923](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/556923)
2024-11-13 19:06:23 +01:00
Alexander Holstrup e2a83ee3f2
Reenable test execution (#27587)
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to AlAppExtensions please read our pull request guideline
below
* https://github.com/microsoft/ALAppExtensions/blob/main/CONTRIBUTING.md
-->
#### Summary <!-- Provide a general summary of your changes -->
Reenable tests by uninstalling apps that aren't supported in W1 before
we start running tests. This will ensure tests don't accidently trigger
e.g. event subscribers from apps that aren't supported in W1 anyway.
Right now we are building, publishing and testing apps on top of a W1
Base App even though some of them aren't supported in W1.

We'll continue to compile the apps. We just won't have them installed
when running tests. With this change, tests are working again:
https://github.com/microsoft/ALAppExtensions/actions/runs/11664233820

Another way we could solve this from AL-Go would could define anti
patterns for app/test folders. In that case we would have the following
in the AL-Go settings `testFolders: [ Apps/W1/*/app/,
!Apps/W1/INTaxEngine/app ] `

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#556300](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/556300)
2024-11-13 13:34:55 +01:00
Gediminas Gaubys 9a7518292a
[Shopify] - Export Posted Sales Invoices to Shopify as Orders Tests (#27570)
This pull request does not have a related issue as it's part of delivery
for development agreed directly with @AndreiPanko

Add Item As Variant Test
Automated tests for changes
https://github.com/microsoft/ALAppExtensions/pull/26748
Fixes #26819
Fixes
[AB#556529](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/556529)

---------

Co-authored-by: Jesper Schulz-Wedde <JesperSchulz@users.noreply.github.com>
2024-11-11 12:32:14 +00:00
Gediminas Gaubys a1ddf212fa
[Shopify] Shopify Return Location on Refunds tests (#27578)
This pull request does not have a related issue as it's part of delivery
for development agreed directly with @AndreiPanko
Fixes https://github.com/microsoft/ALAppExtensions/issues/26819

Add Item As Variant Test
Automated tests for changes
https://github.com/microsoft/ALAppExtensions/pull/26728
Fixes
[AB#556527](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/556527)

---------

Co-authored-by: Piotr Michalak <piotr.michalak@companial.com>
2024-11-11 09:48:29 +01:00
glachana 85ab17a7e8
[Shopify] Fix sync catalog price issue (#27555)
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to AlAppExtensions please read our pull request guideline
below
* https://github.com/microsoft/ALAppExtensions/blob/main/CONTRIBUTING.md
-->
#### Summary <!-- Provide a general summary of your changes -->
When users try to synchronize prices through the action available on
Shopify Catalogs page. Only the 100 first prices are synchronized. So if
the Shopify Catalog contains more than 100 product, only 100 of them
will be updated.

This problem results from a difference between two GraphQL requests made
during this process:

1) codeunit 30296 "Shpfy GQL CatalogPrices"
'{"query": "query { catalog(id: "gid://shopify/Catalog/{{CatalogId}}") {
id priceList {id currency prices(first:100) {edges {cursor node {variant
{id product {id}} price {amount} compareAtPrice {amount}}} pageInfo
{hasNextPage}}}}}"}'

2) codeunit 30297 "Shpfy GQL NextCatalogPrices"
'{"query": "query { catalog(id: "gid://shopify/Catalog/{{CatalogId}}") {
id priceList {id prices(first:100, after:"{{After}}") {edges {cursor
node {variant {id} price {amount} compareAtPrice {amount}}} pageInfo
{hasNextPage}}}}}"}'

Some necessary nodes are missing in NextCatalogPrices. Here is a fixed
request :

'{"query": "query { catalog(id: "gid://shopify/Catalog/{{CatalogId}}") {
id priceList {id currency prices(first:100, after:"{{After}}") {edges
{cursor node {variant {id product {id}} price {amount} compareAtPrice
{amount}}} pageInfo {hasNextPage}}}}}"}'


#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes #27535


Fixes
[AB#556528](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/556528)
2024-11-06 12:34:38 +01:00
Alexander Holstrup 55a817f1d6
Syncing with version 26.0.26183.0 (#27582) 2024-11-01 13:23:16 +01:00
Tine Starič ea13da4e51
[Shopify] - Add Item As Variant Tests (#27541)
This pull request does not have a related issue as it's part of delivery
for development agreed directly with @AndreiPanko
Fixes #26819

### Add Item As Variant Test

Automated tests for changes #26712 


Fixes
[AB#555979](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/555979)

---------

Co-authored-by: Piotr Michalak <piotr.michalak@companial.com>
2024-11-01 13:19:26 +01:00
Tine Starič fe1fe17f01
[Shopify] Customer/Company Metafields (#27542)
This pull request does not have a related issue as it's part of delivery
for development agreed directly with @AndreiPanko
Fixes #26819

### Existing metafield engine applied to integrate Customer and Company
metafields

Changes done to apply the engine:

- Extended `ShpfyGQLCompany.Codeunit.al` and
`ShpfyGQLCustomer.Codeunit.al` GQL query to get metafields with required
properties in response. Removed the namespace from query to retreive all
metafields.
- Created 2 new GraphQL queries `Shpfy GQL CustomerMetafieldIds` and
`Shpfy GQL CompanyMetafieldIds` to make `RetrieveMetafieldsFromShopify`
function work with Company and Customer.
- Created 2 new IMetafield Owner Type implementation codeunits for
Company and Customer
- Added values to related interface enums
- Added UpdateMetafield functions in API codeunits to update metafields
if there are metafields in response
- Removed old not working code to update metafields
- Add Metafields actions to Company/Customer list and card pages.
- Add owner type Company to `GetOwnerType` procedure in `Shpfy
Metafield` table
- Changed parameters in `CollectMetafieldIds` local procedure in `Shpfy
Metafield API` codeunit to support all Ownet types in function

Fixes
[AB#556298](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/556298)

---------

Co-authored-by: Piotr Michalak <piotr.michalak@companial.com>
2024-11-01 11:07:46 +01:00
Alexander Holstrup e1303a8a95
Update CODEOWNERS for EDocuments (#27572)
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to AlAppExtensions please read our pull request guideline
below
* https://github.com/microsoft/ALAppExtensions/blob/main/CONTRIBUTING.md
-->
#### Summary <!-- Provide a general summary of your changes -->
Update CODEOWNERS for EDocuments

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes AB#556370
2024-10-31 11:35:41 +01:00
Tine Starič c8b01d767f
[Shopify] Log Skipped Records on export processes (#27539)
This pull request does not have a related issue as it's part of delivery
for development agreed directly with @AndreiPanko
Fixes #26819 

### Created new structure to log records skipped on export

Solution has new structure possible to open by typing "Shopify Skipped
Records". On page user can see all the skipped records with reasons and
date and time when the record was skipped. User can also open the
related record using "Show record" action or clicking the "Description"
field value.

### Log cases:

Customer:
- Customer has empty email
- Customer with same email or phone exists

Posted Sales Invoice:
- Customer does not exist in Shopify
- Payment terms do not exist in Shopify
- Customer No. is Default Customer No. for Shopify Shop
- Customer No. is used in Shopify Customer Template
- No lines existing in sales invoice
- Invalid Quantity
- Empty No. value

Product:
-  Item is blocked/sales blocked (Item Variant)
-  Item is blocked

Shipments:
 - Related Shopify Order does not exist
 - No lines in Posted Sales Shipment applicable for fulfillment 
 - No corresponding fulfillment found in Shopify.

If the condition met log record is being created.

### Retention policy
Retention policy is inserted on extension install. It can be turned on
"Retention Policies" page.

Fixes
[AB#473306](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/473306)

---------

Co-authored-by: Piotr Michalak <piotr.michalak@companial.com>
Co-authored-by: Gediminas Gaubys <gediminas.gaubys5@gmail.com>
2024-10-30 15:55:46 +01:00
Maria Zhelezova 7ca090c670
Syncing with version 26.0.25961.0 (#27550)
[AB#539394](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/539394)
2024-10-29 16:13:12 +01:00
Magnus Hartvig Grønbech 2d2552ad0a
Add missing (#27545)
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to AlAppExtensions please read our pull request guideline
below
* https://github.com/microsoft/ALAppExtensions/blob/main/CONTRIBUTING.md
-->
#### Summary <!-- Provide a general summary of your changes -->

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#555357](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/555357)

Co-authored-by: Magnus Hartvig Grønbech <magnushar@microsoft.com>
2024-10-28 11:24:35 +01:00
Stefan Sosic bebbea6afa
#943 Intrastat default transactions types (#27521)
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to AlAppExtensions please read our pull request guideline
below
* https://github.com/microsoft/ALAppExtensions/blob/main/CONTRIBUTING.md
-->
#### Summary <!-- Provide a general summary of your changes -->
Based on approval:
https://github.com/microsoft/BusinessCentralApps/issues/943

This issue is generated from the following idea on
[aka.ms/bcideas](https://github.com/microsoft/BusinessCentralApps/issues/aka.ms/bcideas):
[Intrastat default transactions
types](https://experience.dynamics.com/ideas/idea/?ideaid=ae80958c-159b-ed11-a76e-0003ff45e043)

To do the Intrastat reporting the "Default Trans. Types" must be filled
on the customer card, but its not possible to add these fields to the
customer template, its easy to forget to put in the data.

Please add the fields on the customer template.
#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->

Fixes #27520
Fixes
[AB#461591](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/461591)

Co-authored-by: Stefan Sosic <StefanSosic>
2024-10-28 10:53:06 +01:00
matjaz-sega cb1d70e424
[Intrastat Core] Changes to "Validate Codeunit ID" and "Content Codeunit ID" behavior on "Intrastat Report" page (#27350)
#### Summary

There is a problem with current implementation of "Validate Codeunit ID"
and "Content Codeunit ID" in several actions on "Intrastat Report" page.
I have rewritten the code so that Validate and Content codeunits can be
used independently of each other. Whenever validation is performed, if
"Validate Codeunit ID" is not set in "VAT Reports Configuration",
standard validation code is executed. Whenever file creation is
performed, if "Content Codeunit ID" is not set in "VAT Reports
Configuration", standard export code is executed.

#### Work Item(s) 
fixes #27114 

Fixes
[AB#554367](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/554367)
2024-10-28 10:49:34 +01:00
Kilian Seizinger 1d2ab1894c
Service Declaration Bugfix for Temp Sales / Purchase Lines (#27464)
#### Summary
Use GetSalesHeader and GetPurchHeader.
See also: https://www.yammer.com/dynamicsnavdev/threads/3023362906750976

#### Work Item(s)
Fixes #25222 

Fixes
[AB#555560](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/555560)
2024-10-28 10:49:21 +01:00
Kilian Seizinger 030051cf36
Service Declaration - Service Line Use Correct Header (#27463)
#### Summary
Use correct Header

#### Work Item(s)
Fixes #27462 
Fixes
[AB#555792](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/555792)
2024-10-26 08:37:30 +00:00
Alexander Holstrup d39bc91c4d
Syncing with version 26.0.25774.0 (#27509) 2024-10-24 20:22:16 +02:00
Wenjie Fan 3fe37f98d9
Revert "Move BCPT Sample Tests. (#26799)" (#27495)
This reverts commit 56096eddc3.

<!-- Thank you for submitting a Pull Request. If you're new to
contributing to AlAppExtensions please read our pull request guideline
below
* https://github.com/microsoft/ALAppExtensions/blob/main/CONTRIBUTING.md
-->
#### Summary <!-- Provide a general summary of your changes -->
Revert the PR. Corresponding VISX cannot find the sample tests.

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#550796](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/550796)

Co-authored-by: wenjiefan <wenjiefan@microsoft.com>
2024-10-22 13:52:55 +02:00
jaymckinney-enavate 1a13eb291e
GP Updates - September 2024 (#27265)
This PR contains the following enhancements to the GP migrations.

- Hide the Run Data Upgrade Now action when the One Step Migration is
enabled.
- Remove the dependency on Sales and Inventory Forecast app.
- Obsolete the old GP pages around the staging table data.

Fixes #26487
Fixes
[AB#550763](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/550763)

---------

Co-authored-by: jaymckinney <jay.mckinney82@gmail.com>
2024-09-30 11:46:06 +02:00
Alexander Holstrup bebe953898
Fix localdevenv in 1st Party Apps (W1) project (#27338)
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to AlAppExtensions please read our pull request guideline
below
* https://github.com/microsoft/ALAppExtensions/blob/main/CONTRIBUTING.md
-->
#### Summary <!-- Provide a general summary of your changes -->
Fix localdevenv in 1st Party Apps (W1) project. Running the
NewBCContainer override will unpublish all the existing 1st party apps.
If we don't we'll run into issues like:
`Publishing failed due to 'Cannot install the extension API Reports -
Finance by Microsoft 26.0.0.0 because a newer version 26.0.24098.0 was
already installed.'.`

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#550722](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/550722)
2024-09-27 09:59:12 +00:00
Alexander Holstrup 064e86569d
Syncing with version 26.0.24649.0 (#27325)
Fixes
[AB#420000](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/420000)
2024-09-25 13:34:09 +02:00
Kilian Seizinger 4303904a00
Use procedure IsSaaSInfrastructure instead of IsSaaS (#27263)
#### Summary
Use procedure IsSaaSInfrastructure since for azure key vault secrets
it's only important if the environment is BC SaaS or anything else.
If the key vault feature should be checked during testing then this has
to be done in a BC SaaS Sandbox.


#### Work Item(s)
Fixes #27260



Fixes
[AB#549124](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/549124)
2024-09-25 09:46:32 +02:00
Alexander Holstrup 4fcec39d61
Syncing with version 26.0.24612.0 (Rulesets) (#27323)
Fixes
[AB#420000](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/420000)
2024-09-25 08:55:44 +02:00
Alexander Holstrup 3639fa46fe
Syncing with version 26.0.24098.0 (#27246)
Fixes
[AB#420000](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/420000)
2024-09-13 15:58:10 +02:00
bcbuild-github-agent 76d808a218 Update AL-Go System Files (#27225)
Fixes
[AB#420000](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/420000)

Co-authored-by: aholstrup1 <aholstrup1@users.noreply.github.com>
2024-09-09 13:27:55 +02:00
Jesper Schulz-Wedde 92ff507693 Syncing with version 25.0.21703.0 (#26811)
Fixes
[AB#420000](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/420000)

---------

Co-authored-by: Alexander Holstrup <117829001+aholstrup1@users.noreply.github.com>

[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 <tine.staric@companial.com>

[Shopify] Connector - Different shipping charges types (#26708)

This pull request does not have a related issue as it's part of delivery
for development agreed directly with @AndreiPanko

Quick summary:

The Shopify Shipping Method Mapping page/table was extended to include a
new Shipping Charges Type field, allowing users to select from GL, Item,
or Item Charge. Depending on this selection, the Shipping Charges No.
field opens the related table (item, GL, or item charges), and when an
order is created, the shipping charge line reflects the new type and
number. For Item Charges, a default allocation process is run for all
item lines. The settings in the Shopify Shipping Method Mapping now take
priority over those in the Shopify Shop - GL Account settings.
Additionally, if the Shipping Agent Code and Shipping Agent Service
fields are populated, they are automatically populated in the sales
order as well.

Fixes #26819

[AB#449477](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/449477)

---------

Co-authored-by: aidasberesinevicius <aidas.beresinevicius@1clickfactory.com>
Co-authored-by: Tine Staric <tine.staric@companial.com>

[Shopify] Add items as product variants (#26712)

This pull request does not have a related issue as it's part of delivery
for development agreed directly with @AndreiPanko

Added an action to Variants subpage to add BC Items as additional
Variants to an existing Shopify Product.
If the parent product only had a default variant before the addition, it
is deleted from both Shopify and BC.
The variants are added under the existing the Product Option (ex. Color,
Material, or Title, if product only had the default variant)

Items cannot be added if the shop has "UOM as Variant" enabled, or if
the parent product has more than one option defined.

Fixes #26819
Fixes
[AB#468218](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/468218)

---------

Co-authored-by: Tine Staric <tine.staric@companial.com>
Co-authored-by: Jesper Schulz-Wedde <JesperSchulz@users.noreply.github.com>
Co-authored-by: Onat Buyukakkus <55088871+onbuyuka@users.noreply.github.com>

Update Yavrio in ConnectivityAppDefinitions.Codeunit.al (#26886)

Added US to Yavrio Open Banking

Fixes
[AB#543398](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/543398)

Syncing with version 25.0.22639.0 (#26958)

Fixes
[AB#420000](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/420000)

---------

Co-authored-by: Jesper Schulz-Wedde <JesperSchulz@users.noreply.github.com>

Syncing with version 25.0.22684.0 (#26959)

Fixes
[AB#420000](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/420000)

[Fix] URL maximum length in E-Document Integration (#26730)

Added a new field "Request URL" to table 6127 "E-Document Integration
Log" with a maximum string length of 2048 to allow for longer URLs when
using the "E-Document Integration" interface. The new filed replaces the
existing field URL. I marked the existing field as obsolete and updated
three (all) references from the old URL field to the new "Request URL"
field.

needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes #26672

Fixes
[AB#540448](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/540448)

---------

Co-authored-by: Patrick Lüthi <patrick.luethi@ventoo.ch>

Update InstallSECore.codeunit.al (#26883)

Update CODEOWNERS with EDocument reviewers (#27067)

Fixes
[AB#420000](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/420000)

GP Updates - July 2024 (#26821)

This update enhances the GP migrations by:

- Migrating GP Kit Items as BC Assembly BOMs.
- Prevent migration error when Customer/Vendor phone numbers contain
alpha characters. The Customer/Vendors will be migrated, but the
phone/fax numbers with alpha characters will be ignored and added to the
Warning Log.
- History Gen. Journal Line - View Distributions feature.
- Updated labels in settings area to specify 'migration' instead of
'upgrade' to prevent customer confusion.

Fixes #26487
Fixes
[AB#543399](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/543399)

---------

Co-authored-by: jaymckinney <jay.mckinney82@gmail.com>

[Shopify][BC Idea]: Enhancing Shopify Connector for Accurate Price Synchronization with Business Central based on Customer (#26981)

Added Customer No to the
          table 30152 "Shpfy Catalog"
          page 30159 "Shpfy Catalogs"

Added logic to use customer specific pricing from catalog
           codeunit 30182 "Shpfy Product Price Calc."

Fixes #26980
Fixes
[AB#544010](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/544010)

[Shopify] Add Translations Export to Products and Variants (#26216)

This pull request does not have a related issue as it's part of delivery
for development agreed directly with @AndreiPanko

here‘s a quick summary:

Shopify Shop has a new action that takes the user to the Languages page.
Languages cannot be manually inserted or deleted, they can only be
refreshed with an action that pulls them from Shopify.
Before a language can be enabled for syncing, a language code needs to
be mapped to it, as Shopify is using locales, and I can‘t directly map
them.

A new Scope is required to get shop locales – read_locales

On export of products and variants, an update of translations is
triggered. The translation update first collects all
TranslatableContentDigests for a resource, as these are needed when
requesting an update of a translation.
The update next collects translations for the product Title, Product
Body, and Variant „option 1“ in a temporary table for each enabled
language. It compares the translations with the translations that were
last synced. If the translation is the same, it removes it from the
buffer. Next, the buffer is used to build the query and sent to Shopify
to update translations.

Continuing with a couple of questions/considerations regarding the issue

• The way I designed Shopify Languages is that the user can‘t
insert/delete them, but has to pull them from Shopify with an action.
This uses ShopLocales query which needs a read_locales scope that‘s not
currently part of the scopes. I wasn‘t sure if that‘s an issue or not.
• I made the import of locales skip the primary language as I wanted to
keep the logic for that one on the Shop.“Langauge Code“ field.
• I‘ve refactored the CreateProductBody procedure in the Product Export
codeunit so it takes the language code as a parameter. This means I can
reuse it for translations, however, there are events in this procedure
at the start/end, which will now trigger more often if more languages
are synced. I added the language code as a parameter in the publishers,
and technically nothing is broken until additional languages are synced,
but I wanted to mention this.
• I wasn‘t sure how I should approach translations when they‘re missing.
Should I take the existing approach, take the translated text or default
text, or should I only take the translated text, and if it doesn‘t
exist, skip that property?
This is mainly an issue with the product body. If Ext. Text is
translated, but Attributes are not, should I skip on attributes or send
attributes in the default language?
Currently, I skip the Title if it‘s not translated, but I send the body
in every case. Let me know if that should be changed.
• For the update of a translation, I need to send the
TranslatableContentDigest as part of the request. Currently, I‘ve done
this in a way, that I collect all digests for a resource during an
update, but that means that every update of a product/variant now has an
additional „get“ call, before it maybe sends an update for translations.
I think this could be done better, and would appreciate your input here.
• Resource Type is almost the same enum as used in Metafields, I think
these two should be made the same.
• I‘m not a fan of what I did with Translations Mgt. Is there a better
place where I could put this procedure for retrieving the item
translation?

Fixes #26819
Fixes
[AB#460580](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/460580)

---------

Co-authored-by: Tine Staric <tine.staric@companial.com>
Co-authored-by: Jesper Schulz-Wedde <JesperSchulz@users.noreply.github.com>

[Shopify] Add Metafields to Products and Variants (#26185)

This is a PR without a dedicated issue as it's part of delivery for
development agreed directly with @AndreiPanko

Here's the overview of the changes:

Obsolete fields:
• Obsoleted Value Type as it‘s no longer used in Shopify API -> Replaced
with Type field
• Obsoleted Owner Resource field. I‘m not sure why this was a free text
that was then always populated through a case statement. It‘s replaced
with an Owner Type field that is an Enum.

New enums and interfaces:
• „Shpfy Metafield Type“ and „Shpfy IMetafield Type“ – Used for handling
the metafield type. The interface defines if the type has a special
AssistEdit, logic to execute the assist edit, and validations when free
input is allowed for a value. I have a couple of questions here, see
below. Rating, Rich Text, and List Types are not included, Rating and
Rich Text options are added but commented out so it‘s clear that it was
intentional. It also has String and Integer types which are there to
support backward compatibility, if old values are still in Shopify.
• „Shpfy Metafield Owner Type“ and „Shpfy IMetafield Owner Type“ – Used
for building the full owner resource ID
(gid://shopify/<ownerType>/<ownerId>) and for retrieving metafield IDs
of a single resource (used during export, to identify which metafields
should be sent for update based on UpdatedAt)
• Metafield Dimenion/Volume/Weight Type – three enums to support a
selection of Units when assist editing these metafield types

Pages:
• „Shpfy Metafields“ – used for viewing and editing metafields for a
resource. It‘s only editable if Shop is syncing Products to Shopify and
Can update Shopify products. On Insert of a new record, it‘s immediately
sent to Shopify and is only inserted in the DB when we get back the
Shopify ID for the metafield. Types that have AssistEdit functionality
defined cannot be edited directly on the line. OnValidate of Value a
check is executed to ensure value is correct for a type.
• „Shpfy Metafield Assist Edit“ – used for assist edit of complex
metafield types. It has several groups defined, and only the appropriate
one is displayed to the user.
• Action for display metafields for a resource has been added to the
Products and Variants pages.

GraphQL query changes:
• ProductById and VariantById have been modified so that they retrieve
the first 50 metafields (previously the first 10). Previously there was
a filter to only retrieve Metafields with the
„Microsoft.Dynamics365.BusinessCentral“ namespace. I‘ve removed that to
get all the metafields of a resource.
• ProductMetafieldIds and VariantMetafieldIds were added. These are used
during the export of metafields to determine which BC metafields should
be sent for an update
• MetafieldsSet – This is used to create/update metafields for a
resource

Changes to API codeunits:
• Product API – on UpdateShopifyProductFields a metafields part of JSON
is now passed to Metafields API where it creates or updates Metafields
in BC based on information retrieved from Shopify
• Variant API – on UpdateShopifyVariantFields the metafields part of the
JSON is passed to Metafields API, same as above.
• „Shpfy Product Export“ – on UpdateProductData execute Metafields API
to update/create metafields for the product and all variants that belong
to the product
• „Metafield API“ – Implements logic to parse the „metafields“JSON that
is retrieved with products/variants during import and creates/updates
metafield records in BC.
Adds logic to export metafields for a specific resource. Only sends an
update for metafields that have a lower UpdatedAt timestamp than BC
record‘s last updated at timestamp. It batches the Metafields to 25 at a
time, as that‘s the max MetafieldsSet mutation can handle as per the
documentation.

Added logic to delete metafields on delete of a product/variant

A couple of questions or concerns:
• New metafields that get created in Shopify do not have a Metafield
Definition attached to them. Should we care about this right now? If
yes, should we also store metafield definitions in BC, or just create
new definitions if any are missing in Shopify?
• I‘ve obsoleted the two fields and one enum, should I be wrapping the
obsoletions in some preprocessing symbols? Which one?
• I‘m doing some regex validations when checking if the value of
metafield is correct. I‘m not sure if the one for mixed reference and
file reference is correct. I‘d appreciate it if someone could take a
look at that.
• If value validation fails, it throws a pretty „simple“ error message
right now, should I make this more expressive?
• Currently, the „update metafields“ has no error handling in place if
the update query fails. Technically I‘m trying to catch everything on
data input, but there can always be unexpected situations. How should I
handle this?
• The code for sending the metafield to Shopify immediately after it‘s
inserted through UI is currently on the Page‘s OnInsertRecord trigger.
I‘m not sure about it, should I move it to the table trigger? The
hesitation is because there already is some logic on the table from the
partial implementation of metafields on Customers.
• I‘ve placed interface implementations in a separate folder under
Codeunits folder, that‘s not the usual practice on MS apps, so I wanted
to double-check it.
• Money metafield type needs to have the same currency as the shop,
which leads to this completely separate code path after validating the
Value. I‘m not sure if there‘s a better approach to handle this.
• I saw that most procedures in the app have documentation triggers that
are not really beneficial. I‘ve only added them to the public or
internal procedures. I‘ve also skipped on most object documentation
triggers.

Fixes #26819
Fixes
[AB#443908](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/443908)

---------

Co-authored-by: Tine Staric <tine.staric@companial.com>
Co-authored-by: Jesper Schulz-Wedde <JesperSchulz@users.noreply.github.com>
Co-authored-by: Onat Buyukakkus <55088871+onbuyuka@users.noreply.github.com>

Syncing with version 25.0.23141.0 (#27112)

Fixes
[AB#420000](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/420000)

[Shopify] Connector - Export Posted Sales Invoices to Shopify as Orders (#26748)

This pull request does not have a related issue as it's part of the
delivery for development agreed directly
with [@AndreiPanko](https://github.com/AndreiPanko)

Here's a quick summary:

Orders.

Shopify Shop has a **new action "Payment Terms Mapping"** that takes the
user to the **new page "Shopify Payment Terms Mapping"**. Shopify
Payment Terms cannot be manually inserted or deleted, they can only be
refreshed with an action that pulls them from Shopify. By default
**FIXED** Payment Term is selected as primary during the synchronization
of the Payment Terms.
Before Posted Sales Invoices can be synced, a payment term code from
Shopify needs to be mapped to the Business Central one or a primary
Shopify Payment Term needs to be selected with a Boolean "Is Primary" -
this payment term will be used if the Posted Sales Invoice payment terms
code doesn't have a mapping to Shopify. This payment term code will also
be filled during the sync of Shopify orders.

A new Scope is required. To update payment terms on a draft order –
write_payment_terms (read_payment_terms scope was removed because it
causes strange behavior - every time a Shopify shop card is opened it
states that the scope has changed and requires authorization.
write_payment_terms overwrites read_payment_terms). To create a draft
order - write_draft_orders.

need to meet:

- The **new Boolean field "Posted Invoice Sync"** needs to be enabled.
- The "Shopify Order Id" field on the Posted Sales Invoice needs to be
0.
- Posted Sales Invoice "Bill-To Customer" has been mapped to the Shopify
Customer or Shopify Companies table.
- Posted Sales Invoice "Bill-To Customer" is not a customer used as a
Default Customer in the Shopify Shop Card or Shopify Customer Template.
- There are no lines of type non-comment (or type is populated but No.
is empty).
- There are no fraction quantities.
- There must be a mapped Payment Terms Code or a selected Primary
Payment Terms Code on the new "Shopify Payment Terms Mapping" page.
- If there is at least one line of type "Item" where the selected
item/variant doesn’t have a link to Shopify Product/Shopify variant and
the **new Boolean field "Items must be mapped to Products"** on the
Shopify Shop card is selected - the Posted Sales Invoice will not be
exported.
- Posted Sales Invoice currency code matches Shopify shop currency code
(explanation at the bottom).

If one of the previous conditions is not met, the Posted Sales Invoice
"Shopify Order Id" field will be marked with -2. If the GraphQL request
fails, then the field will be marked with -1. If everything goes
correctly, the field will be filled with the created Shopify Order ID.
Users can modify the "Shopify Order Id" field in the posted document
(allowed changes from -1 or -2 to 0. The functionality works the same as
in the Update Posted Shipment document.)

This export can be executed with a new action that is added to Shopify
Shop - "Sync Posted Sales Invoices" or just by running the report "Sync
Invoices to Shopify". The draft order in Shopify is created with the
values from the Posted Sales Invoice order and lines. If the Remaining
Amount of the Posted Sales Invoice is 0, then the order is marked as
paid, otherwise, the status will be "Payment pending" and a mapped
Payment Terms code will be sent out. After that, the created draft order
will be completed and the Shopify order created. All orders are
automatically fulfilled. To achieve “paid” status on the Shopify order –
use the Manual payment function in the Shopify Order card. Once the
report is executed, the Inventory will be synced.

Order sync will import created orders, then check if the order is
present in the **new Shopify Invoice Header table** (this table is
filled with the Shopify order ID of the exported Posted Sales Invoice)
and if so:
- Shopify Order is marked as processed.
- A link is added to the Posted Sales Invoice (related documents).

functionality:
- All non-comment type lines are exported as custom products (including
Items if the new Boolean field "Items must be mapped to Products"** on
the Shopify Shop card is not selected).
- Taxes from the lines are sent out as a custom product with the title
consisting of "VAT Calculation Type" + VAT %.
- Invoice discounts from the lines and the header are added up and sent
out as a discount to the whole order with the title "Invoice Discount
Amount"
- Posted Sales Invoice comments are exported as notes.
- Once the draft order is completed, an order confirmation email will be
sent out to the customer. This functionality is from Shopify itself.
- If the product/variant exists in Shopify, the price, title and other
information will be taken from Shopify and not the one in the Posted
Sales Invoice line. This is how the draftOrderCreate mutation works.

- Open orders and open invoices.
- Fulfillment/Tracking Details.
- Refund / partial refund status.
- Weight export.

**Known issues with different currencies (that's why Posted Sales
Invoices with different currencies than Shopify Shop cannot be exported
at the moment):**
- Currently sending out different currencies than the Shopify Shop
currency cannot be done because if the currency of the custom product
differs from the Shopify shop's currency, the amount sent will still be
accepted in the local Shopify shop's currency before being converted to
the order's currency and the amount will be incorrect. For example, if
the VAT amount is 100 GBP, but the Shopify shop's currency is EUR, the
custom product will be exported with an amount of 100 GBP. However, this
amount will be treated as 100 EUR and then converted to GBP according to
the currency exchange rate in Shopify.

Fixes #26819
Fixes
[AB#446399](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/446399)

---------

Co-authored-by: Jesper Schulz-Wedde <JesperSchulz@users.noreply.github.com>
Co-authored-by: Tine Staric <tine.staric@companial.com>

GP - Update migrations with 1099 data to use the new IRS Forms app. (#27100)

The update enhances the GP migration to use the new IRS Forms app, which
replaces the base app implementation of 1099 handling.

Fixes #26487

Fixes
[AB#545622](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/545622)

---------

Co-authored-by: jaymckinney <jay.mckinney82@gmail.com>

Removing the Order taker app (#27221)

Fixes
[AB#539591](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/539591)
2024-09-09 13:27:41 +02:00