Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Applying a Payment to multiple invoices - Sample

Featured Replies

#
# This script snippet demonstrates applying a received payment to multiple invoices.
# It assumes that the FileMaker solution has a 'join' table between the payment and the invoice(s), and from the
# join table the txn id of the invoice is accessible.
#
PCQB_RqNew( "ReceivePaymentAdd" )
#adding the remainder of the fields left out of this sample in the interest of brevity
#ensure to add them in your script.
#
#now apply this payment to the invoices..
#go to the related records that indicate which invoices the current FM payment is applied to
#from these records it will be necessary to have access to the invoice txn id and the amount applied to the invoice - design your fm schema accordingly
#
Go to Related Record.....
Go to Record/Request/Page[ First ]
#create the 'related records' to the request
Loop
 # use pcqb_rqaddrelatedrecord to add an application of the payment to a transaction/invoice
 PCQB_RqAddRelatedRecord( "AppliedToTxnAdd" )
 #
 # now add the transaction id for the invoice - this tells QB that this is the invoice to which we are applying part of the payment
 PCQB_RqAddFieldWithValue( "TxnId" ; INV_PMT::Invoice_TXNID )
 #note that INV_PMT::Invoice_TXNID is a place holder for your table/field holding the txnid for the invoice
 #
 # now add the payment amount - the part of the payment applied to the invoice
 PCQB_RqAddFieldWithValue( "PaymentAmount" : INV_PMT::Applied_Amount )
 #note that INV_PMT::Applied_Amount is a place holder for your table/field holding the amount of the current payment that is applied to the invoice
 #
 #very important! - close the related record in the request
 PCQB_RqCloseRelatedRecord
 #
 #and navigate to the next invoice to which the payment is to be applied
 Go to Record/Request/Page[ Next ; Exit After Last ]
End Loop
#
#
 

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.