AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 28.10.2015, 01:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,617 / 848 (80) +++++++
Регистрация: 28.10.2006
patrickmouwen: Financial dimensions on web orders vs non-Retail orders
Источник: http://patrickmouwen.com/functional/...retail-orders/
==============


Say we have non-Retail B2B sales and B2C weborders in 1 company. We sell the same items through these channels. We expect the financial dimension values for the same financial dimensions to appear on our order lines but… they differ between these scenarios… HUH?And at invoicing we get stuck (posting is cancelled) as in the B2C scenario we miss a mandatory financial dimension value CostCenter… ARGGGGG!


Cause

For the cause of this issue we have to dig into the way the financial dimensions are inherited in each scenario. Here’s what happens in both scenarios:

In both scenarios the sales order header inherits its financial dimension values from a main entity: in the Retail web order scenario that’s the Retail channel, whereas the customer is the main entity in the non-Retail sales scenario (criterion for ‘being’ a non-Retail sales order: RetailSalesTable.RetailOrder == NoYes::No). This difference makes sense as in the Retail scenario you might want to keep track of the sales channel your actual sale originated from.

But there’s one major difference between the scenarios when it comes to sales order header to sales order line inheritance: in the non-Retail case, the financial dimension values on the sales order header and item level are both (AND) inherited to the sales order line. In the Retail web order case it’s a case of OR: if the item contains default dimension values, then these are copied to the sales order level, otherwise the sales order line inherits the sales order header dimension values.

Solution

For non-Retail sales, the inheritance happens as follows:
  1. \Classes\SalesLineType\InitFromSalesTable (inherit from SO header to SO line):
  2. \Classes\SalesLineType\InitFromInventTable (inherit from item to SO line):
    So, the actual magic is in the salesLine.mergeDimension method. Here’s where the AND card is played.
In my customer’s scenario it was important to align the two cases so the Account structures setup in General ledger could be consistent in terms of mandatory financial dimensions. Therefore I decided to apply the merge to the Retail web order area as well – It also makes the situation more consistent in general. For the Retail web orders the financial dimension values are set as part of the Retail > Periodic > Synchronize online orders batch job. The applied business logic resides in the RetailOrderManager::createEachOrderLine method. So in order to align the cases I only needed to call the Merge functionality in this context as well. A change of only 2 lines of code:


One last addition to this: if you look at how financial dimensions are set on customer orders (created from Retail POS through Real Time Service) and sales orders which are created through Retail POS statement posting, then we see another variant (RetailOrderManager::mergeOrderDefaultDimension):
In this context, financial dimensions are set on sales order header level as a hierarchical merge of even 4 dimensions: customer, Retail store, Retail terminal and worker. You’d better be aware of all these variants when setting up AX financially ;-).

Happy DAX’ing!

Patrick


Het bericht Financial dimensions on web orders vs non-Retail orders verscheen eerst op Patrick Mouwen.



Источник: http://patrickmouwen.com/functional/...retail-orders/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
patrickmouwen: Dynamics AX Retail 3rd party POS and E-commerce integration – Solution Design Blog bot DAX Blogs 0 26.10.2015 12:11
patrickmouwen: Dynamics AX Retail 3rd party POS and E-commerce integration – Trigger mechanism Blog bot DAX Blogs 0 26.10.2015 12:11
patrickmouwen: Dynamics AX Retail 3rd party POS and E-commerce integration – Control dashboard Blog bot DAX Blogs 0 26.10.2015 12:11
Khue Trinh: Setting up a link between a financial dimension and the site inventory dimension Blog bot DAX Blogs 0 27.09.2010 13:05
Inside Dynamics AX 4.0: The Web Framework Blog bot DAX Blogs 0 25.10.2007 03:04
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 23:58.