web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

to get the sum of the reciept quantity and amount

(2) ShareShare
ReportReport
Posted on by 1,836
 i was trying ti get the sum of reciept quantity and amount from purchse order reciepts but getting wrong data , like if there is return  it is also get added in  sum , 
i am nt aware hot to use purch totals for this ,can you people help me out on this .
 //while select
                     //          sum(vendPackingSlipTrans.ValueMST),
                     //          sum(vendPackingSlipTrans.REMAIN),
                     //          sum(vendPackingSlipTrans.Qty) from  vendPackingSlipTrans
                     //       join vendPackingSlipJour
                     //             where vendPackingSlipJour.RecId == vendPackingSlipTrans.VendPackingSlipJour 
                     //              && vendPackingSlipJour.PurchId == purchTable.PurchId
                     //{

                     //       receivedQty += vendPackingSlipTrans.Qty;
                     //       receivedAmount += vendPackingSlipTrans.ValueMST;
                     //       pendingQty += vendPackingSlipTrans.REMAIN;
                     //}

                     //   tempRec.QtyReceived    = qtyReceived;
                     //   tempRec.ReceivedAmount = receivedAmount;
                     //   tempRec.QtyPending     = qtyPending;
                     //   tempRec.PendingAmount  = qtyPending * tempRec.PurchPrice;
 
I have the same question (0)
  • Vigneshvaran Profile Picture
    354 on at
    Please try to refer the below blog, where I have calculated the Purchase requisition totals, same way you can try to find against purchase order.
  • Dineshkarlekar Profile Picture
    1,836 on at
    thanks for reply @Vigneshvaran
     
    but which method get the purch reciept amount  , and quantity  it is sitll not clear from this method .
     
    can you explain 
     
     
    thanks regards 
     
    dinesh 
  • Vigneshvaran Profile Picture
    354 on at
    Could you please share me the front end screenshot which field you want to calculate.
  • Dineshkarlekar Profile Picture
    1,836 on at
     i am getting the data in ssrs report , so i need to calculate 
    these to poplulate my temp tableI. in ssrs dp clas i put code like this 
      PurchtotalsForm purchTotalsForm;
     
                            purchTotalsForm         = PurchtotalsForm::newPurchTotalsForm(purchTable);
                            purchTotalsForm.doUnPack();
     
                            if (purchTotalsForm.allowEditCurrencyCode())
                            {
                                CurrencyCode accountingCurrency = Ledger::accountingCurrency(CompanyInfo::current());
                                purchTotalsForm.setCurrencyCode(accountingCurrency);
                            }
     
                            purchTotalsForm.calctotals();
                            purchTotalsForm.doPack();
     
                            ReceivedAmount  = purchTotalsForm.sumLinesValue() + purchTotalsForm.invoiceRoundOffValue();
                            ReceivedAmount1 = purchTotalsForm.sumTaxValue();
                            ReceivedAmount2 = purchTotalsForm.invoiceAmountValue(); 
                            tempRec.QtyReceived  = purchTotalsForm.qtyValue();
     
     
     
    //       receivedQty += vendPackingSlipTrans.Qty;
                         //       receivedAmount += vendPackingSlipTrans.ValueMST;
                         //       pendingQty += vendPackingSlipTrans.REMAIN;
                         //}
    
                         //   tempRec.QtyReceived    = qtyReceived;
                         //   tempRec.ReceivedAmount = receivedAmount;
                         //   tempRec.QtyPending     = qtyPending;
                         //   tempRec.PendingAmount  = qtyPending * tempRec.PurchPrice;
  • Vigneshvaran Profile Picture
    354 on at
    Hi Dinesh,
     
    I dont need the code, I just need to understand your requirement through front end to suggest the code.
  • Dineshkarlekar Profile Picture
    1,836 on at
     
    I can share you path , 
    in  All purchase orders >Product receipt journal >lines 
    Recieved  & Amount & Remaining   is already there .hope you understand .
     
     
    thanks 
  • Dineshkarlekar Profile Picture
    1,836 on at
    this is the image , i hope it helps 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 490 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 429 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 241 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans