Thursday, January 21, 2016

Cusotmer Invoice Agianst Packingslip in ax 2012

    CustInvoiceTrans                    custInvoiceTrans;
    CustInvoicePackingSlipQuantityMatch custInvoicePackingSlipQuantityMatch;
    CustPackingSlipTrans                custPackingSlipTrans;
    Notes                               packingslipId;
    ;
    while  select PackingSlipId from custPackingSlipTrans Group by PackingSlipId
            exists join custInvoicePackingSlipQuantityMatch
                where custInvoicePackingSlipQuantityMatch.PackingSlipSourceDocumentLine == custPackingSlipTrans.SourceDocumentLine
            exists join custInvoiceTrans
                where custInvoiceTrans.SourceDocumentLine == custInvoicePackingSlipQuantityMatch.InvoiceSourceDocumentLIne &&
                    custInvoiceTrans.SalesId == this.SalesId &&
                    custInvoiceTrans.InvoiceId == this.InvoiceId &&
                    custInvoiceTrans.InvoiceDate == this.InvoiceDate &&
                    custInvoiceTrans.NumberSequenceGroup == this.numberSequenceGroup
    {
        packingslipId += strFmt("%1,",custPackingSlipTrans.PackingSlipId);
    }
    return packingslipId;

No comments:

Post a Comment

Copy Markup charges while posting purchase invoice using X++

 Copy Markup charges while posting purchase invoice using X++ Class: Important: Code logic is just for Reference.  New class => Duplicate...