Create deposit fields

Hello everyone,
First of all, I’m not a developer and I don’t have a lot of skills, but I like looking around. Researching. Testing and then understanding how things work.

I’m trying to enter a deposit amount in the invoice module.
To obtain the necessary information on an invoice:
Total excl. tax > Discounts > VAT total > Total incl. tax > Deposit > Total to pay
I would like to understand where/how the values given by $total_amount and $subtotal_amount are calculated.
This is to understand and add the “deposit” and “rest to pay” fields.

I am currently testing Version 8.5.0

I hope I’ve been clear , but I’d appreciate it if some people could shed some light on this,
Thank you

Hello,

Welcome to the SuiteCRM community :tada: :tanabata_tree: :sparkles:

Editing the Invoice form is EXTREMELY difficult.

However, you can pretty easily add a field to the Invoice header for “deposit” and then either add a calculated field with workflow, or a before save hook to calculate the total left outstanding.