Finance_Payments_OrderBalance VIEW (Domain Api 2019.1)

This view contains the payment orders and their paid amounts collected from released (non voided) payment transactions. Each item represents a payment order with an additional property - PaidAmount.

Only payment orders that are not fully paid are returned i.e. there will be no items with OrderAmount equal to PaidAmount. The useful information from this view is the remaining amount to pay which is OrderAmount minus PaidAmount.

mceclip0.png

The view can be filtered to query the payment status of a document.

The query bellow will return all payment orders for the specified document (in this case a sales order) that are not fully paid:

https://example.com/api/domain/odata/Finance_Payments_OrderBalances?$filter=RefDocument eq 'Crm_Sales_SalesOrders(b488d924-6332-e311-81cb-00155d001f00)'

Note that there may be more than one item in the returned result  because the not fully paid payment orders for the sales order may be more than one. To calculate the remaining amount to pay we need to calculate SUM(item.OrderAmount - item.PaidAmount).

Have more questions? Submit a request

3 Comments

  • 0
    Avatar
    Georgi Kaloferov

    Браво!

  • 0
    Avatar
    Михаил Денев

    Здравейте,

    Имам въпрос относно примера

    The query bellow will return all payment orders for the specified document - in this case a sales order:

    https://example.com/api/domain/odata/Finance_Payments_OrderBalances?$filter=RefDocument eq 'Crm_Sales_SalesOrders(b488d924-6332-e311-81cb-00155d001f00)'

    Note that there may be more than one item in the returned result  because the payment orders for the sales order may be more than one. The sum of PaidAmount of each payment order is the total paid amount for the sales order.

     

    На база на писаното по-горе - а именно че не се връщат приключени платежни искания предполагам че или твърдението "The sum of PaidAmount of each payment order is the total paid amount for the sales order" не е вярно, защото може да има и приключени или при такъв тип заявки се връщат се връщат и приключените платежни искания.

     

    Поздрави

  • 0
    Avatar
    Nikolay Nikolov [ERP.BG]

    Явно наистина "The sum of PaidAmount of each payment order is the total paid amount for the sales order" не е вярно. Ще го коригирам.

Please sign in to leave a comment.
Powered by Zendesk