Hi,

you have not select it.TransRefId iin your select it statement, only
sum(Qty).

Mit freundlichen Gr�ssen / kind regards,
Jim Dickie, 
Circon Circle Consulting GmbH,
F�rbergasse 13, A-6850 DORNBIRN
e-mail: [EMAIL PROTECTED]
phone: +43 (0)664 2337785

-----Urspr�ngliche Nachricht-----
Von: [email protected]
[mailto:[EMAIL PROTECTED] Im Auftrag von Cenk Ince
Gesendet: Dienstag, 03. Mai 2005 08:30
An: [email protected]
Betreff: [development-axapta] select from inventtrans doesn't work

Hi all;

I prepare a report that gives transfers to a inventlocation between
date1 and date2.
When i add a join at the and of the select (below in red) it doesn't
return any value.
With out red line it gives me sum of all transfers in inventtrans.
But i want to devide them according to their "journalnameid" field on
inventjournaltable.

Any idea?


real fason_Giris(Inventlocationid ambar, transdate d1,transdate d2)
{
    inventDim                           id;
    inventtrans                         it;
    inventTransposting                  itp;
    inventjournaltable                  ijt;
    ;
    id.InventLocationId                 = ambar;
    select sum(qty) from it index hint TransIdIdx group by itemid  where
it.ItemId == this.ItemId &&
                               it.TransType ==
inventtranstype::InventTransfer &&
                               (it.StatusReceipt ==
StatusReceipt::Received || it.StatusReceipt == StatusReceipt::Purchased)
&&
                               it.Direction == inventDirection::Receipt
// stok giri�i
                               join id where
                               it.inventDimId == id.inventDimId
                               && id.InventLocationId == ambar

                               join itp index hint ItemTypeDateIdx where
                               itp.ItemId == it.ItemId &&
                               itp.InventTransId          ==
it.InventTransId &&
                               itp.InventTransPostingType ==
InventTransPostingType::Physical &&
                               itp.Voucher              ==
it.VoucherPhysical &&
                               itp.TransDate >= d1 &&
                               itp.TransDate <= d2
                               join ijt where ijt.JournalId ==
it.TransRefId;
    return it.Qty;
}



[Non-text portions of this message have been removed]







Yahoo! Groups Links













Yahoo! Groups Links

Reply via email to