How can I update Payment Status field instantly after I'm updating a portal field?
Your script trigger method should work, but chances are that your current method is tripping it's own trigger and thus getting trapped in an infinite loop. Exactly why that is happening depends on what triggers you use and what your script does. There are also ways to set a value in a global variable that then keeps the triggered script from performing a second time.
But a simpler approach that should work is an unstored calculation field defined in Invoices. This method shouldn't "show double" and doesn't require calculating on "all invoices"--just the payment records linked to a given invoice--which should be a fairly small number of related records, but then you haven't explained where a "customer details" layout comes into this either...
My bad, since invoices template is in Filemaker templates since I use FM on FM11, I did not explain it properly. I will upload 2 images for explaining what happened if I use a calculation fieldThe button on Paid Invoices portal is visible and clickable, and have same destination with invoice in Unpaid Invoices portal.
Is there something wrong with my setup?
EDIT: removed unecessary image
I see nothing in your last post that changes what I said previously. Keep in mind that it's how the table occurrences in your database, starting with the ones set up for your calculation field's "context (Invoices), the layout (layout setup | Show Records from ) and your portals (Portal Setup | Show Related Records From) link to other tables in Manage | database | Relationships that play a crucial role in how such calculations evaluate.