Find the total amount from a given percentage and x amount which on substraction provides the x amount

2018-04-20 20:09:53

I am a freelancer and working with a firm. I provide services, for which I am taking extra 5% as service charge of the firm's amount.

Suppose the firm's amount is 600, and I am chargin 5%.

600 + 600%5 = 630

This total amount (630) again goes to a payment service gateway where they (firm) have already programmed to deduct their share and settle my share (5%).

So what happens on payment service gateway is they deduct 5% from the total amount (i.e., 630) and not from the firm's actual amount (i.e., 600).

630 - 630%5 = 598.5

As you can see, their share (598.5) reduces by the actual amount (600).

Could you please help me how to produce the total amount to the payment gateway server so that the firm gets their full amount, and I get my 5%.

I guess

i.e., total_amount - total_amount %5 = firm_amount