Topic: Customer Branch Edit

I am starting to examine how to interface between osCommerce and FA.

I noticed that you can not delete a Customer Branch that has 'customer transactions' or 'sales orders' in the database.

I also see that there are no restrictions on how you can edit the branch

I think that is may be valid to edit most anything while the order is being handled,
but once the sales order is closed/delivered/etc it should be copied for future preservation.

What would it mean if I took a sales order that shipped to branch in the UK and then the following week that address book entry (branch) was edited to be in New York City?

Would the old sales order now display NYC with taxes collected to UK?

In osCommerce that is what we did with everything, including product descriptions, prices, taxes, etc.

sales_orders_details appears to not depend on other tables, but sales_orders
does refer to a few others.

tom

Re: Customer Branch Edit

Sales order is not fiscal document, so there is not a problem to change customer parameters after SO entry. No tax is calculated during sales order.

In contrary Sales Invoice/Delivery has all crucial data like taxes, delivery address etc stored in tables, so changing customer data does not change already entered docs, as far as you do not reedit old documents.
Janusz

3 (edited by tom 04/11/2009 02:32:04 am)

Re: Customer Branch Edit

Ok maybe I misspoke...

I just did some more testing and I see that if I change the address in the branch it does not effect the Sales Order.

So what effect will modifying the Branch have on any current or past sales orders (or invoices or...)?

I saw the "Retail Customers" in the demo an have considered putting all the web orders under a single FA customer and using the branches for each individual osC customer address.

And if the customer changed their address, I was going to update their FA Customer Branch accordingly.

I am just looking for any bad things that could happen by doing things this way...

If this will work, then I just need to have the osC 'order process' generate a sales order and then the normal FA interface can be used for the rest of the process.

I am very content to continue to use osC to interface with the customer because that works well. I need FA to track the *rest* of the business!

[edit]
Upon thinking about it more...

I can not think of a good reason to not create a FA user for each osC user
(except maybe lazyness LOL)

At that point I might as well create Branches on the fly as Ship To addresses
change... which it typically rare with my customer base

It then may make the most sense to do everything from the Order Process function in osCommerce.
That may keep things simpler in the long run...

tom
ps. let me know if there is a better place to discuss this kind of thing

Re: Customer Branch Edit

tom wrote:

I just did some more testing and I see that if I change the address in the branch it does not effect the Sales Order.

So what effect will modifying the Branch have on any current or past sales orders (or invoices or...)?

Modifying adresses in customer/branch sales order delivery address unless you reedit SO.

In fact algorithm of selection of delivery address on new SO is quite logical:
- select branch mailing address if not empty
else
- select branch billing adress if not empty
else
- select company address
That's all.

tom wrote:

I saw the "Retail Customers" in the demo an have considered putting all the web orders under a single FA customer and using the branches for each individual osC customer address.

And if the customer changed their address, I was going to update their FA Customer Branch accordingly.

I am just looking for any bad things that could happen by doing things this way...

All should work right. The only problem can be changed branch address between  sales order is received and moment of delivery. In this case all not delivered sales orders should be updated.

I can not think of a good reason to not create a FA user for each osC user
(except maybe lazyness LOL)

At that point I might as well create Branches on the fly as Ship To addresses
change... which it typically rare with my customer base

I guess you mean customers not users? You can use 'Retail' customer with many branches, or you can create unique customer record for every your client. The first option cannot be used for multiply companies because GST number is stored  in customer, not in branch record. For retail customers GST number is obsolete.

janusz

Re: Customer Branch Edit

itronics wrote:

Modifying addresses in customer/branch sales order delivery address unless you reedit SO.

In fact algorithm of selection of delivery address on new SO is quite logical:
- select branch mailing address if not empty
else
- select branch billing adress if not empty
else
- select company address
That's all.

That makes sense. but since osCommerce does much of the same logic, I will have all three addresses (generally the same) and it is far simpler
logic to fill them in all the time... (Customer/Company Address, Billing Address, Shipping Address)

itronics wrote:
tom wrote:

I am just looking for any bad things that could happen by doing things this way...

All should work right. The only problem can be changed branch address between  sales order is received and moment of delivery. In this case all not delivered sales orders should be updated.

Yes and I take that to be bad, so it makes sense to only allow FA to make changes to SO or Customer Branches, etc

itronics wrote:

I guess you mean customers not users? You can use 'Retail' customer with many branches, or you can create unique customer record for every your client. The first option cannot be used for multiply companies because GST number is stored  in customer, not in branch record. For retail customers GST number is obsolete.

Yes I did mean Customers.

One thing I did notice, the Customer's Address does not have a Tax Group associated with it, so I will need at least one Branch for each customer.
No big deal, just my observation.

In my case I do not sell my products for re-sale, so every customer is a Retail Customer.
But I do want to make any code I write general enough so others can use it too...

tom

Re: Customer Branch Edit

Yes, FA was (following webERP) designed firstly for B2B market, so db structure is not optimized for retail sales. Nevertheless both approaches are correct, so it is up to you which way to choose. If new customers will be imported from osC automatically and we want to support also invoices for companies, seems the better way is to create both customer and branch record.

Janusz

Re: Customer Branch Edit

I agree.

Thanks for helping me understand it better.

tom