Commit b63ddc8
authored
[Bug][SubscriptionBilling]: Outdated ship-to address used on invoice when contract sell-to address is updated (#7538)
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to BCApps please read our pull request guideline below
* https://github.com/microsoft/BCApps/Contributing.md
-->
#### Summary <!-- Provide a general summary of your changes -->
When the sell-to address was changed on a Customer Subscription Contract
with Ship-to Code blank (default), the ship-to address fields were not
updated, causing invoices to use the outdated ship-to address.
- Add UpdateShipToAddressFromSellToAddress to sync ship-to fields from
sell-to on Customer Subscription Contract (aligned with Sales Header)
- Add ShipToAddressEqualsSellToAddress and
IsShipToAddressEqualToSellToAddress helper with integration event
- Refactor UpdatePayToAddressFromBuyFromAddress on Vendor Subscription
Contract with shared IsPayToAddressEqualToBuyFromAddress helper (aligned
with Purchase Header)
- Promote notification ID getters to internal for testability
- Add tests for both customer and vendor contract address sync
#### 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 #6974
Fixes
[AB#631934](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/631934)1 parent 6ba0f88 commit b63ddc8
4 files changed
Lines changed: 179 additions & 38 deletions
File tree
- src/Apps/W1/Subscription Billing
- App
- Customer Contracts/Tables
- Vendor Contracts/Tables
- Test
- Customer Contracts
- Vendor Contracts
Lines changed: 38 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
| 433 | + | |
433 | 434 | | |
434 | 435 | | |
435 | 436 | | |
| |||
440 | 441 | | |
441 | 442 | | |
442 | 443 | | |
| 444 | + | |
443 | 445 | | |
444 | 446 | | |
445 | 447 | | |
| |||
468 | 470 | | |
469 | 471 | | |
470 | 472 | | |
| 473 | + | |
471 | 474 | | |
472 | 475 | | |
473 | 476 | | |
| |||
492 | 495 | | |
493 | 496 | | |
494 | 497 | | |
| 498 | + | |
495 | 499 | | |
496 | 500 | | |
497 | 501 | | |
| |||
576 | 580 | | |
577 | 581 | | |
578 | 582 | | |
| 583 | + | |
579 | 584 | | |
580 | 585 | | |
581 | 586 | | |
| |||
587 | 592 | | |
588 | 593 | | |
589 | 594 | | |
| 595 | + | |
590 | 596 | | |
591 | 597 | | |
592 | 598 | | |
| |||
598 | 604 | | |
599 | 605 | | |
600 | 606 | | |
| 607 | + | |
601 | 608 | | |
602 | 609 | | |
603 | 610 | | |
| |||
1700 | 1707 | | |
1701 | 1708 | | |
1702 | 1709 | | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
1703 | 1739 | | |
1704 | 1740 | | |
1705 | 1741 | | |
| |||
1895 | 1931 | | |
1896 | 1932 | | |
1897 | 1933 | | |
1898 | | - | |
| 1934 | + | |
1899 | 1935 | | |
1900 | 1936 | | |
1901 | 1937 | | |
| |||
2010 | 2046 | | |
2011 | 2047 | | |
2012 | 2048 | | |
2013 | | - | |
| 2049 | + | |
2014 | 2050 | | |
2015 | 2051 | | |
2016 | 2052 | | |
| |||
Lines changed: 36 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1426 | 1426 | | |
1427 | 1427 | | |
1428 | 1428 | | |
1429 | | - | |
| 1429 | + | |
1430 | 1430 | | |
1431 | 1431 | | |
1432 | 1432 | | |
1433 | 1433 | | |
1434 | | - | |
| 1434 | + | |
1435 | 1435 | | |
1436 | 1436 | | |
1437 | 1437 | | |
| |||
1456 | 1456 | | |
1457 | 1457 | | |
1458 | 1458 | | |
1459 | | - | |
1460 | | - | |
| 1459 | + | |
1461 | 1460 | | |
1462 | | - | |
1463 | | - | |
| 1461 | + | |
1464 | 1462 | | |
1465 | 1463 | | |
1466 | | - | |
1467 | | - | |
1468 | | - | |
1469 | | - | |
1470 | | - | |
1471 | | - | |
1472 | | - | |
1473 | | - | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
1474 | 1468 | | |
1475 | 1469 | | |
1476 | | - | |
1477 | | - | |
| 1470 | + | |
1478 | 1471 | | |
1479 | | - | |
1480 | | - | |
| 1472 | + | |
1481 | 1473 | | |
1482 | 1474 | | |
1483 | 1475 | | |
1484 | 1476 | | |
1485 | 1477 | | |
1486 | | - | |
1487 | | - | |
1488 | | - | |
1489 | | - | |
1490 | | - | |
1491 | | - | |
1492 | | - | |
1493 | | - | |
| 1478 | + | |
1494 | 1479 | | |
1495 | 1480 | | |
1496 | 1481 | | |
1497 | 1482 | | |
1498 | | - | |
1499 | | - | |
1500 | | - | |
1501 | | - | |
1502 | | - | |
1503 | | - | |
1504 | | - | |
1505 | | - | |
1506 | | - | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
1507 | 1502 | | |
1508 | 1503 | | |
1509 | 1504 | | |
| |||
1581 | 1576 | | |
1582 | 1577 | | |
1583 | 1578 | | |
1584 | | - | |
| 1579 | + | |
1585 | 1580 | | |
1586 | 1581 | | |
1587 | 1582 | | |
| |||
1807 | 1802 | | |
1808 | 1803 | | |
1809 | 1804 | | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
1810 | 1810 | | |
Lines changed: 57 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2087 | 2087 | | |
2088 | 2088 | | |
2089 | 2089 | | |
| 2090 | + | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
2090 | 2147 | | |
2091 | 2148 | | |
2092 | 2149 | | |
| |||
Lines changed: 48 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
755 | 755 | | |
756 | 756 | | |
757 | 757 | | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
758 | 806 | | |
759 | 807 | | |
760 | 808 | | |
| |||
0 commit comments