[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to add shipping charge to sales invoice
- Subject: Re: How to add shipping charge to sales invoice
- From: "Chris Travers" <..hidden..>
- Date: Mon, 20 Nov 2006 14:10:37 -0800
Hi Charley,
I tend to shy away from manual entry of taxes because it is error
prone and adds potential problems for a business both in terms of tax
liability and customer service. More responses inline though.
On 11/20/06, Charley Tiggs <..hidden..> wrote:
Chris Travers wrote:
> As of 1.1, you have to associate tax rates with customers.
>
> 1.2 provides the ability to write modular tax rules in Perl (one of
> our core team has to deal with the tax complexities that make anything
> in the US look simple :-).
Can you tell me where to go within the LSMB code to look at this?
In the 1.2 beta series, take a look at LedgerSMB/Tax.pm and
LedgerSMB/Tax/Simple.pm
Note that this was rebuilt because Ontario (Canada, not Ontario NY)
has some relatively... intricate... tax laws where the tax status of
an item often depends on other items it is purchased with, the
subtotal of the invoice, and other contextual matters outside the
scope of the customer and product... The default tax structure of 1.2
(without any custom modules) will also handle cumulative taxes too.
So this Tax API is designed to be able to handle relatively complex
tax requirements automatically based on arbitrary criteria.
> On 11/19/06, Charley Tiggs <..hidden..> wrote:
>> Okay...
>>
>> What if tax needs to be applied on a case-by-case basis? If you've ever
>> dealt with the New York State tax code, you'll understand that I can't
>> just apply a flat percentage. It's all very much dependent on the
>> location within the state and the item(s) ordered as to what percentage
>> will apply per line item.
>
> Tax is charged if the part/service/assembly is flagged as taxable for
> a specific tax and the customer is flagged as taxable for that same
> tax.
It's almost mandatory that the client be able to edit the tax directly.
Can you think of no way to accomplish this?
Seems that the proper way to do this is to have different taxes set up
for each locale and attach the custome rto one of the locales.
I suppose one could create a tax service against a liability
account... Not sure this is a great idea, but it is one way to do
this.
Longer run, it would be best to create a module to determine whether
tax needs to be charged on a given item on a given invoice. This
would make the system less prone to error.
This way your tax tables could be contained in the application, the
ship to city or zip could be used to do the lookup (perhaps with an
override on the customer's form, for example, if they live outside a
town with a higher tax rate but the mailing address shows that town.
I suppose if you need this for 1.2, we can either help you create the
tax module (free support on the devel lists) or I can create a quote
to make this automated.
>> Is there any way to adjust the tax manually when creating the order?
>>
> You would have to create different customer records for the different levels.
Uh huh... Well, I'm sure we can figure out a potential solution here
that doesn't involve creating multiple customer records per customer to
accomplish putting the right tax on each product (and I have 9000
products to deal with).
Adding the tax to product mappings could be automated with some quick
SQL scripts. I.e. if the item is currently subject to state sales
tax, we just add the other 12 tax mappings or so. Query might run for
a few minutes but shouldn't be too bad....
Adding the mappings to customers wouldn't be too bad either. Again,
this is a problem if in the future the customer wants an item to be
shipped somewhere outside the county or city where they reside.
Best Wishes,
Chris Travers