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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 28.11.2013, 00:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
AX Developer tips: Changing remaining quantity on sales line (intercompany)
Источник: http://axdevposts.blogspot.com/2013/...-on-sales.html
==============

While investigating intercompany processes in AX2012 I've found an interesting thing.

Let's assume the scenario from my previous post: an intercompany direct delivery.
Out supply chain looks like this:
SO 101 -> PO 2012 -> SO 102, where 101 and 102 are company names, SO stands for "Sales order" and PO for "Purchase order".


If you're trying to manipulate delivery remainder from the code (not changing the ordered quantity), you would do the following:

SalesLine salesLine102;
SalesQty qtyDifference;
InvetnQty qtyDifferenceInvent;
//select sales line
//...
qtyDifferenceInvent =
salesLine102.unitConvertSales2Invent(qtyDifference);
salesLine102.RemainSalesPhysical -= qtyDifference;
salesLine102.RemainInventPhysical-= qtyDifferenceInvent;

salesLine102.update();



The logic behind an update method should update the whole chain of order lines (PO102 and than SO101). However it won't happen!

The right code is placed into the form "Update delivery remainder", which can be called from the order line:



\Forms\SalesUpdateRemain\Methods\closeOk

The right code should be placed before calling update on sales order line buffer:



InterCompanyUpdateRemPhys::synchronize(saleLine102,
qtyDifferenceInvent,
qtyDifference);



Hope it helps you in customizing AX!


Источник: http://axdevposts.blogspot.com/2013/...-on-sales.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
AX Developer tips: Summary update "Invoice account" doesn't work for intercompany sales orders Blog bot DAX Blogs 0 18.10.2013 05:17
atinkerersnotebook: Walkthrough & Tutorial Summary Blog bot DAX Blogs 1 09.09.2013 09:11
amer-ax: It was a great day! Blog bot DAX Blogs 3 29.12.2012 01:02
emeadaxsupport: New Content for Microsoft Dynamics AX 2012 : October 2011 Blog bot DAX Blogs 0 27.10.2011 17:11
Shekhar: Dynamics AX,AX2009 – Credit remaining quantity Blog bot DAX Blogs 0 30.03.2010 15:05

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 05:46.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.