Topic: Added Branches to additional Fields Ext

The Customer Additional Information screen requires a customer and branch to be set to add, update, or delete additional fields.

***Warning read the readme*** Prior to using id you already have an addfields_cust table in your database

repo is here git branch is additional_fields_w/branches
https://github.com/trafficpest/FA24extensions/tree/additional_fields_w/branches
https://github.com/trafficpest/FA24extensions/tree/master/Extensions/additional_fields

A new column `cust_branch_no` as 2nd primary key, was added to addfields_cust . I created new functions maintaining the old. I wasn't sure how the author @poncho wanted to go with it.

you could allow null in branch_no but I dont see why since FA creates a branch when you create a customer automatically.
You could use the `all branches` option. copy the add_field info to all branches in the customer you are working on.

I needed branches for the route_delivery extension I made. I have a few clients that have multiple delivery locations, under one account (branches)

Re: Added Branches to additional Fields Ext

Your sql/update.sql has an error "END IF;" that needs to be removed as well as the trailing blank line for synch with existing module.

https://github.com/apmuthu/FA24extensions/commit/698b3f2b4f90bd7d743e9a8aabbb0e2e4f4e02e6

Post's attachments

additional_fields.zip 64.2 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

3 (edited by poncho1234 02/21/2024 02:51:22 pm)

Re: Added Branches to additional Fields Ext

@trafficpest I wrote AF for my own needs and did/do not require branches. Delighted you've found a use for it and thank you for sharing/updating.

trafficpest wrote:

...I dont see why since FA creates a branch when you create a customer automatically...

This is not entirely true:-

Lines 62 & 63 of config.default.php state:-

    /* Creates automatic a default branch with contact. Value 0 do not create auto branch */
    $auto_create_branch = 1;

The default configuration is for FA to create a branch, but you can as I do turn it off, so null would cover all options.

The FrontAccounting Wiki(Manual, examples, tips, setup info, links to accounting sites, etc) https://frontaccounting.com/fawiki/

Re: Added Branches to additional Fields Ext

Sorry about the end if I was going to make a if statement if the table exists not to drop but to alter. But didn't get around to it.

Don't merge the route delivery plug in from my git yet.yesterday I corrected one bug and added a feature. I'll post here when it is pushed.

@Poncho I didn't know branches were optional that's a good heads up. Thank you for the plug-in it got my routing software going really easy. I needed branches to be able to support customers with multiple delivery locations. It now is routing and putting in order a hundred slips in an instant. This will save considerable time daily!

I just noticed in the include customer reporting Excel report the join has to be with branch code now to prevent branch duplicates in the query.

Re: Added Branches to additional Fields Ext

OK, It is all set to go there are two branches of route_deliveries

https://github.com/trafficpest/FA24extensions/tree/route_deliveries_no_ship
This works with current version of FA it has no shipper(driver) filter option available

https://github.com/trafficpest/FA24extensions/tree/route_deliveries
This version has a shipper filter by using adding an argument to a core FA function. The core change is below

https://github.com/trafficpest/FA/tree/shippers_branch
This is FA with the small function addition to filter shippers

Thank you hope this will be of use for others especially service industries

Re: Added Branches to additional Fields Ext

Cleaned up the code and uploaded to the unofficial FA24extensions repo at:
https://github.com/apmuthu/FA24extensions/tree/master/Extensions/rep_route_deliveries_no_ship