static void Woof_PatchInventFinancialVoucher(Args _args)
{
InventTransPosting _InventTransPosting;
InventTrans _InventTrans;
InventTrans _InventTrans2;
int matchphys;
int matchother;
container c;
int i;
;
if (curext() != "ccw")
return;
ttsbegin;
while select forupdate _InventTrans
order by Voucher
where _InventTrans.DateFinancial != datenull()
&& _InventTrans.Voucher == ""
join _InventTransPosting
where _InventTransPosting.InventTransPostingType == InventTransPostingType::Financial
&& _InventTrans.ItemId == _InventTransPosting.ItemId
&& _InventTrans.InventTransId == _InventTransPosting.InventTransId
&& _InventTrans.Voucher != _InventTransPosting.Voucher
&& _InventTrans.DateFinancial == _InventTransPosting.TransDate
&& _InventTrans.VoucherPhysical== _InventTransPosting.Voucher
{
_InventTrans.Voucher = _InventTrans.VoucherPhysical;
_InventTrans.update();
}
ttscommit;
ttsbegin;
while select forupdate _InventTrans
order by InventTransId
where _InventTrans.DateFinancial != datenull()
&& _InventTrans.Voucher == ""
{
matchphys = 0;
matchother = 0;
c = connull();
while select _InventTransPosting
order by Voucher
where _InventTransPosting.InventTransPostingType == InventTransPostingType::Financial
&& _InventTrans.ItemId == _InventTransPosting.ItemId
&& _InventTrans.InventTransId == _InventTransPosting.InventTransId
&& _InventTrans.Voucher != _InventTransPosting.Voucher
&& _InventTrans.DateFinancial == _InventTransPosting.TransDate
{
if (_InventTrans.VoucherPhysical == _InventTransPosting.Voucher)
{
matchphys++;
}
else
{
select firstonly _InventTrans2
where _InventTrans2.Voucher == _InventTrans2.VoucherPhysical
&& _InventTrans2.ItemId == _InventTransPosting.ItemId
&& _InventTrans2.InventTransId == _InventTransPosting.InventTransId
&& _InventTrans2.Voucher == _InventTransPosting.Voucher
&& _InventTrans2.DateFinancial == _InventTransPosting.TransDate;
if (_InventTrans2)
{
if (strcmp(_InventTransPosting.Voucher, _InventTrans.VoucherPhysical) >= 0)
{
matchother++;
c = conins(c, matchother, _InventTransPosting.Voucher);
}
}
}
}
if (matchphys)
{
_InventTrans.Voucher = _InventTrans.VoucherPhysical;
_InventTrans.update();
}
else if (matchother == 1)
{
info("!" + ":" + _InventTrans.InventTransId + ":" + _InventTrans.ItemId + ":" + _InventTrans.VoucherPhysical + ":" + conpeek(c, 1));
_InventTrans.Voucher = conpeek(c, 1);
_InventTrans.update();
}
else if (matchother > 1)
{
for (i = 1; i <= matchother; i++)
{
info(int2str(i) + ":" + _InventTrans.InventTransId + ":" + _InventTrans.ItemId + ":" + _InventTrans.VoucherPhysical + ":" + conpeek(c, i));
}
_InventTrans.Voucher = conpeek(c, 1);
_InventTrans.update();
}
else
{
info(_InventTrans.InventTransId + ":" + _InventTrans.ItemId + ":" + _InventTrans.VoucherPhysical + ":" + _InventTrans.Voucher + ":" + _InventTransPosting.Voucher);
}
}
ttscommit;
}
Koh Meng Chiat <[EMAIL PROTECTED]> wrote:
Hi Steve,
Can you import this job and run. In my case the problem is solved after the job is run. Please let me know if u're having the problem again.
Note: Pls change the company acccount from ccw to your company account's name in the job. :)
Best Regards,
Jack Koh
stv_bradford <[EMAIL PROTECTED]> wrote:
Thanks Jack
I'll very grateful for this help.
Steve.
--- In Axapta-Knowledge-Village@yahoogroups.com, Koh Meng Chiat
<[EMAIL PROTECTED]> wrote:
>
> Hi Steve,
>
> I've the same problem also for the Physical Inventory by
Inventory Dimension Report (which i use to reconcile to GL stock).
>
> What i heard from my programmer is that the financial voucher
for the return transactions does not update correctly into
inventtrans table and corresponding with the inventtransposting
table. He is now in the progress of coming out the bug fix. I'll
send to u once i got the fix.
>
> Hope Microsoft can take the necessary action to resolve the
issue.
>
> From:
>
> Jack Koh
>
>
> stv_bradford <[EMAIL PROTECTED]> wrote:
> In AX Release 3, SP 3, with Inventory hotfixes applied we use
the
> standard report Physical Inventory by Item Group to reconcile the
> Inventory valuation to the GL. This is done by adding the two
> columns "Inventory Value" and "Posted Physical Value", and
comparing
> this with the balance in the Inventory Control accounts in the GL.
>
> There seems to be bugs in this report however which make the
report
> give wrong information when a Purchase Order or Ssles Order
delivery
> is made, and then reversed on the same line. The report will
always
> pick up the reversal entry even though it has been made at a date
> later than that at which the report is run.
>
> I have two questions:
>
> 1 Has anyone else come accross this issue, and
> 2 Is there another way of generating a report that will validate
> the balance in the GL?
>
> I know about the GL reconciliation reports, but thay are a tool to
> identify differences, not a valaidation report.
>
> Many thanks
>
> Steve Bradford
>
>
>
>
>
>
>
>
>
> Sharing the knowledge on Axapta.
> Visit www.frappr.com/axapta for axapta friends.
>
>
>
> ---------------------------------
> YAHOO! GROUPS LINKS
>
>
> Visit your group "Axapta-Knowledge-Village" on the web.
>
> To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
>
> ---------------------------------
>
>
>
>
>
> ---------------------------------
> New Yahoo! Messenger with Voice. Call regular phones from your PC
and save big.
>
> [Non-text portions of this message have been removed]
>
Sharing the knowledge on Axapta.
Visit www.frappr.com/axapta for axapta friends.
---------------------------------
YAHOO! GROUPS LINKS
Visit your group "Axapta-Knowledge-Village" on the web.
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
---------------------------------
How low will we go? Check out Yahoo! MessengerÂ’s low PC-to-Phone call rates.
[Non-text portions of this message have been removed]
Sharing the knowledge on Axapta.
Visit www.frappr.com/axapta for axapta friends.
SPONSORED LINKS
Business finance course Business to business finance Small business finance Business finance consultant Business finance magazine Business finance schools
---------------------------------
YAHOO! GROUPS LINKS
Visit your group "Axapta-Knowledge-Village" on the web.
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
---------------------------------
Ring'em or ping'em. Make PC-to-phone calls as low as 1¢/min with Yahoo! Messenger with Voice.
[Non-text portions of this message have been removed]
Sharing the knowledge on Axapta.
Visit www.frappr.com/axapta for axapta friends.
SPONSORED LINKS
Business finance course | Business to business finance | Small business finance |
Business finance consultant | Business finance magazine | Business finance schools |
YAHOO! GROUPS LINKS
- Visit your group "Axapta-Knowledge-Village" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.