This topic contains 0 replies, has 0 voices, and was last updated by JohnCCole 8 years, 3 months ago.

  • Author
    Posts
  • #5212 Score: 0

    JohnCCole
    • Contributions: 0
    • Level 1

    I have a vendor payment with three vendor credits being used to pay for four bills.

    The result is that three bills end up requiring actually money (no credit amount left) while one bill is completely paid by the application of a credit note.

    In the UI of the payment record in the applies list you only see the three bills (excluding the one paid in full by a vendor credit), and in the credits sublist you see all the credits used.

    When you print a payment voucher the fourth bill (not visible in the UI appears) which is perfect it should.

    I need to be able to get these details outside the context of printing payment voucher and here’s the problem.

    1. The payment record itself only has an apply sublist, and as indicated above the apply sublist has only three bills.

    2. The vendor credits are not accessibly on the payment record itself but was able to find them using the below search in SuiteScript.

    Code:
    var arrResults = nlapiSearchRecord(‘transaction’,null,
    [new nlobjSearchFilter(‘payingtransaction’,’appliedToTransaction’,’is’,paymentid),
    new nlobjSearchFilter(‘type’,null,’is’,’VendCred’)],
    [new nlobjSearchColumn(‘appliedtoforeignamount’,null),
    new nlobjSearchColumn(‘tranid’),new nlobjSearchColumn(‘trandate’),
    new nlobjSearchColumn(‘appliedtotransaction’),new nlobjSearchColumn(‘fxamount’)]);
    The problem with my search is that it will only pick up the credits for bills that are on the payment applies list. It will not find the vendor credit that was fully applied to a bill that is not in the applies list, but this information clearly is in the system as it’s on the payment voucher print.

    I loaded the vendor credit that was fully applied to a bill not in the applies list on the payment and I see that the applies sublist on the credit record does have a pointer back to the payment record with a sublist field named “pmt”, but I can’t seem to craft a search that will get me that vendor credit.

    Any help would be greatly appreciated.
    This is a cached copy. Click here to see the original post.

You must be logged in to reply to this topic.