Change Account Balance Logic

Dear all,



within my marketplace, the customer directly pays the full amount to the vendor (offline). I will then invoice the vendor on e.g. a monthly base to get my provision (offline). I want this logic to be reflected within the account balance.



As I am not 100% sure about the logic at the moment…does anybody knows which files to touch to change the calculation logic of:

Balance carried forward: €0,00 Sales period total: €3.000,00 Total sales period payout: €3.000,00 Total amount due: €0,00 Total unpaid balance:





Thanks upfront & kind regards



Jan

As the easiest way you can modify only language variables to change the words on the interface, because the math actually works the way you need. The difference is only in “who pays to whom”



More advanced modifications are rather complicated and depend mostly on the degree of perfection you want to achieve. Anyway the files used in these things are the following



php code:

fn.multivendore.php

backend controller companies.php



templates:

design/backend/templates/views/companies/components/balance_info.tpl

design/backend/templates/views/companies/components/balance_new_payment.tpl

design/backend/templates/views/companies/components/balance_search_form.tpl

design/backend/templates/views/companies/balance.tpl

Hey ilib,



great idea:grin:[size=4] Thank you. H[/size][size=4]aven’t thougth in that direction yet…my ideas have been more complicated…I will give it a try and will let you know the results…[/size]



[size=4]Kind regards[/size]



[size=4]Jan [/size]

[color=#282828][font=arial, verdana, tahoma, sans-serif]Hi,[/font][/color]



tried to use the logic and also had a deeper look into the CS-Cart calculation…I decided to implement my own logic in



[color=#282828][font=arial, verdana, tahoma, sans-serif]design/backend/templates/views/companies/components/balance_info.tpl[/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif][size=4]fn.multivendore.php[/size][/font][/color]



Did it directly in the files…is there a way to implement this using my changes as well? I don't know the exact logic using my changes, especially finding out which file name should be used within my changes…

In most cases you will need to modify core code, so say goodbye to upgrades.

I strongly suggest you read these articles before you decide what to do: Add-on Development — CS-Cart 4.1.x documentation

Is it possible to only include "completed" orders in the vendor balance in payout section? Currently it will include orders that are still processing.. we want the Vendor Payout Balance to only calculate from orders marked complete. Please advise.